class PostRunner::FlexiTable::Row

Attributes

attributes[R]

Public Class Methods

new(table, section) click to toggle source
Calls superclass method
# File lib/postrunner/FlexiTable.rb, line 115
def initialize(table, section)
  @table = table
  @section = section
  @attributes = Attributes.new
  super()
end

Public Instance Methods

cell(content, attributes) click to toggle source
# File lib/postrunner/FlexiTable.rb, line 122
def cell(content, attributes)
  c = Cell.new(@table, self, content, attributes)
  self << c
  c
end
set_indicies(col_idx, row_idx) click to toggle source
# File lib/postrunner/FlexiTable.rb, line 128
def set_indicies(col_idx, row_idx)
  @index = row_idx
  self[col_idx].set_indicies(col_idx, row_idx)
end
set_row_attributes(attributes) click to toggle source
# File lib/postrunner/FlexiTable.rb, line 133
def set_row_attributes(attributes)
  @attributes = Attributes.new(attributes)
end
to_html(doc) click to toggle source
# File lib/postrunner/FlexiTable.rb, line 148
def to_html(doc)
  css_class = @section == :head ? 'ft_head_row' :
              @index % 2 == 0 ? 'ft_even_row' : 'ft_odd_row'
  doc.tr({ :class => css_class }) {
    each { |c| c.to_html(doc) }
  }
end
to_s() click to toggle source
# File lib/postrunner/FlexiTable.rb, line 137
def to_s
  s = ''
  frame = @table.frame

  s << '|' if frame
  s << join(frame ? '|' : ' ')
  s << '|' if frame

  s
end