Class: FactoryForm::LongAnswer
- Defined in:
- lib/factoryform/long_answer.rb
Instance Attribute Summary collapse
-
#min_chars ⇒ Object
Returns the value of attribute min_chars.
Attributes inherited from Field
#field_type, #hint, #id, #label, #required, #unique, #validation_format
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ LongAnswer
constructor
A new instance of LongAnswer.
Constructor Details
#initialize(options = {}) ⇒ LongAnswer
Returns a new instance of LongAnswer.
4 5 6 7 8 |
# File 'lib/factoryform/long_answer.rb', line 4 def initialize(={}) [:field_type] = "long_answer" super() @min_chars = [:options][:min_chars] || 500 # Default number of chars 500 end |
Instance Attribute Details
#min_chars ⇒ Object
Returns the value of attribute min_chars.
3 4 5 |
# File 'lib/factoryform/long_answer.rb', line 3 def min_chars @min_chars end |