Class: RDocF95::Generator::HTML
- Inherits:
-
Object
- Object
- RDocF95::Generator::HTML
- Includes:
- RDocF95::Generator, MarkUp
- Defined in:
- lib/rdoc-f95/generator/html.rb
Overview
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.
Defined Under Namespace
Modules: HEFSS, HTML, KILMER, ONE_PAGE_HTML
Constant Summary
Constants included from RDocF95::Generator
Class Method Summary collapse
-
.for(options) ⇒ Object
Generator may need to return specific subclasses depending on the options they are passed.
Instance Method Summary collapse
-
#generate(toplevels) ⇒ Object
Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
-
#initialize(options) ⇒ HTML
constructor
Set up a new HTML generator.
Methods included from RDocF95::Generator
Constructor Details
#initialize(options) ⇒ HTML
Set up a new HTML generator. Basically all we do here is load up the correct output temlate
69 70 71 72 |
# File 'lib/rdoc-f95/generator/html.rb', line 69 def initialize() #:not-new: @options = load_html_template end |
Class Method Details
.for(options) ⇒ Object
Generator may need to return specific subclasses depending on the options they are passed. Because of this we create them using a factory
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/rdoc-f95/generator/html.rb', line 50 def self.for() RDocF95::Generator::AllReferences.reset RDocF95::Generator::Method.reset if .all_one_file RDocF95::Generator::HTMLInOne.new else new end end |
Instance Method Details
#generate(toplevels) ⇒ Object
Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rdoc-f95/generator/html.rb', line 79 def generate(toplevels) @toplevels = toplevels @files = [] @classes = [] write_style_sheet gen_sub_directories() build_indices generate_html end |