Method: TableSetting::Row#num_columns

Defined in:
lib/table_setting/row.rb

#num_columnsObject



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/table_setting/row.rb', line 14

def num_columns
  total_width = 0
  cells.each do |cell|
    width = 1
    if cell.span and 
      cell.span != 'all' and 
      cell.span > 1
      width = cell.span
    end
    total_width += width
  end
  total_width + num_inherited_columns
end