Adding deprecate method. Thank you Polonium

This commit is contained in:
Bryan Helmkamp 2008-11-05 18:16:31 -05:00
parent eabc7b6c9e
commit 0addcbe430

View File

@ -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