Ruby Quicktips Logo

Ruby Quicktips

Random Ruby and Rails tips.
This blog is dedicated to deliver short, interesting and practical tidbits of the Ruby language and Ruby on Rails framework. Read more...

Your submissions are more than welcome!
Jan 5 ’12

ri: Ruby Interactive documentation

ri stands for “Ruby Interactive” and provides documentation on Ruby itself and most gems. You access it from the command line.

Here are some samples:

ri Array
ri select
ri Hash#select
ri Array#select
ri ActiveRecord::Base
ri -l #lists all classes with ri docs

(If you want to access the RDoc documentation, there’s a tip for that, too: Easy Access to the API Docs for Gems.)

13 notes 0 comments

  1. jaredengler reblogged this from rubyquicktips
  2. rubyquicktips posted this

Comments

You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.

blog comments powered by Disqus