While looking at Yard documentation and examples sI found some tags prefixed by an exclamation mark.
I found working examples with and without exclamation marks and I wasn't able to spot the difference, so what changes when @!some-tag
is used instead of @some-tag
?
For instance this code generate the same documentation for both attr
and attr2
class Anything
# @!attribute [rw] attr
# @attribute [rw] attr2
end
On the other side, in some examples the importance of exclamation mark is underlined, so it's supposed to do something, but I can't find any documentation on its usage.
@!method Example
Both these comments in a Rails model generate new methods
# @!method with_bang(param)
scope :foo_bar, where(foo: 'bar')
# @method without_bang(param)
scope :foo_baz, where(foo: 'baz')
yard output: