Module: JSI::DescribesSchemaModule
- Defined in:
- lib/jsi/schema_classes.rb
Overview
a module to extend the JSI Schema Module of a schema which describes other schemas
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 Method Details
#new_schema(schema_content, **kw) ⇒ JSI::Base, JSI::Schema
instantiates the given schema content as a JSI Schema.
45 46 47 |
# File 'lib/jsi/schema_classes.rb', line 45 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.
55 56 57 |
# File 'lib/jsi/schema_classes.rb', line 55 def new_schema_module(schema_content, **kw) schema.new_schema(schema_content, **kw).jsi_schema_module end |