yard
YARD is a Ruby Documentation tool. The Y stands for "Yay!"
YARD is a tool that reads your Ruby source code and comments, then generates clean, searchable HTML documentation websites showing all your classes and methods.
YARD is a documentation generation tool for the Ruby programming language. It reads your source code and the comments you write alongside it, then turns that into clean, organized, searchable documentation — the kind you see when you look up how a library or API works. If you've ever browsed a website listing all the methods and classes in a codebase, this is the tool that builds those pages.
At its core, you write special annotations in your code comments — things like @param to describe what a method accepts and @return to describe what it gives back. YARD parses those, figures out the structure of your classes and methods, and outputs HTML, a local searchable site, or even raw data you can feed into other tools. It also plays nicely with older Ruby documentation conventions (RDoc), so existing projects can adopt it without rewriting everything.
Who uses it? Ruby developers who want to ship good documentation alongside their code. If you're building a gem (a Ruby library) that other people will depend on, YARD gives your users a clean reference site. If you're working on a larger internal codebase, it helps teammates look up what a method does, what types it expects, and what it returns — without reading the implementation. It also ships with a local server that live-reloads as you write docs, so you can preview changes instantly.
A few things stand out. YARD is built to be extensible — if your codebase uses custom patterns that standard tools wouldn't understand, you can write plugins to teach YARD how to document them. It also lets you filter what gets documented (public vs. private API), generate class diagrams, and query your documentation with simple expressions. The project has been around since 2007, so it's mature and battle-tested in the Ruby ecosystem.
Where it fits
- Generate a documentation website for a Ruby gem that other developers can browse.
- Document an internal codebase so teammates can look up methods and classes without reading source code.
- Preview documentation changes live as you write comments using the built-in local server.
- Filter documentation to show only public API while keeping internal methods private.