class ActiveSupport::Deprecation::DeprecatedObjectProxy
# => “#<Object:0x007fb9b34c34b0>”
(Backtrace)
DEPRECATION WARNING: This object is now deprecated.
deprecated_object.to_s
# => #<Object:0x007fb9b34c34b0>
deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, “This object is now deprecated”, ActiveSupport::Deprecation.new)
a deprecator.
DeprecatedObjectProxy transforms an object into a deprecated one. It takes an object, a deprecation message, and
def initialize(object, message, deprecator)
def initialize(object, message, deprecator) @object = object @message = message @deprecator = deprecator end
def target
def target @object end
def warn(callstack, called, args)
def warn(callstack, called, args) @deprecator.warn(@message, callstack) end