RDoc
Encyclopedia
RDoc, designed by Dave Thomas
Dave Thomas (programmer)
Dave Thomas is a computer programmer and author/editor. He has written about Ruby.Dave and partner Andy Hunt wrote The Pragmatic Programmer and run The Pragmatic Bookshelf publishing company.Dave Thomas lives in Flower Mound, Texas...

, is an embedded documentation generator
Documentation generator
A documentation generator is a programming tool that generates documentation intended for programmers or end users , or both, from a set of specially commented source code files, and in some cases, binary files....

 for the Ruby programming language.
It analyzes Ruby source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

, generating a structured collection of pages for Ruby objects
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

 and methods
Method (computer programming)
In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

.
Code comments
Comment (computer programming)
In computer programming, a comment is a programming language construct used to embed programmer-readable annotations in the source code of a computer program. Those annotations are potentially significant to programmers but typically ignorable to compilers and interpreters. Comments are usually...

 can be added in a natural style.
RDoc is included as part of the Ruby core distribution.

RDoc produces usable documentation even if the target source code does not contain explicit comments. RDoc will still parse
Parsing
In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens , to determine its grammatical structure with respect to a given formal grammar...

 the classes, modules
Modular programming
Modular programming is a software design technique that increases the extent to which software is composed of separate, interchangeable components called modules by breaking down program functions into modules, each of which accomplishes one function and contains everything necessary to accomplish...

, and methods, and list them in the generated API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 files.

RDoc also provides the engine for creating Ruby ri data files. ri is (more or less) Ruby's version of man pages, providing access to API information from the command line
Command-line interface
A command-line interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks...

.

RDoc and ri are currently maintained by Eric Hodel and Ryan Davis.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK