LinuxCommandLibrary

yard

Ruby documentation generator

TLDR

Generate docs

$ yard doc
copy
Start server
$ yard server
copy
List undocumented
$ yard stats --list-undoc
copy
Generate for gems
$ yard gems
copy
Show documentation
$ yard ri [ClassName]
copy

SYNOPSIS

yard command [options]

DESCRIPTION

yard (Yay! A Ruby Documentation Tool) generates API documentation from Ruby source code. It parses specially formatted comments above classes, modules, and methods to produce browsable HTML documentation with cross-references and search.
YARD uses its own tag syntax (such as @param, @return, @example) within comments to describe method signatures, return types, and usage examples. It also supports Markdown and other markup formats for free-form documentation within comments.
The server subcommand starts a local web server for live documentation browsing during development. The stats subcommand reports documentation coverage, and --list-undoc identifies undocumented code. Templates control the HTML output layout and can be customized or replaced entirely.

PARAMETERS

doc

Generate docs.
server
Start server.
stats
Show statistics.
gems
Document gems.
ri
Show documentation.
--list-undoc
Undocumented items.

CAVEATS

Ruby-specific. YARD syntax in comments. Gem required.

HISTORY

YARD (Yay! A Ruby Documentation Tool) was created as a modern replacement for RDoc.

SEE ALSO

rdoc(1), ri(1), ruby(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community