Class: Tableview::ViewHandler::Row

Inherits:
TablePiece show all
Defined in:
lib/tableview/view_handler.rb

Instance Attribute Summary collapse

Attributes inherited from TablePiece

#options

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Row

Returns a new instance of Row.



169
170
171
172
# File 'lib/tableview/view_handler.rb', line 169

def initialize(*args)
  super *args
  self.cells = []
end

Instance Attribute Details

#cellsObject

Returns the value of attribute cells.



168
169
170
# File 'lib/tableview/view_handler.rb', line 168

def cells
  @cells
end

Instance Method Details

#cell(*contents) ⇒ Object



174
175
176
177
178
179
# File 'lib/tableview/view_handler.rb', line 174

def cell(*contents)
  opts = contents.extract_options!.symbolize_keys
  contents.each do |c|
    self.cells << Cell.new(c, opts)
  end
end