1##
2# RDoc uses generators to turn parsed source code in the form of an
3# RDoc::CodeObject tree into some form of output.  RDoc comes with the HTML
4# generator RDoc::Generator::Darkfish and an ri data generator
5# RDoc::Generator::RI.
6#
7# == Registering a Generator
8#
9# Generators are registered by calling RDoc::RDoc.add_generator with the class
10# of the generator:
11#
12#   class My::Awesome::Generator
13#     RDoc::RDoc.add_generator self
14#   end
15#
16# == Adding Options to +rdoc+
17#
18# Before option processing in +rdoc+, RDoc::Options will call ::setup_options
19# on the generator class with an RDoc::Options instance.  The generator can
20# use RDoc::Options#option_parser to add command-line options to the +rdoc+
21# tool.  See RDoc::Options@Custom+Options for an example and see OptionParser
22# for details on how to add options.
23#
24# You can extend the RDoc::Options instance with additional accessors for your
25# generator.
26#
27# == Generator Instantiation
28#
29# After parsing, RDoc::RDoc will instantiate a generator by calling
30# #initialize with an RDoc::Store instance and an RDoc::Options instance.
31#
32# The RDoc::Store instance holds documentation for parsed source code.  In
33# RDoc 3 and earlier the RDoc::TopLevel class held this data.  When upgrading
34# a generator from RDoc 3 and earlier you should only need to replace
35# RDoc::TopLevel with the store instance.
36#
37# RDoc will then call #generate on the generator instance.  You can use the
38# various methods on RDoc::Store and in the RDoc::CodeObject tree to create
39# your desired output format.
40
41module RDoc::Generator
42
43  autoload :Markup,   'rdoc/generator/markup'
44
45  autoload :Darkfish,  'rdoc/generator/darkfish'
46  autoload :JsonIndex, 'rdoc/generator/json_index'
47  autoload :RI,        'rdoc/generator/ri'
48
49end
50
51