~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to lib/rdoc/generator.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
require 'rdoc'
2
2
 
3
3
##
4
 
# Namespace for generators
 
4
# RDoc uses generators to turn parsed source code in the form of an
 
5
# RDoc::CodeObject tree into some form of output.  RDoc comes with the HTML
 
6
# generator RDoc::Generator::Darkfish and an ri data generator
 
7
# RDoc::Generator::RI.
 
8
#
 
9
# = Registering a Generator
 
10
#
 
11
# Generators are registered by calling RDoc::RDoc.add_generator with the class
 
12
# of the generator:
 
13
#
 
14
#   class My::Awesome::Generator
 
15
#     RDoc::RDoc.add_generator self
 
16
#   end
 
17
#
 
18
# = Adding Options to +rdoc+
 
19
#
 
20
# Before option processing in +rdoc+, RDoc::Options will call ::setup_options
 
21
# on the generator class with an RDoc::Options instance.  The generator can
 
22
# use RDoc::Options#option_parser to add command-line options to the +rdoc+
 
23
# tool.  See OptionParser for details on how to add options.
 
24
#
 
25
# You can extend the RDoc::Options instance with additional accessors for your
 
26
# generator.
 
27
#
 
28
# = Generator Instantiation
 
29
#
 
30
# After parsing, RDoc::RDoc will instantiate a generator by calling
 
31
# #initialize with an RDoc::Options instance.
 
32
#
 
33
# RDoc will then call #generate on the generator instance and pass in an Array
 
34
# of RDoc::TopLevel instances, each representing a parsed file.  You can use
 
35
# the various class methods on RDoc::TopLevel and in the RDoc::CodeObject tree
 
36
# to create your desired output format.
5
37
 
6
38
module RDoc::Generator
7
39
end