Path: | README.org |
Last Update: | Wed Nov 02 17:10:24 JST 2005 |
This is copy from RDOC original README
See README.ja (Sorry, JAPANESE only)
This package contains Rdoc and SimpleMarkup. Rdoc is an application that produces documentation for one or more Ruby source files. We work similarly to JavaDoc, parsing the source, and extracting the definition for classes, modules, and methods (along with includes and requires). We associate with these optional documentation contained in the immediately preceding comment block, and then render the result using a pluggable output formatter. (Currently, HTML is the only supported format. Markup is a library that converts plain text into various output formats. The Markup library is used to interpret the comment blocks that Rdoc uses to document methods, classes, and so on.
This library contains two packages, rdoc itself and a text markup library, ‘markup’.
Once installed, you can create documentation using the ‘rdoc’ command (the command is ‘rdoc.bat’ under Windows)
% rdoc [options] [names...]
Type "rdoc —help" for an up-to-date option summary.
A typical use might be to generate documentation for a package of Ruby source (such as rdoc itself).
% rdoc
This command generates documentation for all the Ruby and C source files in and below the current directory. These will be stored in a documentation tree starting in the subdirectory ‘doc’.
You can make this slightly more useful for your readers by having the index page contain the documentation for the primary file. In our case, we could type
% rdoc --main rdoc/rdoc.rb
You‘ll find information on the various formatting tricks you can use in comment blocks in the documentation this generates.
RDoc uses file extensions to determine how to process each file. File names ending .rb and .rbw are assumed to be Ruby source. Files ending .c are parsed as C files. All other files are assumed to contain just SimpleMarkup-style markup (with or without leading ’#’ comment markers). If directory names are passed to RDoc, they are scanned recursively for C and Ruby source files only.
RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers. It is free software, and may be redistributed under the terms specified in the README file of the Ruby distribution.