Class: JSI::SchemaModule
- Inherits:
-
Module
- Object
- Module
- JSI::SchemaModule
- Includes:
- Connects
- Defined in:
- lib/jsi/schema_classes.rb,
lib/jsi/schema_classes.rb
Overview
A Module associated with a JSI Schema. See JSI::Schema#jsi_schema_module.
Defined Under Namespace
Modules: Connects, MetaSchemaModule Classes: Connection
Instance Attribute Summary
Attributes included from Connects
Instance Method Summary collapse
- #inspect ⇒ String
- #instance_valid?(instance) ⇒ Boolean
- #instance_validate(instance) ⇒ Object
-
#new_jsi(instance, **kw) ⇒ JSI::Base subclass
invokes JSI::Schema#new_jsi on this module's schema, passing the given parameters.
-
#schema ⇒ Base + Schema
The schema for which this is the JSI Schema Module.
- #schema_content ⇒ Object
-
#schema_uri ⇒ Addressable::URI?
a URI which refers to the schema.
- #to_s ⇒ Object
Methods included from Connects
Instance Method Details
#inspect ⇒ String
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/jsi/schema_classes.rb', line 30 def inspect if name_from_ancestor if schema.schema_absolute_uri -"#{name_from_ancestor} <#{schema.schema_absolute_uri}> (JSI Schema Module)" else -"#{name_from_ancestor} (JSI Schema Module)" end else -"(JSI Schema Module: #{schema.schema_uri || schema.jsi_ptr.uri})" end end |
#instance_valid?(instance) ⇒ Boolean
66 67 68 |
# File 'lib/jsi/schema_classes.rb', line 66 def instance_valid?(instance) schema.instance_valid?(instance) end |
#instance_validate(instance) ⇒ Object
61 62 63 |
# File 'lib/jsi/schema_classes.rb', line 61 def instance_validate(instance) schema.instance_validate(instance) end |
#new_jsi(instance, **kw) ⇒ JSI::Base subclass
invokes JSI::Schema#new_jsi on this module's schema, passing the given parameters.
51 52 53 |
# File 'lib/jsi/schema_classes.rb', line 51 def new_jsi(instance, **kw) schema.new_jsi(instance, **kw) end |
#schema ⇒ Base + Schema
The schema for which this is the JSI Schema Module
19 20 21 |
# File 'lib/jsi/schema_classes.rb', line 19 def schema @jsi_node end |
#schema_content ⇒ Object
56 57 58 |
# File 'lib/jsi/schema_classes.rb', line 56 def schema_content schema.jsi_node_content end |
#schema_uri ⇒ Addressable::URI?
a URI which refers to the schema. see JSI::Schema#schema_uri.
25 26 27 |
# File 'lib/jsi/schema_classes.rb', line 25 def schema_uri schema.schema_uri end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/jsi/schema_classes.rb', line 42 def to_s inspect end |