123456789_123456789_123456789_123456789_123456789_

Class: ActiveSupport::Deprecation::DeprecationProxy

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: activesupport/lib/active_support/deprecation/proxy_wrappers.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(*args, **kwargs, &block) ⇒ DeprecationProxy

[ GitHub ]

  
# File 'activesupport/lib/active_support/deprecation/proxy_wrappers.rb', line 7

def self.new(*args, **kwargs, &block)
  object = args.first

  return object unless object
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(called) (private)

[ GitHub ]

  
# File 'activesupport/lib/active_support/deprecation/proxy_wrappers.rb', line 23

def method_missing(called, ...)
  warn(caller_locations, called, ...)
  target.__send__(called, ...)
end

Instance Method Details

#inspect

Don't give a deprecation warning on inspect since test/unit and error logs rely on it for diagnostics.

[ GitHub ]

  
# File 'activesupport/lib/active_support/deprecation/proxy_wrappers.rb', line 18

def inspect
  target.inspect
end