In Files

  • rdoc/generator/html.rb
  • rdoc/generator/html/common.rb
  • rdoc/generator/html/frameless.rb
  • rdoc/generator/html/hefss.rb
  • rdoc/generator/html/html.rb
  • rdoc/generator/html/kilmer.rb
  • rdoc/generator/html/kilmerfactory.rb
  • rdoc/generator/html/one_page_html.rb

Files

Class/Module Index [+]

Quicksearch

RDoc::Generator::HTML

We're responsible for generating all the HTML files from the object tree defined in code_objects.rb. We generate:

files

an html file for each input file given. These input files appear as objects of class TopLevel

classes

an html file for each class or module encountered. These classes are not grouped by file: if a file contains four classes, we'll generate an html file for the file itself, and four html files for the individual classes.

indices

we generate three indices for files, classes, and methods. These are displayed in a browser like window with three index panes across the top and the selected description below

Method descriptions appear in whatever entity (file, class, or module) that contains them.

We generate files in a structure below a specified subdirectory, normally doc.

opdir
   |
   |___ files
   |       |__  per file summaries
   |
   |___ classes
           |__ per class/module descriptions

HTML is generated using the Template class.

Public Class Methods

for(options) click to toggle source

Generator may need to return specific subclasses depending on the options they are passed. Because of this we create them using a factory

 
               # File rdoc/generator/html.rb, line 49
def self.for(options)
  RDoc::Generator::AllReferences.reset
  RDoc::Generator::Method.reset

  if options.all_one_file
    RDoc::Generator::HTMLInOne.new options
  else
    new options
  end
end
            

Public Instance Methods

generate(toplevels) 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 78
def generate(toplevels)
  @toplevels  = toplevels
  @files      = []
  @classes    = []

  write_style_sheet
  gen_sub_directories
  build_indices
  generate_html
end
            

Protected Instance Methods

initialize(options) click to toggle source

Set up a new HTML generator. Basically all we do here is load up the correct output temlate

 
               # File rdoc/generator/html.rb, line 68
def initialize(options) #:not-new:
  @options = options
  load_html_template
end