I am using yard
to generate documentation for some Ruby classes.
We can document some errors which can be raised by a method like this:
# @raise [ArgumentError] Cause 1
# @raise [ArgumentError] Cause 2
# @raise [ArgumentError] Cause 3
# @raise [ArgumentError] ...
# @raise [ArgumentError] Cause n
Is this a good way? Is there another better?
I would suggest to use
markdown
markup to designate different cases when the same exception occurs, rather thanyard
internals:Yard seems to be confused whether it meets the same “keys” in one document block, which differ by explanation only.