ri (Ruby Information)
Intro
ri stands for “Ruby Information”.
A command line utility (bundled together in any ruby install) that provides easy access to ruby documentation.
$ ri --help
$ ri --help | less
$ ri --help | vim -
Usage examples
If the output is large, it is possible to pipe it to a pager or even an editor for easier navigation:
$ ri Math.sin
$ ri Math | less
$ ri Math | vim -
Or dump the result to stdout while also copying it to the clipboard (in case we want to paste it somewhere):
$ ri Math | tee >(xclip -in -sel -clip)
$ ri Math | tee >(xsel -bi)
|
See Clipboard for further examples and other command line clipboard utilities. |