rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Add :deprecated: and :since: directives

Open halostatue opened this issue 2 years ago • 1 comments

On ruby-core, a suggestion was made to add version information to all function documentation. I think that making it easier to do in a standardized way would be good. In my comment, I suggested a couple of directives:

  • :deprecated since:
  • :since:

I believe that :deprecated: is a better choice than :deprecated since:.

This isn’t entirely necessary, but it would make adopting this to be generated in a standard place for both web generated code and RI.

This would be used as:

# This function...
# Use #bar instead.
#
# :deprecated: 2.6
def foo(flag)
  # ...
end

# This function...
#
# :since: 3.0
def bar(enable: false)
  # ...
end

halostatue avatar Apr 24 '23 02:04 halostatue

@halostatue Thanks to file this idea. I'm +1 to this feature.

hsbt avatar Apr 24 '23 02:04 hsbt