January 2024
Intermediate to advanced
718 pages
20h 15m
English
RDoc parses Ruby source files to extract the major elements (such as classes, modules, methods, attributes, and so on). You can choose to associate additional documentation with these by simply adding a comment block before the element in the file.
One of the design goals of RDoc was to leave the source code looking totally natural. In most cases, you don’t need any special markup in your code to get RDoc to produce decent looking documentation. For example, comment blocks can be written fairly naturally:
| | # Calculate the minimal-cost path though the graph using Debrinkski's algorithm, |
| | # with optimized inverse pruning of isolated leaf nodes. |
| | def calculate_path |
| | . . . |
| | end |
You can also use Ruby’s block-comments ...
Read now
Unlock full access