Class: Forma::Col
Overview
Form may have up to two columns.
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Instance Method Summary collapse
- #add_field(f) ⇒ Object
-
#initialize(fields = []) ⇒ Col
constructor
A new instance of Col.
Methods included from FieldHelper
#boolean_field, #combo_field, #complex_field, #date_field, #email_field, #image_field, #map_field, #number_field, #password_field, #select_field, #subform, #text_field
Constructor Details
#initialize(fields = []) ⇒ Col
Returns a new instance of Col.
249 250 251 |
# File 'lib/forma/form.rb', line 249 def initialize(fields = []) @fields = fields end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
247 248 249 |
# File 'lib/forma/form.rb', line 247 def fields @fields end |
Instance Method Details
#add_field(f) ⇒ Object
253 254 255 |
# File 'lib/forma/form.rb', line 253 def add_field(f) @fields << f end |