Generate:
a list of RDoc::Generator::File objects for each TopLevel object.
a list of RDoc::Generator::Class objects for each first level class or module in the TopLevel objects
a complete list of all hyperlinkable terms (file, class, module, and method names)
# File rdoc/generator/html.rb, line 411 def build_indices @files, @classes = RDoc::Generator::Context.build_indices(@toplevels, @options) end
# File rdoc/generator/html.rb, line 438 def gen_into(list) res = [] list.each do |item| res << item.value_hash end res end
Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
# File rdoc/generator/html.rb, line 394 def generate(info) @toplevels = info @hyperlinks = {} build_indices generate_xml end
Generate all the HTML. For the one-file case, we generate all the information in to one big hash
# File rdoc/generator/html.rb, line 420 def generate_xml values = { 'charset' => @options.charset, 'files' => gen_into(@files), 'classes' => gen_into(@classes), 'title' => CGI.escapeHTML(@options.title), } template = RDoc::TemplatePage.new @template::ONE_PAGE if @options.op_name opfile = open @options.op_name, 'w' else opfile = $stdout end template.write_html_on(opfile, values) end