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 # ...
Get Ruby Phrasebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.