|
1 | 1 | %a{annotate:rdoc:skip} |
2 | 2 | module RDoc |
| 3 | + # <!-- rdoc-file=lib/rdoc/options.rb --> |
| 4 | + # RDoc::Options handles the parsing and storage of options |
| 5 | + # |
| 6 | + # ## Saved Options |
| 7 | + # |
| 8 | + # You can save some options like the markup format in the `.rdoc_options` file |
| 9 | + # in your gem. The easiest way to do this is: |
| 10 | + # |
| 11 | + # rdoc --markup tomdoc --write-options |
| 12 | + # |
| 13 | + # Which will automatically create the file and fill it with the options you |
| 14 | + # specified. |
| 15 | + # |
| 16 | + # The following options will not be saved since they interfere with the user's |
| 17 | + # preferences or with the normal operation of RDoc: |
| 18 | + # |
| 19 | + # * `--coverage-report` |
| 20 | + # * `--dry-run` |
| 21 | + # * `--encoding` |
| 22 | + # * `--force-update` |
| 23 | + # * `--format` |
| 24 | + # * `--pipe` |
| 25 | + # * `--quiet` |
| 26 | + # * `--template` |
| 27 | + # * `--verbose` |
| 28 | + # |
| 29 | + # ## Custom Options |
| 30 | + # |
| 31 | + # Generators can hook into RDoc::Options to add generator-specific command line |
| 32 | + # options. |
| 33 | + # |
| 34 | + # When `--format` is encountered in ARGV, RDoc calls ::setup_options on the |
| 35 | + # generator class to add extra options to the option parser. Options for custom |
| 36 | + # generators must occur after `--format`. `rdoc --help` will list options for |
| 37 | + # all installed generators. |
| 38 | + # |
| 39 | + # Example: |
| 40 | + # |
| 41 | + # class RDoc::Generator::Spellcheck |
| 42 | + # RDoc::RDoc.add_generator self |
| 43 | + # |
| 44 | + # def self.setup_options rdoc_options |
| 45 | + # op = rdoc_options.option_parser |
| 46 | + # |
| 47 | + # op.on('--spell-dictionary DICTIONARY', |
| 48 | + # RDoc::Options::Path) do |dictionary| |
| 49 | + # rdoc_options.spell_dictionary = dictionary |
| 50 | + # end |
| 51 | + # end |
| 52 | + # end |
| 53 | + # |
| 54 | + # Of course, RDoc::Options does not respond to `spell_dictionary` by default so |
| 55 | + # you will need to add it: |
| 56 | + # |
| 57 | + # class RDoc::Options |
| 58 | + # |
| 59 | + # ## |
| 60 | + # # The spell dictionary used by the spell-checking plugin. |
| 61 | + # |
| 62 | + # attr_accessor :spell_dictionary |
| 63 | + # |
| 64 | + # end |
| 65 | + # |
| 66 | + # ## Option Validators |
| 67 | + # |
| 68 | + # OptionParser validators will validate and cast user input values. In addition |
| 69 | + # to the validators that ship with OptionParser (String, Integer, Float, |
| 70 | + # TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), RDoc::Options |
| 71 | + # adds Path, PathArray and Template. |
| 72 | + # |
3 | 73 | class Options |
4 | 74 | def initialize: (?untyped loaded_options) -> void |
5 | 75 | end |
|
0 commit comments