Scroll to navigation

YARDOC(1) YARDOC(1)

NAME

yardoc - Ruby tool to generate documentation for the Ruby programming language

SYNOPSIS

yarddoc [options] [source_files [- extra_files]] yard doc [options] [source_files [- extra_files]]

DESCRIPTION

yard(1) is an extensible documentation generation tool for the Ruby programming language. It enables the user to generate consistent, usable documentation that can be exported to a number of formats very easily, and also supports extending for custom Ruby constructs such as custom class level definitions.

yardoc, synonym for yard doc generates the documentation from the list of source_files. If this list is omitted, "{lib,app}/**/*.rb ext/**/*.c" is used.

A base set of options can be specified by adding a .yardopts file to your base path containing all extra options separated by whitespace.

OPTIONS

General Options

Use a specified .yardoc db to load from or save to (defaults to .yardoc)
--[no-]single-db
Whether code objects should be stored to single database file (advanced)
Only generate .yardoc database, no documentation.
Use the cached .yardoc db to generate documentation (defaults to no cache)
Clear .yardoc db before parsing source.
--[no-]yardopts [FILE]
If arguments should be read from FILE (defaults to yes, FILE defaults to .yardopts)
--[no-]document
If arguments should be read from .document file (defaults to yes)
Do not save the parsed data to the yardoc db
Ignores a file if it matches path match (regexp)

Output options

Generates output as a single file
List objects to standard out (implies -n)
Don't show public methods. (default shows public)
Show protected methods. (default hides protected)
Show private methods. (default hides private)
Hide objects with @private tag
--[no-]api API
Generates documentation for a given API (objects which define the correct @api tag). If --no-api is given, displays objects with no @api tag.
Embeds mixin methods into class documentation
Embeds mixin methods from a particular module into class documentation
Don't highlight code blocks in output.
Shown if method has no return type. (defaults to 'Object')
Hides return types specified as 'void'. (default is shown)
Only show objects that match a specific query
Add a specific title to HTML documents
The readme file used as the title page of documentation.
Any extra comma separated static files to be included (eg. FAQ)
A file or directory to copy over to output directory after generating
The output directory. (defaults to ./doc)
Markup style used in documentation, like textile, markdown or rdoc (defaults to rdoc).
Overrides the library used to process markup
formatting (specify the gem name)
Character set to use when parsing files (default is system locale)
The template to use. (defaults to "default")
The template path to look for templates in. (used with -t).
The output format for the template (defaults to html).
Don't print statistics
The locale for generated documentation (defaults to en).
The directory that has .po files (defaults to #{YARD::Registry.po_dir}).

Tag options:

(TAG:TITLE looks like: 'overload:Overloaded Method')

Registers a new free-form metadata @tag
Tag with an optional types field
Tag with optional types and a name field
Tag with a name field
Tag with first line as title field
Hides a previously defined tag from templates
Marks a tag as transitive
Marks a tag as not transitive

Other options:

A Ruby script to load before running command.
Load a YARD plugin (gem with `yard-' prefix)
Use old style Ruby parser and handlers. Always on in 1.8.x.
Enable safe mode for this instance
Show no warnings.
Show more information.
Show debugging information.
Show stack traces
Show version.
Show this help.

EXAMPLES

yardoc -o "documentation/" - "FAQ" "LICENSE"

The above example outputs documentation for files in "lib/**/*.rb" to "documentation/" including the extra files "FAQ" and "LICENSE".

SEE ALSO

yard(1).

AUTHORS

yard has been developed by Loren Segal <lsegal@soen.ca>.

This manual page has been written for the Debian Project by Cédric Boutillier (but may used by others).

2024-03-03 0.9.36