HOME

TheInfoList



OR:

RDoc, designed by
Dave Thomas Dave may refer to: Film, television, and theater * Dave (film), ''Dave'' (film), a 1993 film starring Kevin Kline and Sigourney Weaver * Dave (musical), ''Dave'' (musical), a 2018 stage musical adaptation of the film * Dave (TV channel), a digital ...
, is an embedded documentation generator for the
Ruby programming language Ruby is an interpreted, high-level, general-purpose programming language which supports multiple programming paradigms. It was designed with an emphasis on programming productivity and simplicity. In Ruby, everything is an object, including p ...
. It analyzes Ruby
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
, generating a structured collection of pages for Ruby
objects Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an ...
and
methods Method ( grc, μέθοδος, methodos) literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In recent centuries it more often means a prescribed process for completing a task. It may refer to: *Scien ...
. Code comments can be added in a natural style. RDoc is included as part of the Ruby core distribution. The RDoc software and format are successors to the
Ruby Document format RD (Ruby Document) is a lightweight markup language for writing Ruby-related documents. It can be embedded in Ruby source code. RD is a traditional format. In modern Ruby, developers tend to write documents in RDoc instead of RD. Use Origin ...
(with associated software RD). RDoc can produce usable documentation even if the target source code does not contain explicit comments as it will still
parse Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term ''parsing'' comes from Lati ...
the classes,
modules Broadly speaking, modularity is the degree to which a system's components may be separated and recombined, often with the benefit of flexibility and variety in use. The concept of modularity is used primarily to reduce complexity by breaking a sy ...
, and methods, and list them in the generated
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
files. RDoc also provides the engine for creating Ruby ri data files, providing access to API information from the
command line A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
. RDoc and ri are currently maintained by Eric Hodel and Ryan Davis.


Syntax

RDoc supports four markup languages, RDoc Markup,
Markdown Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form. Markdown is ...
, tomdoc, and rdtool. Its own RDoc Markup is used by default. In RDoc Markup, special directives are enclosed in a pair of colons. For example, to indicate that a method takes arguments called and , one can write .


See also

*
Comparison of documentation generators The following tables compare general and technical information for a number of documentation generators. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the s ...


References


External links

* Chapter on RubyDoc in the Ruby Wikibook Free documentation generators {{Compu-soft-stub