Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RDoc for script without classes/procedures/objects

Tags:

ruby

rdoc

Is it possible to document ruby script, using RDoc or any other documentation generator , if it does not have any structure inside?

like image 341
Timb Avatar asked Feb 25 '26 18:02

Timb


1 Answers

RDoc was really designed to be used on code with a structure; for the kind of thing you're talking about, you might look at Rocco. (That link is also an example of Rocco-generated documentation.)

Rocco is a Ruby port of Docco, the quick-and-dirty, hundred-line-long, literate-programming-style documentation generator.

Rocco reads Ruby source files and produces annotated source documentation in HTML format. Comments are formatted with Markdown and presented alongside syntax highlighted code so as to give an annotation effect. This page is the result of running Rocco against its own source file.

like image 125
Michelle Tilley Avatar answered Feb 27 '26 10:02

Michelle Tilley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!