Class: Ippon::Form::StringsField
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
- #each_param(key) ⇒ Object
- #fill_from_data(data, key) ⇒ Object
-
#initialize ⇒ StringsField
constructor
A new instance of StringsField.
Constructor Details
#initialize ⇒ StringsField
Returns a new instance of StringsField.
33 34 35 |
# File 'lib/ippon/form.rb', line 33 def initialize @input = [] end |
Instance Method Details
#each_param(key) ⇒ Object
42 43 44 45 46 |
# File 'lib/ippon/form.rb', line 42 def each_param(key) @input.each do |val| yield key, val end end |
#fill_from_data(data, key) ⇒ Object
37 38 39 40 |
# File 'lib/ippon/form.rb', line 37 def fill_from_data(data, key) @input = data.fetch_all(key) self end |