1RI(1) Ruby Programmer's Reference Guide RI(1)
2
4 ri — Ruby API reference front end
5
7 ri [-ahilTv] [-d DIRNAME] [-f FORMAT] [-w WIDTH] [--[no-]pager]
8 [--server[=PORT]] [--[no-]list-doc-dirs] [--no-standard-docs]
9 [--[no-]{system|site|gems|home}] [--[no-]profile] [--dump=CACHE]
10 [name ...]
11
13 ri is a command-line front end for the Ruby API reference. You can
14 search and read the API reference for classes and methods with ri.
15
16 ri is a part of Ruby.
17
18 name can be:
19
20 Class | Module | Module::Class
21
22 Class::method | Class#method | Class.method | method
23
24 gem_name: | gem_name:README | gem_name:History
25
26 All class names may be abbreviated to their minimum unambiguous form. If
27 a name is ambiguous, all valid options will be listed.
28
29 A ‘.’ matches either class or instance methods, while #method matches
30 only instance and ::method matches only class methods.
31
32 README and other files may be displayed by prefixing them with the gem
33 name they're contained in. If the gem name is followed by a ‘:’ all
34 files in the gem will be shown. The file name extension may be omitted
35 where it is unambiguous.
36
37 For example:
38
39 ri Fil
40 ri File
41 ri File.new
42 ri zip
43 ri rdoc:README
44
45 Note that shell quoting or escaping may be required for method names con‐
46 taining punctuation:
47
48 ri 'Array.[]'
49 ri compact\!
50
51 To see the default directories ri will search, run:
52
53 ri --list-doc-dirs
54
55 Specifying the --system, --site, --home, --gems, or --doc-dir options
56 will limit ri to searching only the specified directories.
57
58 ri options may be set in the RI environment variable.
59
60 The ri pager can be set with the RI_PAGER environment variable or the
61 PAGER environment variable.
62
64 -i
65 --[no-]interactive
66 In interactive mode you can repeatedly look up methods
67 with autocomplete.
68
69 -a
70 --[no-]all Show all documentation for a class or module.
71
72 -l
73 --[no-]list List classes ri knows about.
74
75 --[no-]pager Send output to a pager, rather than directly to stdout.
76
77 -T Synonym for --no-pager.
78
79 -w WIDTH
80 --width=WIDTH Set the width of the output.
81
82 --server[=PORT]
83 Run RDoc server on the given port. The default port
84 is 8214.
85
86 -f FORMAT
87 --format=FORMAT
88 Use the selected formatter. The default formatter is bs
89 for paged output and ansi otherwise. Valid formatters
90 are: ansi, bs, markdown, rdoc.
91
92 -h
93 --help Show help and exit.
94
95 -v
96 --version Output version information and exit.
97
98 Data source options:
99
100 --[no-]list-doc-dirs
101 List the directories from which ri will source documenta‐
102 tion on stdout and exit.
103
104 -d DIRNAME
105 --doc-dir=DIRNAME
106 List of directories from which to source documentation in
107 addition to the standard directories. May be repeated.
108
109 --no-standard-docs
110 Do not include documentation from the Ruby standard
111 library, site_lib, installed gems, or ~/.rdoc. Use with
112 --doc-dir.
113
114 --[no-]system Include documentation from Ruby's standard library.
115 Defaults to true.
116
117 --[no-]site Include documentation from libraries installed in
118 site_lib. Defaults to true.
119
120 --[no-]gems Include documentation from RubyGems. Defaults to true.
121
122 --[no-]home Include documentation stored in ~/.rdoc. Defaults to
123 true.
124
125 Debug options:
126
127 --[no-]profile
128 Run with the Ruby profiler.
129
130 --dump=CACHE Dump data from an ri cache or data file.
131
133 RI Options to prepend to those specified on the command-line.
134
135 RI_PAGER
136 PAGER Pager program to use for displaying.
137
138 HOME
139 USERPROFILE
140 HOMEPATH Path to the user's home directory.
141
143 ~/.rdoc Path for ri data in the user's home directory.
144
146 ruby(1), rdoc(1), gem(1)
147
149 · Security vulnerabilities should be reported via an email to
150 security@ruby-lang.org. Reported problems will be published after
151 being fixed.
152
153 · Other bugs and feature requests can be reported via the Ruby Issue
154 Tracking System (https://bugs.ruby-lang.org/). Do not report secu‐
155 rity vulnerabilities via this system because it publishes the vulner‐
156 abilities immediately.
157
159 Written by Dave Thomas <dave@pragmaticprogrammer.com>.
160
161UNIX April 20, 2017 UNIX