Parent

Class/Module Index [+]

Quicksearch

RT::RT2HTMLVisitor

Public Class Methods

new() click to toggle source
# File lib/rt/rt2html-lib.rb, line 14
def initialize() super end

Public Instance Methods

setup() click to toggle source
# File lib/rt/rt2html-lib.rb, line 26
def setup
  block('setup') do
    s = %[<table border="1">\n]
    s << %[<caption>#{esc(caption)}</caption>\n] if caption
    s
  end
end
teardown() click to toggle source
# File lib/rt/rt2html-lib.rb, line 34
def teardown
  block('teardown') do
    %[</table>\n]
  end
end
visit_Body(ary = @body) click to toggle source
# File lib/rt/rt2html-lib.rb, line 75
def visit_Body(ary = @body)
  block('Body') do
    ret = "<tbody>\n"
    ary.each do |line|
      ret << '<tr>'
      each_cell(line) do |cell|
        ret << cell_element(cell, %[td align="#{cell.align.id2name}"])
        ret << esc(cell.value)
        ret << '</td>'
      end
      ret << "</tr>\n"
    end
    ret << "</tbody>\n"
  end
end
visit_Header(ary = @header) click to toggle source
# File lib/rt/rt2html-lib.rb, line 55
def visit_Header(ary = @header)
  block('Header') do
    if ary.empty?
      ""
    else
      ret = "<thead>\n"
      ary.each do |line|
        ret << '<tr>'
        each_cell(line) do |cell|
          ret << cell_element(cell, 'th')
          ret << esc(cell.value)
          ret << '</th>'
        end
        ret << "</tr>\n"
      end
      ret << "</thead>\n"
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.