Module: RDoc::Generator::Emerald::Options
- Defined in:
- lib/rdoc/generator/emerald/options.rb
Overview
This mixin module contains the extra options Emerald adds to the default RDoc ones. It is used in the RDoc::Generator::Emerald::setup_options method.
Class Method Summary collapse
-
.extended(options) ⇒ Object
Tells RDoc’s OptionParser about the new options when the RDoc::Options object is extended with this mixin.
Instance Method Summary collapse
-
#generate_toc ⇒ Object
Whether or not to generate a Table of Contents (ToC) for toplevel files.
-
#generate_toc=(val) ⇒ Object
Setter for #generate_toc.
Class Method Details
.extended(options) ⇒ Object
Tells RDoc’s OptionParser about the new options when the RDoc::Options object is extended with this mixin.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rdoc/generator/emerald/options.rb', line 10 def self.extended() op = .option_parser op.separator "" op.separator "Emerald generator options:" op.separator "" op.on("--[no-]generate-toc", "Enables or disables generation of the", "table of contents (ToC) for toplevel files."){|val| .generate_toc = val} end |
Instance Method Details
#generate_toc ⇒ Object
Whether or not to generate a Table of Contents (ToC) for toplevel files. Defaults to true.
Note that the mechanism is implemented in JavaScript, which has therefore to be enabled in your browser.
27 28 29 30 |
# File 'lib/rdoc/generator/emerald/options.rb', line 27 def generate_toc @generate_toc = true unless defined?(@generate_toc) @generate_toc end |
#generate_toc=(val) ⇒ Object
Setter for #generate_toc.
33 34 35 |
# File 'lib/rdoc/generator/emerald/options.rb', line 33 def generate_toc=(val) @generate_toc = val end |