I use YARD to document one of my Ruby projects. I have certain methods that I donβt want to include in the documentation, things like #inspect and #to_s that you expect to exist, and return a reasonable result.
You can hide these methods using the yardoc --no-private tag and the yardoc --no-private command line yardoc --no-private :
# @private let not document this def inspect; ...; end
However, the YARD documentation on @private explicitly states:
Note. This method is not recommended to hide undocumented or "unimportant" methods. This tag should only be used to indicate private objects when Ruby's visibility rules cannot do this.
If I use @api private instead, YARD (beautifully) tags methods with private in the documentation, but still shows them.
Is there a βlegitimateβ way to hide methods from YARD output?
source share