Class: Odin::Types::OdinSchema

Inherits:
Object
  • Object
show all
Defined in:
lib/odin/types/schema.rb

Overview

Complete schema definition

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#arraysObject (readonly)

Returns the value of attribute arrays.



247
248
249
# File 'lib/odin/types/schema.rb', line 247

def arrays
  @arrays
end

#fieldsObject (readonly)

Returns the value of attribute fields.



247
248
249
# File 'lib/odin/types/schema.rb', line 247

def fields
  @fields
end

#importsObject (readonly)

Returns the value of attribute imports.



247
248
249
# File 'lib/odin/types/schema.rb', line 247

def imports
  @imports
end

#metadataObject (readonly)

Returns the value of attribute metadata.



247
248
249
# File 'lib/odin/types/schema.rb', line 247

def 
  @metadata
end

#object_constraintsObject (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

#typesObject (readonly)

Returns the value of attribute types.



247
248
249
# File 'lib/odin/types/schema.rb', line 247

def types
  @types
end