class Trestle::Table::Renderer

Public Class Methods

new(table, template) click to toggle source
# File lib/trestle/table.rb, line 52
def initialize(table, template)
  @table, @template = table, template
end

Public Instance Methods

classes() click to toggle source
# File lib/trestle/table.rb, line 68
def classes
  ["trestle-table", options[:class]].compact
end
columns() click to toggle source
# File lib/trestle/table.rb, line 60
def columns
  @columns ||= row.columns
end
data() click to toggle source
# File lib/trestle/table.rb, line 72
def data
  options[:data]
end
id() click to toggle source
# File lib/trestle/table.rb, line 64
def id
  options[:id]
end
row() click to toggle source
# File lib/trestle/table.rb, line 56
def row
  @row ||= @table.row.renderer(table: @table, template: @template)
end