Module: JSI::SchemaModule
- Defined in:
- lib/jsi/schema_classes.rb
Overview
JSI Schema Modules are extended with JSI::SchemaModule
Instance Method Summary collapse
- #inspect ⇒ String (also: #to_s)
-
#new_jsi(instance, **kw) ⇒ JSI::Base
invokes JSI::Schema#new_jsi on this module's schema, passing the given instance.
-
#schema ⇒ Schema
the schema of which this is the JSI Schema Module.
-
#schema_uri ⇒ Addressable::URI?
a URI which refers to the schema.
Instance Method Details
#inspect ⇒ String Also known as: to_s
19 20 21 22 23 24 25 |
# File 'lib/jsi/schema_classes.rb', line 19 def inspect if name_from_ancestor "#{name_from_ancestor} (JSI Schema Module)" else "(JSI Schema Module: #{schema.schema_uri || schema.jsi_ptr.uri})" end end |
#new_jsi(instance, **kw) ⇒ JSI::Base
invokes JSI::Schema#new_jsi on this module's schema, passing the given instance.
33 34 35 |
# File 'lib/jsi/schema_classes.rb', line 33 def new_jsi(instance, **kw) schema.new_jsi(instance, **kw) end |
#schema ⇒ Schema
the schema of which this is the JSI Schema Module
|
# File 'lib/jsi/schema_classes.rb', line 6
|
#schema_uri ⇒ Addressable::URI?
a URI which refers to the schema. see JSI::Schema#schema_uri.
14 15 16 |
# File 'lib/jsi/schema_classes.rb', line 14 def schema_uri schema.schema_uri end |