Class: FactoryForm::TextData

Inherits:
Field
  • Object
show all
Defined in:
lib/factoryform/text_data.rb

Instance Attribute Summary collapse

Attributes inherited from Field

#field_type, #hint, #id, #label, #required, #unique, #validation_format

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ TextData

Returns a new instance of TextData.



5
6
7
8
9
# File 'lib/factoryform/text_data.rb', line 5

def initialize(options = {})
  options[:field_type] = "text_data"
  @value = options[:value] || options[:label]
  super(options)
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/factoryform/text_data.rb', line 3

def value
  @value
end