class ReVIEW::HTMLTOCPrinter

Public Instance Methods

print_book(book) click to toggle source

Private Instance Methods

a_name(name, label) click to toggle source
# File lib/review/tocprinter.rb, line 156
def a_name(name, label)
  %Q(<a name="#{name}">#{label}</a>)
end
chap_sections_to_s(chap) click to toggle source
# File lib/review/tocprinter.rb, line 115
def chap_sections_to_s(chap)
  res = []
  res << "<ol>"
  chap.each_section do |sec|
    res << li(escape_html(sec.label))
  end
  res << "</ol>"
  return res.join("\n")
end
h1(label) click to toggle source
# File lib/review/tocprinter.rb, line 140
def h1(label)
  "<h1>#{label}</h1>"
end
h2(label) click to toggle source
# File lib/review/tocprinter.rb, line 144
def h2(label)
  "<h2>#{label}</h2>"
end
h3(label) click to toggle source
# File lib/review/tocprinter.rb, line 148
def h3(label)
  "<h3>#{label}</h3>"
end
li(content) click to toggle source
# File lib/review/tocprinter.rb, line 152
def li(content)
  "<li>#{content}</li>"
end
print_chapter_to_s(chap) click to toggle source