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[1] instead of RD.

Use

edit

Originally, most documentation in the Ruby world, including for Ruby itself, had been written in RD. Then in 2002, much of it was converted to RDoc format. Although, the Japanese version of the Ruby Reference Manual still remains in RD format.

RD is designed to be written by hand and easily read in its raw form. Most end-users however experience it after it has been converted into HTML or man pages.

RD can be embedded in Ruby code, and pure RD files usually have the extension .rd.

Sample RD document

edit

This document is syntactically correct RD, which attempts to follow the major conventions on section naming as well.

Source HTML result

NAME

edit

RD sample - A sample RD document

SYNOPSIS

edit
here.is_a?(Piece::Of::Code)
print <<"END"
This indented block will not be scanned for formatting
codes or directives, and spacing will be preserved.
END

DESCRIPTION

edit

Here's some normal text. It includes text that is emphasized, keyboard, code-formatted, variable part, indexed, and as-is*1.

An Example List

edit
  • This is a bulleted list.
  • Here's another item.
    • Nested list item.

An ordered List

edit
  1. This is the first item
  2. second
  • Nested unordered list.
  1. start=3
  2. third
  1. Nested ordered list
  2. its second item


Here's some embedded HTML. In this block I can include images, apply styles, or do anything else I can do with HTML. RD processors that aren't outputting HTML will completely ignore it.


edit

Copyright 2005 J. Random Hacker <jrh@cpan.org>. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.

See also

edit

References

edit
  1. ^ "documentation_guide - Documentation for Ruby 3.5". docs.ruby-lang.org. Retrieved 2025-09-28.
edit
  • RDtool - Framework to translate RD document into other formats.
  • rd-draft.rd - full description of RD markup languard (in RD format)
  • rd-draft.html - full description of RD markup language (converted to HTML)


📚 Artikel Terkait di Wikipedia

Rich Text Format

The Rich Text Format (often abbreviated RTF) is a legacy proprietary document file format with published specification developed by Microsoft Corporation

List of file formats

EGT – EGT Asterisk Application Source File, EGT Universal Document ERB – Embedded Ruby, Ruby on Rails Script File E – Eiffel source EFS – EGT Forever Source

Word processor

(WP) is a device or computer program that provides for input, editing, formatting, and output of text, often with some additional features. Early word processors

RD

concept in Multiprotocol Label Switching Ruby Document format, a markup language used for documentation of Ruby programs Restrictive dermopathy Reading

Here document

such as Ruby, << is also used for input redirection, thus resulting in << being used twice if one wishes to redirect from a here document string literal

Atom (web standard)

because the official specification document stated that it was purposely frozen to ensure its stability. In June 2003, Sam Ruby set up a wiki to discuss what

Ruby character

Ruby characters or rubi characters (Japanese: ルビ; rōmaji: rubi; Korean: 루비; romaja: rubi) are small, annotative glosses that are usually placed above or

RDoc

is included as part of the Ruby core distribution. The RDoc software and format are successors to the Ruby Document format (with associated software RD)