Class: OrganizzeForm::Section

Inherits:
Object
  • Object
show all
Defined in:
lib/organizze-form/section.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSection

Returns a new instance of Section.



5
6
7
# File 'lib/organizze-form/section.rb', line 5

def initialize
  @rows = []
end

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



3
4
5
# File 'lib/organizze-form/section.rb', line 3

def rows
  @rows
end

Instance Method Details

#row(&block) ⇒ Object



9
10
11
12
13
# File 'lib/organizze-form/section.rb', line 9

def row(&block)
  _row = Row.new
  @rows << _row
  block.call _row
end