Class: Deimos::SchemaField
- Inherits:
-
Object
- Object
- Deimos::SchemaField
- Defined in:
- lib/deimos/schema_backends/base.rb
Overview
Represents a field in the schema.
Instance Attribute Summary collapse
-
#enum_values ⇒ Object
Returns the value of attribute enum_values.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, enum_values = []) ⇒ SchemaField
constructor
A new instance of SchemaField.
Constructor Details
#initialize(name, type, enum_values = []) ⇒ SchemaField
Returns a new instance of SchemaField.
11 12 13 14 15 |
# File 'lib/deimos/schema_backends/base.rb', line 11 def initialize(name, type, enum_values=[]) @name = name @type = type @enum_values = enum_values end |
Instance Attribute Details
#enum_values ⇒ Object
Returns the value of attribute enum_values.
6 7 8 |
# File 'lib/deimos/schema_backends/base.rb', line 6 def enum_values @enum_values end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/deimos/schema_backends/base.rb', line 6 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/deimos/schema_backends/base.rb', line 6 def type @type end |