Class: Odin::Types::OdinSchema
- Inherits:
-
Object
- Object
- Odin::Types::OdinSchema
- Defined in:
- lib/odin/types/schema.rb
Overview
Complete schema definition
Instance Attribute Summary collapse
-
#arrays ⇒ Object
readonly
Returns the value of attribute arrays.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#imports ⇒ Object
readonly
Returns the value of attribute imports.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#object_constraints ⇒ Object
readonly
Returns the value of attribute object_constraints.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
-
#initialize(metadata: {}, types: {}, fields: {}, arrays: {}, imports: [], object_constraints: {}) ⇒ OdinSchema
constructor
A new instance of OdinSchema.
Constructor Details
#initialize(metadata: {}, types: {}, fields: {}, arrays: {}, imports: [], object_constraints: {}) ⇒ OdinSchema
Returns a new instance of OdinSchema.
250 251 252 253 254 255 256 257 258 259 |
# File 'lib/odin/types/schema.rb', line 250 def initialize(metadata: {}, types: {}, fields: {}, arrays: {}, imports: [], object_constraints: {}) @metadata = .freeze @types = types.freeze @fields = fields.freeze @arrays = arrays.freeze @imports = imports.freeze @object_constraints = object_constraints.freeze freeze end |
Instance Attribute Details
#arrays ⇒ Object (readonly)
Returns the value of attribute arrays.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def arrays @arrays end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def fields @fields end |
#imports ⇒ Object (readonly)
Returns the value of attribute imports.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def imports @imports end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def @metadata end |
#object_constraints ⇒ Object (readonly)
Returns the value of attribute object_constraints.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def object_constraints @object_constraints end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def types @types end |