-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.rbs
More file actions
76 lines (76 loc) · 2.22 KB
/
options.rbs
File metadata and controls
76 lines (76 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
%a{annotate:rdoc:skip}
module RDoc
# <!-- rdoc-file=lib/rdoc/options.rb -->
# 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.
#
class Options
def initialize: (?untyped loaded_options) -> void
end
end