Class: Ippon::Form::StringsField

Inherits:
Field
  • Object
show all
Defined in:
lib/ippon/form.rb

Instance Attribute Summary

Attributes inherited from Field

#error, #input, #output

Instance Method Summary collapse

Constructor Details

#initializeStringsField

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