Slide 14
Slide 14 text
module ActiveSupport
module Deprecation
class DeprecationProxy
instance_methods.each do |m|
undef_method m unless m =~ /^__|^object_id$/
end
def method_missing(called, *args, &block)
warn caller, called, args
target.__send__(called, *args, &block)
end
end
class DeprecatedInstanceVariableProxy < DeprecationProxy
def target
@instance.__send__(@method)
end
end
end
end