See https://medium.com/it-me/deprecating-methods-in-ruby-e679c45ceeef#.etzmkdgn6 on "Deprecating methods in ruby"
Last active
December 30, 2015 15:17
-
-
Save tmaier/cea248cee04eb685e845 to your computer and use it in GitHub Desktop.
Deprecate ruby methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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