ClassRegistry | R Documentation |
Base schema class with which to define custom schemas
registry
(list) list of classes registered
print()
ClassRegistry$print(x)
register()
Add a class to the registry of serializer classes
ClassRegistry$register(class_name, cls)
class_name
(character) the class name
cls
(Schema) the class object
nothing, registers internally
get_class()
ClassRegistry$get_class(class_name)
clone()
The objects of this class are cloneable with this method.
ClassRegistry$clone(deep = FALSE)
deep
Whether to make a deep clone.
x <- ClassRegistry$new() x x$registry z <- Schema$new("FooBar", name = fields$character(), title = fields$character() ) w <- Schema$new("MySchema", name = fields$character(), title = fields$character() ) x x$registry x$register("FooBar", z) x$register("MySchema", w) x x$registry x$get_class("FooBar") x$get_class("MySchema")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.