FastRI is a much improved ri (the standard tool for browsing core/stdlib/third
party Ruby documentation):
- a lot faster --- don't you hate hearing your HD moan for several seconds with plain old ri?
- better support for RI documentation in RubyGems packages
- more intelligent: configurable search strategies (case-independent, "nested exact", partial matches, etc)
- DRb-enabled: serve RI documentation to other machines in your LAN (uses a Rinda Ring to autodiscover services)
FastRI is faster than ri (read here to see what makes it so fast),
and as of 0.1.1 it's also much smarter, as it's got a configurable search
strategy that includes "nested exact", partial, "nested partial", as well as
case-insensitive modes.
Downloading
You can get FastRI here or install it via RubyGems
gem install fastri
Comparing to ri
RubyGems support
Compare this:
$ ri -T ActiveRecord::Base#toggle
More than one method matched your request. You can refine
your search by asking for information on one of:
ActiveRecord::Base#toggle, ActiveRecord::Base#toggle!,
ActiveRecord::Base#toggle, ActiveRecord::Base#toggle!,
ActiveRecord::Base#toggle, ActiveRecord::Base#toggle!,
[...]
to this:
$ fri Base#toggle
---------------------------------------------- ActiveRecord::Base#toggle
toggle(attribute)
------------------------------------------------------------------------
Turns an attribute that's currently true into false and vice
versa. Returns self.
Speed
fri is much faster than ri; here are some times measured with a cold cache:
$ time fri -f plain Array#fetch
------------------------------------------------------------ Array#fetch
array.fetch(index) -> obj
[...]
real 0m0.287s (real 0m0.127s with a hot cache)
user 0m0.048s
sys 0m0.008s
Compare to:
$ time ri -T -f plain Array#fetch
------------------------------------------------------------ Array#fetch
[...]
real 0m10.136s (real ~ 1.5s with a hot cache)
user 0m1.140s
sys 0m0.464s
Search strategies
"Nested exact"
This illustrates FastRI's ability to locate classes deep in the class
hierarchy:
Read more...
Read: FastRI 0.1.1: not only faster, also smarter than ri (the Ruby documentation browser)