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.



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

#arraysObject (readonly)

Returns the value of attribute arrays.



264
265
266
# File 'lib/odin/types/schema.rb', line 264

def arrays
  @arrays
end

#fieldsObject (readonly)

Returns the value of attribute fields.



264
265
266
# File 'lib/odin/types/schema.rb', line 264

def fields
  @fields
end

#importsObject (readonly)

Returns the value of attribute imports.



264
265
266
# File 'lib/odin/types/schema.rb', line 264

def imports
  @imports
end

#metadataObject (readonly)

Returns the value of attribute metadata.



264
265
266
# File 'lib/odin/types/schema.rb', line 264

def 
  @metadata
end

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

#typesObject (readonly)

Returns the value of attribute types.



264
265
266
# File 'lib/odin/types/schema.rb', line 264

def types
  @types
end