|
| 1 | +.\"Ruby is copyrighted by Yukihiro Matsumoto <[email protected]>. |
| 2 | +.Dd April 20, 2017 |
| 3 | +.Dt RI \&1 "Ruby Programmer's Reference Guide" |
| 4 | +.Os UNIX |
| 5 | +.Sh NAME |
| 6 | +.Nm ri |
| 7 | +.Nd Ruby API reference front end |
| 8 | +.Sh SYNOPSIS |
| 9 | +.Nm |
| 10 | +.Op Fl ahilTv |
| 11 | +.Op Fl d Ar DIRNAME |
| 12 | +.Op Fl f Ar FORMAT |
| 13 | +.Op Fl w Ar WIDTH |
| 14 | +.Op Fl - Ns Oo Cm no- Oc Ns Cm pager |
| 15 | +.Op Fl -server Ns Oo = Ns Ar PORT Oc |
| 16 | +.Op Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs |
| 17 | +.Op Fl -no-standard-docs |
| 18 | +.Op Fl - Ns Oo Cm no- Oc Ns Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc |
| 19 | +.Op Fl - Ns Oo Cm no- Oc Ns Cm profile |
| 20 | +.Op Fl -dump Ns = Ns Ar CACHE |
| 21 | +.Op Ar name ... |
| 22 | +.Sh DESCRIPTION |
| 23 | +.Nm |
| 24 | +is a command-line front end for the Ruby API reference. |
| 25 | +You can search and read the API reference for classes and methods with |
| 26 | +.Nm . |
| 27 | +.Pp |
| 28 | +.Nm |
| 29 | +is a part of Ruby. |
| 30 | +.Pp |
| 31 | +.Ar name |
| 32 | +can be: |
| 33 | +.Bl -diag -offset indent |
| 34 | +.It Class | Module | Module::Class |
| 35 | +.Pp |
| 36 | +.It Class::method | Class#method | Class.method | method |
| 37 | +.Pp |
| 38 | +.It gem_name: | gem_name:README | gem_name:History |
| 39 | +.El |
| 40 | +.Pp |
| 41 | +All class names may be abbreviated to their minimum unambiguous form. |
| 42 | +If a name is ambiguous, all valid options will be listed. |
| 43 | +.Pp |
| 44 | +A |
| 45 | +.Ql \&. |
| 46 | +matches either class or instance methods, while #method |
| 47 | +matches only instance and ::method matches only class methods. |
| 48 | +.Pp |
| 49 | +README and other files may be displayed by prefixing them with the gem name |
| 50 | +they're contained in. If the gem name is followed by a |
| 51 | +.Ql \&: |
| 52 | +all files in the gem will be shown. |
| 53 | +The file name extension may be omitted where it is unambiguous. |
| 54 | +.Pp |
| 55 | +For example: |
| 56 | +.Bd -literal -offset indent |
| 57 | +ri Fil |
| 58 | +ri File |
| 59 | +ri File.new |
| 60 | +ri zip |
| 61 | +ri rdoc:README |
| 62 | +.Ed |
| 63 | +.Pp |
| 64 | +Note that shell quoting or escaping may be required for method names |
| 65 | +containing punctuation: |
| 66 | +.Bd -literal -offset indent |
| 67 | +ri 'Array.[]' |
| 68 | +ri compact\e! |
| 69 | +.Ed |
| 70 | +.Pp |
| 71 | +To see the default directories |
| 72 | +.Nm |
| 73 | +will search, run: |
| 74 | +.Bd -literal -offset indent |
| 75 | +ri --list-doc-dirs |
| 76 | +.Ed |
| 77 | +.Pp |
| 78 | +Specifying the |
| 79 | +.Fl -system , Fl -site , Fl -home , Fl -gems , |
| 80 | +or |
| 81 | +.Fl -doc-dir |
| 82 | +options will limit |
| 83 | +.Nm |
| 84 | +to searching only the specified directories. |
| 85 | +.Pp |
| 86 | +.Nm |
| 87 | +options may be set in the |
| 88 | +.Ev RI |
| 89 | +environment variable. |
| 90 | +.Pp |
| 91 | +The |
| 92 | +.Nm |
| 93 | +pager can be set with the |
| 94 | +.Ev RI_PAGER |
| 95 | +environment variable or the |
| 96 | +.Ev PAGER |
| 97 | +environment variable. |
| 98 | +.Pp |
| 99 | +.Sh OPTIONS |
| 100 | +.Bl -tag -width "1234567890123" -compact |
| 101 | +.Pp |
| 102 | +.It Fl i |
| 103 | +.It Fl - Ns Oo Cm no- Oc Ns Cm interactive |
| 104 | +In interactive mode you can repeatedly |
| 105 | +look up methods with autocomplete. |
| 106 | +.Pp |
| 107 | +.It Fl a |
| 108 | +.It Fl - Ns Oo Cm no- Oc Ns Cm all |
| 109 | +Show all documentation for a class or module. |
| 110 | +.Pp |
| 111 | +.It Fl l |
| 112 | +.It Fl - Ns Oo Cm no- Oc Ns Cm list |
| 113 | +List classes |
| 114 | +.Nm |
| 115 | +knows about. |
| 116 | +.Pp |
| 117 | +.It Fl - Ns Oo Cm no- Oc Ns Cm pager |
| 118 | +Send output to a pager, |
| 119 | +rather than directly to stdout. |
| 120 | +.Pp |
| 121 | +.It Fl T |
| 122 | +Synonym for |
| 123 | +.Fl -no-pager . |
| 124 | +.Pp |
| 125 | +.It Fl w Ar WIDTH |
| 126 | +.It Fl -width Ns = Ns Ar WIDTH |
| 127 | +Set the width of the output. |
| 128 | +.Pp |
| 129 | +.It Fl -server Ns Oo = Ns Ar PORT Oc |
| 130 | +Run RDoc server on the given port. |
| 131 | +The default port is\~8214. |
| 132 | +.Pp |
| 133 | +.It Fl f Ar FORMAT |
| 134 | +.It Fl -format Ns = Ns Ar FORMAT |
| 135 | +Use the selected formatter. |
| 136 | +The default formatter is |
| 137 | +.Li bs |
| 138 | +for paged output and |
| 139 | +.Li ansi |
| 140 | +otherwise. |
| 141 | +Valid formatters are: |
| 142 | +.Li ansi , Li bs , Li markdown , Li rdoc . |
| 143 | +.Pp |
| 144 | +.It Fl h |
| 145 | +.It Fl -help |
| 146 | +Show help and exit. |
| 147 | +.Pp |
| 148 | +.It Fl v |
| 149 | +.It Fl -version |
| 150 | +Output version information and exit. |
| 151 | +.El |
| 152 | +.Pp |
| 153 | +Data source options: |
| 154 | +.Bl -tag -width "1234567890123" -compact |
| 155 | +.Pp |
| 156 | +.It Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs |
| 157 | +List the directories from which |
| 158 | +.Nm |
| 159 | +will source documentation on stdout and exit. |
| 160 | +.Pp |
| 161 | +.It Fl d Ar DIRNAME |
| 162 | +.It Fl -doc-dir Ns = Ns Ar DIRNAME |
| 163 | +List of directories from which to source |
| 164 | +documentation in addition to the standard |
| 165 | +directories. May be repeated. |
| 166 | +.Pp |
| 167 | +.It Fl -no-standard-docs |
| 168 | +Do not include documentation from the Ruby standard library, |
| 169 | +.Pa site_lib , |
| 170 | +installed gems, or |
| 171 | +.Pa ~/.rdoc . |
| 172 | +Use with |
| 173 | +.Fl -doc-dir . |
| 174 | +.Pp |
| 175 | +.It Fl - Ns Oo Cm no- Oc Ns Cm system |
| 176 | +Include documentation from Ruby's standard library. Defaults to true. |
| 177 | +.Pp |
| 178 | +.It Fl - Ns Oo Cm no- Oc Ns Cm site |
| 179 | +Include documentation from libraries installed in |
| 180 | +.Pa site_lib . |
| 181 | +Defaults to true. |
| 182 | +.Pp |
| 183 | +.It Fl - Ns Oo Cm no- Oc Ns Cm gems |
| 184 | +Include documentation from RubyGems. Defaults to true. |
| 185 | +.Pp |
| 186 | +.It Fl - Ns Oo Cm no- Oc Ns Cm home |
| 187 | +Include documentation stored in |
| 188 | +.Pa ~/.rdoc . |
| 189 | +Defaults to true. |
| 190 | +.El |
| 191 | +.Pp |
| 192 | +Debug options: |
| 193 | +.Bl -tag -width "1234567890123" -compact |
| 194 | +.Pp |
| 195 | +.It Fl - Ns Oo Cm no- Oc Ns Cm profile |
| 196 | +Run with the Ruby profiler. |
| 197 | +.Pp |
| 198 | +.It Fl -dump Ns = Ns Ar CACHE |
| 199 | +Dump data from an ri cache or data file. |
| 200 | +.El |
| 201 | +.Pp |
| 202 | +.Sh ENVIRONMENT |
| 203 | +.Bl -tag -width "USERPROFILE" -compact |
| 204 | +.Pp |
| 205 | +.It Ev RI |
| 206 | +Options to prepend to those specified on the command-line. |
| 207 | +.Pp |
| 208 | +.It Ev RI_PAGER |
| 209 | +.It Ev PAGER |
| 210 | +Pager program to use for displaying. |
| 211 | +.Pp |
| 212 | +.It Ev HOME |
| 213 | +.It Ev USERPROFILE |
| 214 | +.It Ev HOMEPATH |
| 215 | +Path to the user's home directory. |
| 216 | +.El |
| 217 | +.Pp |
| 218 | +.Sh FILES |
| 219 | +.Bl -tag -width "USERPROFILE" -compact |
| 220 | +.Pp |
| 221 | +.It Pa ~/.rdoc |
| 222 | +Path for ri data in the user's home directory. |
| 223 | +.Pp |
| 224 | +.El |
| 225 | +.Pp |
| 226 | +.Sh SEE ALSO |
| 227 | +.Xr ruby 1 , |
| 228 | +.Xr rdoc 1 , |
| 229 | +.Xr gem 1 |
| 230 | +.Pp |
| 231 | +.Sh REPORTING BUGS |
| 232 | +.Bl -bullet |
| 233 | +.It |
| 234 | +Security vulnerabilities should be reported via an email to |
| 235 | + |
| 236 | +Reported problems will be published after being fixed. |
| 237 | +.Pp |
| 238 | +.It |
| 239 | +Other bugs and feature requests can be reported via the |
| 240 | +Ruby Issue Tracking System |
| 241 | +.Pq Lk https://bugs.ruby-lang.org/ . |
| 242 | +Do not report security vulnerabilities |
| 243 | +via this system because it publishes the vulnerabilities immediately. |
| 244 | +.El |
| 245 | +.Sh AUTHORS |
| 246 | +Written by |
| 247 | +. An Dave Thomas Aq [email protected] . |
0 commit comments