Adding deprecate method. Thank you Polonium
This commit is contained in:
parent
eabc7b6c9e
commit
0addcbe430
|
@ -0,0 +1,8 @@
|
|||
class Module
|
||||
def deprecate(old_method_name, new_method_name)
|
||||
define_method old_method_name do |*args|
|
||||
warn "#{old_method_name} is deprecated. Use #{new_method_name} instead."
|
||||
__send__(new_method_name, *args)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue