Class: Tableasy::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/tableasy/table.rb,
lib/tableasy/table/row.rb,
lib/tableasy/table/cell.rb

Defined Under Namespace

Classes: Cell, Row

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTable

Returns a new instance of Table.



5
6
7
# File 'lib/tableasy/table.rb', line 5

def initialize
  @rows = []
end

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



3
4
5
# File 'lib/tableasy/table.rb', line 3

def rows
  @rows
end

Instance Method Details

#add_row(cells, html = {}) ⇒ Object



9
10
11
# File 'lib/tableasy/table.rb', line 9

def add_row(cells, html = {})
  @rows << Row.new(cells.compact, html)
end