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.
273 274 275 276 277 278 279 280 281 282 |
# File 'lib/odin/types/schema.rb', line 273 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.
270 271 272 |
# File 'lib/odin/types/schema.rb', line 270 def arrays @arrays end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
270 271 272 |
# File 'lib/odin/types/schema.rb', line 270 def fields @fields end |
#imports ⇒ Object (readonly)
Returns the value of attribute imports.
270 271 272 |
# File 'lib/odin/types/schema.rb', line 270 def imports @imports end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
270 271 272 |
# File 'lib/odin/types/schema.rb', line 270 def @metadata end |
#object_constraints ⇒ Object (readonly)
Returns the value of attribute object_constraints.
270 271 272 |
# File 'lib/odin/types/schema.rb', line 270 def object_constraints @object_constraints end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
270 271 272 |
# File 'lib/odin/types/schema.rb', line 270 def types @types end |