module RDoc::Generator::Emerald::Options

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.

Public Class Methods

extended(options) click to toggle source

Tells RDoc’s OptionParser about the new options when the RDoc::Options object is extended with this mixin.

# File lib/rdoc/generator/emerald/options.rb, line 9
def self.extended(options)
  op = options.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| options.generate_toc = val}
end

Public Instance Methods

generate_toc() click to toggle source

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.

# File lib/rdoc/generator/emerald/options.rb, line 26
def generate_toc
  @generate_toc = true unless defined?(@generate_toc)
  @generate_toc
end
generate_toc=(val) click to toggle source

Setter for generate_toc.

# File lib/rdoc/generator/emerald/options.rb, line 32
def generate_toc=(val)
  @generate_toc = val
end