Reputation: 115
In RDoc, is there any way to show constant comments? I would like to comment a constant in a project of mine but and realizing that they dont show up in the RDoc output. I checked documentation which is likely to have comments for their constants, but never saw any (http://www.ruby-doc.org/core/classes/Math.html).
It's possible that they show the implementation next to the constant as assume that is self-explanatory, but it seems that comments would also be helpful.
Upvotes: 0
Views: 632
Reputation: 2427
It works fine for me by just adding a comment above the constant line. Have you tried putting your code and related constants in a module?
I think the reason the documentation for the Math module doesn't have comments for constants is because it is a C module under the hood.
Upvotes: 1