class RenderTable::Row

Attributes

html[RW]
record[RW]
row_index[RW]

Public Class Methods

new(record, row_index, table) click to toggle source
# File lib/render_table/row.rb, line 11
def initialize(record, row_index, table)
  @record = record
  @row_index = row_index
  @table = table
  @html = @table.html[:rows]
end
rows_for_table(table) click to toggle source
# File lib/render_table/row.rb, line 5
def self.rows_for_table(table)
  table.records.collect.with_index do |record, row_index|
    RenderTable::Row.new(record, row_index, table)
  end
end

Public Instance Methods

cells() click to toggle source
# File lib/render_table/row.rb, line 26
def cells
  RenderTable::Cell.cells_for_row(self, @table)
end
class() click to toggle source
# File lib/render_table/row.rb, line 18
def class
  RenderTable::Html.html_string(@html[:classes], @record, @row_index)
end
id() click to toggle source
# File lib/render_table/row.rb, line 22
def id
  RenderTable::Html.html_string(@html[:ids], @record, @row_index)
end