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.
# This is my *Foo* class! class Foo # ...