[null, null, {"document_url": "https://yardoc.org/index.html", "unformatted_src": "images/Preview-64.png", "src": "https://yardoc.org/images/Preview-64.png", "formatted_filename": "Preview"}, null, {"document_url": "https://yardoc.org/index.html", "unformatted_src": "images/Certificate-64.png", "src": "https://yardoc.org/images/Certificate-64.png", "formatted_filename": "Certificate"}, null, {"document_url": "https://yardoc.org/index.html", "unformatted_src": "images/Paint-64.png", "src": "https://yardoc.org/images/Paint-64.png", "formatted_filename": "Paint"}, null, {"document_url": "https://yardoc.org/index.html", "unformatted_src": "images/Tool-64.png", "src": "https://yardoc.org/images/Tool-64.png", "formatted_filename": "Tool"}, null, {"document_url": "https://yardoc.org/index.html", "unformatted_src": "images/Magenta-Seat-256.png", "src": "https://yardoc.org/images/Magenta-Seat-256.png", "formatted_filename": "Magenta Seat"}, null]
Latest Release What's New - README Preview As You Document

With the new dynamic documentation server in YARD 0.6, you can now see exactly what YARD sees as you document your code. Simply type yard server --reload to have your project watch for changes in your codebase everytime you refresh the page. With this functionality, you almost have no excuse not to write documentation! Support Your Own DSL

You can write all kinds of extensions in YARD, including ones that can understand all of the dynamic magic your framework does in its own little Domain Specific Languages (DSLs). Most importantly, it's really easy to do! There are already plugins that support frameworks like RSpec, DataMapper, Sinatra, and support for others are in the works. Easily Customize Templates

YARD is the only Ruby documentation tool that supports storing metadata alongside your documentation. This metadata can be used to create consistent documentation in any format you wish. YARD also comes with a powerful templating system to quickly modify existing templates. And for the simple case, you can even add custom metadata to your docs with nothing but the command-line. Extend, Extend, Extend!

YARD already has a handful of really great extensions, and that number is growing every day. YARD has tools to check your documentation quality (and coverage), run inline RSpec tests, test your documentation example code, add "git blame" support to your source listings, graphs to your documentation, even one to document Perl code!

What Is YARD? YARD is a 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. Above is a highlight of the some of YARD's notable features.

And of course YARD comes with much more functionality, including the ability to serve documentation for gems, the ability to group methods into logical sections, and much more. You can read about all of the new features in YARD 0.6 in the What's New document.

Installing & Using

To install YARD with RubyGems:

And see all the commands:

Who Uses YARD?

YARD is used in a wide variety of projects including personal ones that we don't know about, but here are some projects that we know do:

Addressable, Amp, CRM114.rb, DataMapper, Dia, Haml, lightning, MongoDB, nanoc, Ohm, Puppet, Ronin, Sass, Spidr, thoughtbot, vanity. A full list can be found here.

YARD also runs a live documentation server for the community, hosting docs for all RubyGems and Github projects. The project is at RubyDoc.info (formerly rdoc.info)

Contributing & Support

If you're interested in helping out, you can use the following methods to get in touch:

Copyright © 2007-2016. YARD is written by Loren Segal. Design by gnuu.org. YARD uses the MIT License.