Class: Stratify::FieldDefinition
- Inherits:
-
Object
- Object
- Stratify::FieldDefinition
- Defined in:
- lib/stratify/field_definition.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, attribute_hash) ⇒ FieldDefinition
constructor
A new instance of FieldDefinition.
Constructor Details
#initialize(name, attribute_hash) ⇒ FieldDefinition
Returns a new instance of FieldDefinition.
5 6 7 8 9 |
# File 'lib/stratify/field_definition.rb', line 5 def initialize(name, attribute_hash) @name = name @type = attribute_hash[:type] @label = attribute_hash[:label] end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
3 4 5 |
# File 'lib/stratify/field_definition.rb', line 3 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/stratify/field_definition.rb', line 3 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/stratify/field_definition.rb', line 3 def type @type end |