# File ../../../../../lib/review/tocprinter.rb, line 99 def print_book(book) @out.puts '<ul class="book-toc">' book.each_part do |part| print_part(part) end @out.puts '</ul>' end
# File ../../../../../lib/review/tocprinter.rb, line 114 def print_chapter(chap) chap_node = TOCParser.chapter_node(chap) ext = chap.book.config["htmlext"] || "html" path = chap.path.sub(/\.re/, "."+ext) if chap_node.number && chap.on_CHAPS? label = "#{chap.number} #{chap.title}" else label = chap.title end @out.puts li(a_name(path, escape_html(label))) return unless print?(2) if print?(3) @out.puts chap_sections_to_s(chap_node) else @out.puts chapter_to_s(chap_node) end end
# File ../../../../../lib/review/tocprinter.rb, line 107 def print_part(part) if part.number @out.puts li(part.title) end super end