# 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
# File lib/rt/rt2html-lib.rb, line 34 def teardown block('teardown') do %[</table>\n] end end
# 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
# 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
Generated with the Darkfish Rdoc Generator 2.