Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

2. A Quick Tour of Ruby > Ruby Documentation

Ruby Documentation

When I say "Ruby Documentation,” I am mostly referring to the documentation that is generated by RDoc (http://rdoc.sourceforge.net/), a program that extracts documentation from Ruby source files, both C and Ruby files.

The documentation is stored in comments in the source files, and encoded so that RDoc can easily find it. For example, equals signs (such as ===) on the left margin set off a heading, and indented text is formatted as code. RDoc can generate output as HTML, XML, ri (Ruby information), or Windows help (chm) files.

To view the RDoc-generated HTML documentation for Ruby, go to http://www.ruby-doc.org/core. If you have Ruby documentation installed on your system, which you likely do if you followed the installation instructions in Chapter 1, you can type something like the following at a shell prompt to get formatted documentation in return. Type:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint