dkubb / yardstick

A tool for verifying YARD documentation coverage
http://wiki.github.com/dkubb/yardstick
MIT License
172 stars 22 forks source link

Default to @api private for methods on classes with `private_const`. #22

Open mbj opened 10 years ago

mbj commented 10 years ago

Reference discussion:

http://irclog.whitequark.org/rom-rb/2014-01-15#1389827648-1389828586;

limhoff-r7 commented 10 years ago

The docs for YARD say @api is transitive, so this would be inline with the behavior applied by YARD: http://rubydoc.info/gems/yard/file/docs/Tags.md#api

Note: This tag is transitive. If it is applied on a namespace (module or class), it will automatically be applied to all children objects of that namespace unless it is redefined on the child object.

backus commented 9 years ago

From http://www.rubydoc.info/gems/yard/file/docs/Tags.md#private:

[@private] should only be used to mark objects private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you can use private_constant to declare constants (like classes or modules) as private, and should be used instead of @private.

Updating this issue to read private_const since Yardstick does not support 1.8 anymore