1RI(1) Ruby Programmers Reference Guide RI(1)
2
4 ri — Ruby API reference front end
5
7 ri [-Ti] [-d directory] [-f format] [--list-doc-dirs]
8 [--no-standard-docs] [--[no-]{system|site|gems|home}]
9 [--[no-]use-cache] [--width=width] [target ...]
10
12 ri is a CLI front end for the Ruby API reference. You can search and
13 read API reference for classes and methods with ri.
14
15 ri is a part of Ruby.
16
17 target can be one of the following forms:
18
19 Class for classes
20
21 Class::method for class methods
22
23 Class#method for instance methods
24
25 Class.method for both class and instance methods
26
27 method for both class and instance methods
28
29 All class names may be abbreviated to their minimum unambiguous form. If
30 a name is ambiguous, all valid options will be listed.
31
32 For example:
33
34 ri Fil
35 ri File
36 ri File.new
37 ri zip
38
39 Note that shell quoting may be required for method names containing punc‐
40 tuation:
41
42 ri 'Array.[]'
43 ri compact
44
46 --version Prints the version of ri.
47
48 -T
49 --no-pager Send output directly to stdout, rather than to a pager.
50
51 -d directory
52 --doc-dir=directory
53 List of directories from which to source documentation in
54 addition to the standard directories. May be repeated.
55
56 -f FORMAT
57 --fmt FORMAT
58 --format=FORMAT
59 Format to use when displaying output:
60
61 ansi, bs, html, plain, simple
62
63 Use 'bs' (backspace) with most pager programs. To use
64 ANSI, either disable the pager or tell the pager to allow
65 control characters.
66
67 -i
68 --interactive This makes ri go into interactive mode.
69
70 When ri is in interactive mode it will allow the user to
71 disambiguate lists of methods in case multiple methods
72 match against a method search string. It also will allow
73 the user to enter in a method name (with auto-completion,
74 if readline is supported) when viewing a class.
75
76 --list-doc-dirs
77 List the directories from which ri will source documenta‐
78 tion on stdout and exit.
79
80 --no-standard-docs
81 Do not include documentation from the Ruby standard
82 library, site_lib, installed gems, or ~/.rdoc.
83
84 Equivalent to specifying the options --no-system,
85 --no-site, --no-gems, and --no-home.
86
87 --[no-]system Include documentation from Ruby's standard library.
88 Defaults to true.
89
90 --[no-]site Include documentation from libraries installed in
91 site_lib. Defaults to true.
92
93 --[no-]gems Include documentation from RubyGems. Defaults to true.
94
95 --[no-]home Include documentation stored in ~/.rdoc. Defaults to
96 true.
97
98 --[no-]use-cache
99 Whether or not to use ri's cache. True by default.
100
101 -w width
102 --width=width Set the width of the output.
103
105 RI Additional options.
106
107 PAGER Used as the name of pager program for displaying.
108
109 HOME
110 USERPROFILE
111 HOMEPATH Path to user's home directory.
112
114 ~/.ri Caches recently referenced documents here.
115
116 ~/.rdoc Searches user-wide documents here.
117
119 ruby(1) rdoc(1) gem(1)
120
122 Security vulnerabilities should be reported via an email to
123 ⟨security@ruby-lang.org⟩. Reported problems will be published after
124 being fixed.
125
126 And you can report other bugs and feature requests via the Ruby Issue
127 Tracking System (http://bugs.ruby-lang.org). Do not report security vul‐
128 nerabilities via the system because it publishes the vulnerabilities
129 immediately.
130
132 Written by Dave Thomas ⟨dave@pragmaticprogrammer.com⟩
133
134UNIX November 7, 2012 UNIX