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
-
#default ⇒ Object
Returns the value of attribute default.
-
#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 = [], default = :no_default) ⇒ SchemaField
constructor
A new instance of SchemaField.
Constructor Details
#initialize(name, type, enum_values = [], default = :no_default) ⇒ SchemaField
Returns a new instance of SchemaField.
11 12 13 14 15 16 |
# File 'lib/deimos/schema_backends/base.rb', line 11 def initialize(name, type, enum_values=[], default=:no_default) @name = name @type = type @enum_values = enum_values @default = default end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
6 7 8 |
# File 'lib/deimos/schema_backends/base.rb', line 6 def default @default end |
#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 |