Class: Forma::Col

Inherits:
Object
  • Object
show all
Includes:
FieldHelper
Defined in:
lib/forma/form.rb

Overview

Form may have up to two columns.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fieldsObject (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