RDoc::Options - ri - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


RDoc::Options
RDoc::Options < Object Constants: Class methods: Instance methods: Attributes:
= RDoc::Options < Object

(from gem rdoc-7.2.0)
------------------------------------------------------------------------
RDoc::Options handles the parsing and storage of options

== Saved Options

You can save some options like the markup format in the .rdoc_options
file in your gem.  The easiest way to do this is:

  rdoc --markup tomdoc --write-options

Which will automatically create the file and fill it with the options
you specified.

The following options will not be saved since they interfere with the
user's preferences or with the normal operation of RDoc:

* --coverage-report
* --dry-run
* --encoding
* --force-update
* --format
* --pipe
* --quiet
* --template
* --verbose

== Custom Options

Generators can hook into RDoc::Options to add generator-specific command
line options.

When --format is encountered in ARGV, RDoc calls ::setup_options on the
generator class to add extra options to the option parser.  Options for
custom generators must occur after --format.  rdoc --help will list
options for all installed generators.

Example:

  class RDoc::Generator::Spellcheck
    RDoc::RDoc.add_generator self

    def self.setup_options rdoc_options
      op = rdoc_options.option_parser

      op.on('--spell-dictionary DICTIONARY',
            RDoc::Options::Path) do |dictionary|
        rdoc_options.spell_dictionary = dictionary
      end
    end
  end

Of course, RDoc::Options does not respond to spell_dictionary by default
so you will need to add it:

  class RDoc::Options

    ##
    # The spell dictionary used by the spell-checking plugin.

    attr_accessor :spell_dictionary

  end

== Option Validators

OptionParser validators will validate and cast user input values.  In
addition to the validators that ship with OptionParser (String, Integer,
Float, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.),
RDoc::Options adds Path, PathArray and Template.
------------------------------------------------------------------------
= Constants:

DEFAULT_EXCLUDE:
  [not documented]

DEPRECATED:
  The deprecated options.

Directory:
  Option validator for OptionParser that matches a directory that exists
  on the filesystem.

Path:
  Option validator for OptionParser that matches a file or directory
  that exists on the filesystem.

PathArray:
  Option validator for OptionParser that matches a comma-separated list
  of files or directories that exist on the filesystem.

SPECIAL:
  RDoc options ignored (or handled specially) by --write-options

Template:
  Option validator for OptionParser that matches a template directory
  for an installed generator that lives in
  "rdoc/generator/template/#{template_name}"


= Class methods:

  load_options

= Instance methods:

  apply_default_exclude
  autolink_excluded_words
  canonical_root
  charset
  check_files
  check_generator
  class_module_path_prefix
  coverage_report
  default_title=
  dry_run
  embed_mixins
  encoding
  exclude
  file_path_prefix
  files
  finish
  finish_page_dir
  footer_content
  force_output
  force_update
  formatter
  generator
  generator_descriptions
  generator_options
  hyperlink_all
  line_numbers
  locale
  locale_dir
  main_page
  markup
  op_dir
  option_parser
  output_decoration
  page_dir
  parse
  pipe
  quiet
  quiet=
  rdoc_include
  root
  sanitize_path
  setup_generator
  show_hash
  skip_tests
  static_path
  tab_width
  template
  template_dir
  template_dir_for
  template_stylesheets
  title
  update_output_dir
  verbosity
  visibility
  visibility=
  warn
  warn_missing_rdoc_ref
  webcvs
  write_options

= Attributes:

  attr_accessor autolink_excluded_words
  attr_accessor canonical_root
  attr_accessor charset
  attr_accessor class_module_path_prefix
  attr_accessor coverage_report
  attr_accessor dry_run
  attr_accessor embed_mixins
  attr_accessor encoding
  attr_accessor file_path_prefix
  attr_accessor files
  attr_accessor footer_content
  attr_accessor force_output
  attr_accessor force_update
  attr_accessor formatter
  attr_accessor generator
  attr_accessor generator_options
  attr_accessor hyperlink_all
  attr_accessor line_numbers
  attr_accessor locale
  attr_accessor locale_dir
  attr_accessor main_page
  attr_accessor markup
  attr_accessor op_dir
  attr_accessor option_parser
  attr_accessor output_decoration
  attr_accessor page_dir
  attr_accessor pipe
  attr_accessor rdoc_include
  attr_accessor root
  attr_accessor show_hash
  attr_accessor skip_tests
  attr_accessor static_path
  attr_accessor tab_width
  attr_accessor template
  attr_accessor template_dir
  attr_accessor template_stylesheets
  attr_accessor title
  attr_accessor update_output_dir
  attr_accessor verbosity
  attr_accessor warn_missing_rdoc_ref
  attr_accessor webcvs
  attr_reader apply_default_exclude
  attr_reader visibility
  attr_writer exclude


Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:16 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top