Method: TableSetting::Cell#initialize

Defined in:
lib/table_setting/cell.rb

#initialize(row, contents, options = {}) ⇒ Cell

Returns a new instance of Cell.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/table_setting/cell.rb', line 4

def initialize(row, contents, options = {})
  @row = row
  @row.cells.push(self)

  @contents = contents
  @span     = options[:span] || 1
  @rowspan  = options[:rowspan] || 1
  
  @style = TableSetting::Style.new(self, options)

  @left_index = column_index
end