FastRI is an alternative to the ri command-line tool (used for browsing Ruby's stdlib and third-party API docs). It is much faster, and
also allows you to offer RI lookup services over DRb. FastRI is smarter than
ri, and can find classes anywhere in the hierarchy without specifying the
"full path". FastRI can perform full-text searching. Its RubyGems support is
better than ri's, and it knows which gem a method/class definition came from.
0.2.0 introduces full-text searching and method lookup in superclasses for
core classes and modules. In case you're interested, I've described
how FastRI's (custom) full-text search engine works here
(the core takes a couple hundred lines of pure Ruby).
Getting it
FastRI can be downloaded here.
You can also install it with RubyGems:
gem install fastri
Examples
Intelligent searches
$ fri File.inject
------------------------------------------------------ Enumerable#inject
enum.inject(initial) {| memo, obj | block } => obj
enum.inject {| memo, obj | block } => obj
------------------------------------------------------------------------
Combines the elements of enum by applying the block to an
accumulator value (memo) and each element in turn.
...
Full-text search
$ fri -S HTTP request
42 hits
========================================================================
Found in system Net::HTTP
... HTTP Request Classes
... Net::HTTP::Delete
... jects belong to its own response class which indicate HTTP result
status. For details of response classes, see section 'HTTP Response
Classes'.
[...]
$ fri -S open file mode
8 hits
========================================================================
Found in system IO
... , it should be one of the operating system specific constants
(O_RDONLY, O_WRONLY, O_RDWR, O_APPEND and so on). See man open(2)
for more information.
... perating system conventions if possible. For instance, on a Windows
system the filename ``/gumby/ruby/test.rb'' will be opened as
``\gumby\ruby\test.rb''. When specifying a Windows-style filename in
a Ruby string, remember to escape the back
... I/O ports may be opened in any one of several different modes, which
are shown in this section as mode. The mode may either be a Fixnum
or
... ning of file.
... 'r' | Read-only, starts at beginning of file (default mode).
... mand line (or STDIN if no files are mentioned). ARGF provides the
methods #path and #filename to access the name of the file currently
being read.
... 'a+' | Read-write, starts at end of file if file exists,
... 'a' | Write-only, starts at end of file if file exists,
... 'w+' | Read-write, truncates existing file to zero length
... 'w' | Write-only, truncates existing file
... 'b' | (DOS/Windows only) Binary file mode (may appear with
... 'r+' | Read-write, starts at beginning of file.
... ill convert pathnames between different operating system conventions
if possible. For instance, on a Windows system the filename
``/gumby/ruby/test.rb'' will be opened as ``\gumby\ruby\test.rb''.
When specifying a Windows-style filename in a
[...]
Summary of changes since version 0.1.1 (2006-11-10)