O'Reilly logo

Ruby Phrasebook by Jason Clinton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Documenting Your Ruby

During the 1.8 release cycle of Ruby, RDoc became the de facto documentation standard for the Ruby project, and eventually every core and standard library module’s documentation was ported over to it. RDoc is now included in Ruby’s standard library.

RDoc scans Ruby or C code and outputs either HTML or binary files suitable for use with the ri command. By using RDoc, your program or module can install documentation in the system, site, or user ri documentation directories just like Ruby’s own included documentation.

There are other documentation options, but nothing rivals RDoc in terms of sheer market penetration. This chapter focuses exclusively on RDoc.

Documenting Ruby Code

# This is my *Foo* class! class Foo # ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required