Module: JSI::DescribesSchemaModule
- Included in:
- JSONSchemaOrgDraft04, JSONSchemaOrgDraft06, JSONSchemaOrgDraft07
- Defined in:
- lib/jsi/schema_classes.rb
Overview
a module to extend the JSI Schema Module of a schema which describes other schemas
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#new_schema(schema_content, **kw) ⇒ JSI::Base, JSI::Schema
instantiates the given schema content as a JSI Schema.
-
#new_schema_module(schema_content, **kw) ⇒ Module, JSI::SchemaModule
instantiates a given schema object as a JSI Schema and returns its JSI Schema Module.
Instance Attribute Details
#schema_implementation_modules ⇒ Set<Module> (readonly)
62 63 64 |
# File 'lib/jsi/schema_classes.rb', line 62 def schema_implementation_modules @schema_implementation_modules end |
Instance Method Details
#new_schema(schema_content, **kw) ⇒ JSI::Base, JSI::Schema
instantiates the given schema content as a JSI Schema.
47 48 49 |
# File 'lib/jsi/schema_classes.rb', line 47 def new_schema(schema_content, **kw) schema.new_schema(schema_content, **kw) end |
#new_schema_module(schema_content, **kw) ⇒ Module, JSI::SchemaModule
instantiates a given schema object as a JSI Schema and returns its JSI Schema Module.
shortcut to chain Schema::DescribesSchema#new_schema + Schema#jsi_schema_module.
57 58 59 |
# File 'lib/jsi/schema_classes.rb', line 57 def new_schema_module(schema_content, **kw) schema.new_schema(schema_content, **kw).jsi_schema_module end |