lsegal/yard — Issue #439: YARD swallows options when using *args
Author: joliss
Created: 2011-12-28 15:53:16+00:00
State: open

If you document options like so:

# @option options [String] :subject The subject
def method(options)
end

They show up correctly in the YARD output:

> Parameters:
> * options (Hash) — a customizable set of options
> Options Hash (options):
> * :subject (String) — The subject

But if you don't have the `options` parameter in the method signature -- commonly, if you have an `*args` parameter -- the option documentation gets dropped:

# @option options [String] :subject The subject
def method(*args)
end

> Parameters:
> options (Hash) — a customizable set of options

(This is being a real-life problem for Capybara's API documentation, since Capybara uses the `*args` pass-through technique extensively.)