I am writing a Ruby gem. To document my code, I am using YARD. I have been using @since (see here) to mark in which gem versions methods have been added. However, I'm having a problem. In one version of my gem I had defined a method. Now, in a new version of the gem, I want to define an alias for that method. How, with YARD/RDoc, can I add @since to an alias?
I have tried this, which didn't work:
# ...
# @since 1.0.0
def my_method
# ...
end
# @since 1.1.0
alias new_method my_method
Any ideas?
You should be able to use the
@!methoddirective to accomplish this: