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
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.
19 20 21 22 23 24 |
# File 'lib/deimos/schema_backends/base.rb', line 19 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
13 14 15 |
# File 'lib/deimos/schema_backends/base.rb', line 13 def default @default end |
#enum_values ⇒ Array<String>
11 12 13 |
# File 'lib/deimos/schema_backends/base.rb', line 11 def enum_values @enum_values end |
#name ⇒ String
7 8 9 |
# File 'lib/deimos/schema_backends/base.rb', line 7 def name @name end |
#type ⇒ String
9 10 11 |
# File 'lib/deimos/schema_backends/base.rb', line 9 def type @type end |