logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

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).

0.9.37                                             2025-02-04                                          YARDOC(1)

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 yarddoc 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.

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".

Name

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

Options

GeneralOptions-b, --dbFILE
           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)

       -n, --no-output
           Only generate .yardoc database, no documentation.

       -c, --use-cache [FILE]
           Use the cached .yardoc db to generate documentation (defaults to no cache)

       --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)

       --no-save
           Do not save the parsed data to the yardoc db

       --excludeREGEXP
           Ignores a file if it matches path match (regexp)

   Outputoptions--one-file
           Generates output as a single file

       --list
           List objects to standard out (implies -n)

       --no-public
           Don't show public methods. (default shows public)

       --protected
           Show protected methods. (default hides protected)

       --private
           Show private methods. (default hides private)

       --no-private
           Hide objects with @private tag

       --[no-]apiAPI
           Generates  documentation for a given API (objects which define the correct @api tag).  If --no-api is
           given, displays objects with no @api tag.

       --embed-mixins
           Embeds mixin methods into class documentation

       --embed-mixin[MODULE]
           Embeds mixin methods from a particular module into class documentation

       --no-highlight
           Don't highlight code blocks in output.

       --default-returnTYPE
           Shown if method has no return type.  (defaults to 'Object')

       --hide-void-return
           Hides return types specified as 'void'.  (default is shown)

       --queryQUERY
           Only show objects that match a specific query

       --titleTITLE
           Add a specific title to HTML documents

       -r, --readme, --mainFILE
           The readme file used as the title page of documentation.

       --filesFILE1,FILE2,...
           Any extra comma separated static files to be included (eg. FAQ)

       --assetFROM[:TO]
           A file or directory to copy over to output directory after generating

       -o, --output-dirPATH
           The output directory. (defaults to ./doc)

       -m, --markupMARKUP
           Markup style used in documentation, like textile, markdown or rdoc (defaults to rdoc).

       -MMARKUP_PROVIDER
           Overrides the library used to process markup

       --markup-provider
           formatting (specify the gem name)

       --charsetENC
           Character set to use when parsing files (default is system locale)

       -t, --templateTEMPLATE
           The template to use. (defaults to "default")

       -p, --template-pathPATH
           The template path to look for templates in.  (used with -t).

       -f, --formatFORMAT
           The output format for the template (defaults to html).

       --no-stats
           Don't print statistics

       --localeLOCALE
           The locale for generated documentation (defaults to en).

       --po-dirDIR
           The directory that has .po files (defaults to #{YARD::Registry.po_dir}).

   Tagoptions:
       (TAG:TITLE looks like: 'overload:OverloadedMethod')

       --tagTAG:TITLE
           Registers a new free-form metadata @tag

       --type-tagTAG:TITLE
           Tag with an optional types field

       --type-name-tagTAG:TITLE
           Tag with optional types and a name field

       --name-tagTAG:TITLE
           Tag with a name field

       --title-tagTAG:TITLE
           Tag with first line as title field

       --hide-tagTAG
           Hides a previously defined tag from templates

       --transitive-tagTAG
           Marks a tag as transitive

       --non-transitive-tagTAG
           Marks a tag as not transitive

   Otheroptions:-e, --loadFILE
           A Ruby script to load before running command.

       --pluginPLUGIN
           Load a YARD plugin (gem with `yard-' prefix)

       --legacy
           Use old style Ruby parser and handlers. Always on in 1.8.x.

       --safe
           Enable safe mode for this instance

       -q, --quiet
           Show no warnings.

       --verbose
           Show more information.

       --debug
           Show debugging information.

       --backtrace
           Show stack traces

       -v, --version
           Show version.

       -h, --help
           Show this help.

See Also

yard(1).

Synopsis

yarddoc [options] [source_files [- extra_files]] yarddoc [options] [source_files [- extra_files]]

See Also