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.
267 268 269 270 271 272 273 274 275 276 |
# File 'lib/odin/types/schema.rb', line 267 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.
264 265 266 |
# File 'lib/odin/types/schema.rb', line 264 def arrays @arrays end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
264 265 266 |
# File 'lib/odin/types/schema.rb', line 264 def fields @fields end |
#imports ⇒ Object (readonly)
Returns the value of attribute imports.
264 265 266 |
# File 'lib/odin/types/schema.rb', line 264 def imports @imports end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
264 265 266 |
# File 'lib/odin/types/schema.rb', line 264 def @metadata end |
#object_constraints ⇒ Object (readonly)
Returns the value of attribute object_constraints.
264 265 266 |
# File 'lib/odin/types/schema.rb', line 264 def object_constraints @object_constraints end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
264 265 266 |
# File 'lib/odin/types/schema.rb', line 264 def types @types end |