Class: Stratify::FieldDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/stratify/field_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#labelObject (readonly)

Returns the value of attribute label.



3
4
5
# File 'lib/stratify/field_definition.rb', line 3

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/stratify/field_definition.rb', line 3

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/stratify/field_definition.rb', line 3

def type
  @type
end