Skip to content

Commit 2cf14b9

Browse files
committed
More
1 parent 2c2eab7 commit 2cf14b9

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

bin/webri

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,32 @@ parser = OptionParser.new
1111

1212
parser.version = RDoc::VERSION
1313
parser.banner = <<-BANNER
14-
Command to open the web page for Ruby documentation
15-
(page, class, module, or method).
14+
webri is a console application for accessing Ruby online HTML documentation.
1615
1716
Usage: #{parser.program_name} [options] name
1817
19-
where name specifies one or more pages, classes, modules, or methods.
18+
Argument name selects the documentation to be accessed.
2019
21-
If name specifies a single item, the page for that item is opened;
22-
if it specifies multiple items, the names of those specific items are displayed,
23-
and the user may choose among them.
20+
o If name specifies a single item, that item is selected.
21+
o If name specifies multiple items, those items are displayed.
2422
25-
The given name is converted to a Regexp, which is used to select
26-
the items for consideration.
23+
The given name is converted to a Regexp, which is used to select documentation.
2724
2825
Note that your command window may require you to escape certain characters;
2926
in particular, you may need to escape circumflex (^), dollar sign ($),
3027
and pound sign (#).
28+
3129
BANNER
3230

31+
parser.separator('Options:')
32+
parser.on('-r', '--release=STR',
33+
'Sets the target documentation release to STR.',
34+
'If not given, uses the release of the installed Ruby',
35+
"(currently #{RUBY_VERSION}).",
36+
'If given and not valid, the valid releases are displayed.',
37+
) do |release|
38+
options[:release] = release
39+
end
3340
parser.on('-h', '--help', 'Prints this help.') do
3441
puts parser
3542
exit
@@ -38,14 +45,6 @@ parser.on('-v', '--version', 'Prints the version of webri.') do
3845
puts RDoc::VERSION
3946
exit
4047
end
41-
parser.on('-r', '--release=STR',
42-
'Sets desired documentation release to STR.',
43-
"If not given, uses the release of the installed Ruby (#{RUBY_VERSION}).",
44-
'If given and not valid, the valid releases are displayed,',
45-
'and the user may choose among them.',
46-
) do |release|
47-
options[:release] = release
48-
end
4948
parser.parse!
5049

5150
error_message = case ARGV.size

0 commit comments

Comments
 (0)