Class: Ippon::Form::BooleanField
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
- #fill_from_data(data, key) ⇒ Object
-
#initialize ⇒ BooleanField
constructor
A new instance of BooleanField.
Methods inherited from Field
Constructor Details
#initialize ⇒ BooleanField
Returns a new instance of BooleanField.
50 51 52 |
# File 'lib/ippon/form.rb', line 50 def initialize @input = false end |
Instance Method Details
#fill_from_data(data, key) ⇒ Object
54 55 56 57 |
# File 'lib/ippon/form.rb', line 54 def fill_from_data(data, key) @input = !!data[key] self end |