module RDoc # This is how you define the HTML that RDoc generates. Simply create # a file in rdoc/generators/html_templates that creates the # module RDoc::Page and populate it as described below. Then invoke # rdoc using the --template option, and # your template will be used. # # The constants defining pages use a simple templating system: # # * The templating system is passed a hash. Keys in the hash correspond # to tags on this page. The tag %abc% is looked up in the hash, # and is replaced by the corresponding hash value. # # * Some tags are optional. You can detect this using IF/ENDIF # # IF: title # The value of title is %title% # ENDIF: title # # * Some entries in the hash have values that are arrays, where each # entry in the array is itself a hash. These are used to generate # lists using the START: construct. For example, given a hash # containing # # { 'people' => [ { 'name' => 'Fred', 'age' => '12' }, # { 'name' => 'Mary', 'age' => '21' } ] # # You could generate a simple table using # # # START:people # # END:people #
%name%%age%
# # These lists can be nested to an arbitrary depth # # * the construct HREF:url:name: generates %name% # if +url+ is defined in the hash, or %name% otherwise. # # # Your file must contain the following constants # # [*FONTS*] a list of fonts to be used # [*STYLE*] a CSS section (without the START:entries %name%
END:entries } CLASS_INDEX = FILE_INDEX METHOD_INDEX = FILE_INDEX INDEX = %{ %title% <body bgcolor="white"> Sorry, RDoc currently only generates HTML using frames. </body> } ###################################################################### # # The following is used for the -1 option # CONTENTS_XML = %{ IF:description %description% ENDIF:description IF:requires

Requires:

ENDIF:requires IF:attributes

Attributes

START:attributes END:attributes
%name%%rw%%a_desc%
ENDIF:attributes IF:includes

Includes

ENDIF:includes IF:method_list

Methods

START:method_list IF:methods START:methods

%type% %category% method: %name%%params%

IF:m_desc %m_desc% ENDIF:m_desc IF:sourcecode
%sourcecode%
ENDIF:sourcecode END:methods ENDIF:methods END:method_list ENDIF:method_list } end end require 'rdoc/generators/template/html/one_page_html'