Skip to content

Instantly share code, notes, and snippets.

@tmaier
Last active December 30, 2015 15:17
Show Gist options
  • Save tmaier/cea248cee04eb685e845 to your computer and use it in GitHub Desktop.
Save tmaier/cea248cee04eb685e845 to your computer and use it in GitHub Desktop.
Deprecate ruby methods
class Foo
extend Gem::Deprecate
# Does some stuff the old fashioned way.
#
# @deprecated Please use {#the_new_thing} instead
def old_method
# ...
end
deprecate :old_method, :the_new_thing, 2016, 4
# Does some stuff the cool way.
def the_new_thing
# ..
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment