Sha256: 84271db7186d3051c6127a8f0c7055ae4725ee9cf808e44f54b2b25058a5e875

Contents?: true

Size: 1.51 KB

Versions: 166

Compression:

Stored size: 1.51 KB

Contents

= RI

+ri+ is a tool that allows Ruby documentation to be viewed on the command-line.

You can use +ri+ to look up information from either the command line or
interactively.  When you run +ri+ without any arguments it will launch in
interactive mode.  In interactive mode you can tab-complete class and method
names.

== Usage

To see information for a class, do:
  ri ClassName

For example, for the Array class, do:
  ri Array

To see information on a method on a class, do:
  ri ClassName.method

This will show both instance and class methods.  For example, the IO
class defines both IO::read and IO#read:
  ri IO.read

To see information for an instance method, do:
  ri ClassName#method_name

For example, for Array's +join+ method, do:
  ri Array#join

To see information for a class method, do:
  ri ClassName::method_name

For example, for Module's +private+ method, do:
  ri Module::private

To read documentation for all +read+ methods, do:
  ri read

== Options

+ri+ supports a variety of options, all of which can be viewed via +--help+.
Of particular interest, are:

[<tt>-f</tt>]
  Outputs ri data using the selected formatter.  You can see the available
  formatters in <tt>ri --help</tt>
[<tt>-T</tt>]
  Send output to stdout, rather than to a pager.

All options also can be specified through the +RI+ environment variable.
Command-line options always override those specified in the +RI+ environment
variable.

The +RI_PAGER+ environment variable allows you to choose a particular pager or
particular options for your pager.

Version data entries

166 entries across 142 versions & 29 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/rdoc-6.7.0/RI.rdoc
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/rdoc-6.7.0/RI.rdoc
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rdoc-6.7.0/RI.rdoc
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/rdoc-6.7.0/RI.rdoc
rdoc-6.6.3.1 RI.rdoc
rdoc-6.5.1.1 RI.rdoc
rdoc-6.4.1.1 RI.rdoc
rdoc-6.3.4.1 RI.rdoc
rdoc-6.6.2 RI.rdoc
rdoc-6.6.1 RI.rdoc
rdoc-6.6.0 RI.rdoc
rdoc-6.5.0 RI.rdoc
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/rdoc-6.4.0/RI.rdoc
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/rdoc-6.4.0/RI.rdoc
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/rdoc-6.4.0/RI.rdoc
rdoc-6.4.0 RI.rdoc
rdoc-6.3.3 RI.rdoc
rdoc-6.1.2.1 RI.rdoc
rdoc-6.3.2 RI.rdoc
gitlab-rdoc-6.3.2 RI.rdoc