Flowdock

DeprecatedObjectProxy transforms an object into a deprecated one. It takes an object, a deprecation message and optionally a deprecator. The deprecator defaults to +ActiveSupport::Deprecator+ if none is specified.

deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated")
# => #<Object:0x007fb9b34c34b0>

deprecated_object.to_s
DEPRECATION WARNING: This object is now deprecated.
(Backtrace)
# => "#<Object:0x007fb9b34c34b0>"
Show files where this class is defined (1 file)
Register or log in to add new notes.