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”)
deprecator defaults to ActiveSupport::Deprecator
if none is specified.
takes an object, a deprecation message, and optionally a deprecator. The
DeprecatedObjectProxy transforms an object into a deprecated one. It
def initialize(object, message, deprecator = ActiveSupport::Deprecation.instance)
def initialize(object, message, deprecator = ActiveSupport::Deprecation.instance) @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