You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the yard command, if the --no-api option is passed a value, then the default behavior of parsing the docs from lib/*/.rb no longer happens.
Unfortunately this seems to be a limitation in optparse that I can't get around. If optparse sees a "--no-" prefix, it cannot parse an argument afterwards (the yielded value will always be false). Therefore, when you passed --no-api foo, the optparse library was assuming foo was not part of the switch.
Digging into this, I recall what --no-api was for: the switch is specifically meant to also include untagged objects from documentation. For example, if you use --api public to opt-in to an API, YARD will still ignore any objects that are not tagged with any @api tag. You might still want public API and anything that is unspecified, so adding --api public --no-api will list all @api public objects in addition to anything that was left untagged.
It seems like what you want is the ability to opt out of specific APIs from documentation rather than in. This is not what --no-api does, and since I can't support an argument on that switch, I've added a new --hide-api option that will do just that. If you do:
$ yard --hide-api private
It would be equivalent to:
$ yard --no-api --api public --api other --api apis --api except_private
Opting out rather than opting in might make much more sense in certain cases.
When running the yard command, if the
--no-api
option is passed a value, then the default behavior of parsing the docs from lib/*/.rb no longer happens.Vs
$ yard --no-api # ... code inside lib gets documented
It appears that the value passed is treated as the file glob.
The text was updated successfully, but these errors were encountered: