Reputation: 1689
The following code snipped:
# ansi console color constants
COLOR_BLACK = 0
COLOR_RED = 1
COLOR_GREEN = 2
COLOR_YELLOW = 3
COLOR_BLUE = 4
COLOR_MAGENTA = 5
COLOR_CYAN = 6
COLOR_WHITE = 7
# functional color aliases
COLOR_WARN = COLOR_YELLOW
COLOR_ALERT = COLOR_RED
COLOR_CONFIRM = COLOR_GREEN
COLOR_NOTE = COLOR_BLUE
gets reported as 10 undocumented constants. Is there a way to "comment constants by groups" in RDoc? Documenting each constant separately would be slightly idiotic, and I don't want to omit them from doc.
Upvotes: 3
Views: 162
Reputation: 1689
I got the following answer per mail from a rdoc-developer, after i suggested implementing a :constlist:
directive, that would get COLOR_BLACK = 0
simply documented as COLOR_BLACK(0):
I'll see what I can do, but I may not be able to add it to RDoc 4.0 as my time is limited.
I think I can make this work by putting the constants in a section (internally) using a separate directive that also marks them as documented for the purposes of the coverage report.
Upvotes: 0