Method: SimpleTable::Row#cell

Defined in:
lib/simple_table/row.rb

#cell(*contents) ⇒ Object



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

def cell(*contents)
  options = contents.last.is_a?(Hash) ? contents.pop : {}
  if parent.is_a?(Body)
    add_class!(options, current_column_class)
    add_header!(options, current_column_id)
  end
  contents.each do |content|
    cells << Cell.new(self, content, options)
  end
end