In Files

  • rdoc/generator/html.rb

Files

Class/Module Index [+]

Quicksearch

RDoc::Generator::HTMLInOne

Public Class Methods

new(*args) click to toggle source
 
               # File rdoc/generator/html.rb, line 385
def initialize(*args)
  super
end
            

Public Instance Methods

build_indices() click to toggle source

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
            
gen_into(list) click to toggle source
 
               # File rdoc/generator/html.rb, line 438
def gen_into(list)
  res = []
  list.each do |item|
    res << item.value_hash
  end
  res
end
            
generate(info) click to toggle source

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_xml() click to toggle source

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
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus