Class: ActiveSupport::Deprecation::DeprecationProxy

Inherits:
Object
  • Object
show all
Defined in:
activesupport/lib/active_support/deprecation/proxy_wrappers.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(called, *args, &block) ⇒ Object (private)



25
26
27
28
# File 'activesupport/lib/active_support/deprecation/proxy_wrappers.rb', line 25

def method_missing(called, *args, &block)
  warn caller_locations, called, args
  target.__send__(called, *args, &block)
end

Class Method Details

.new(*args, &block) ⇒ Object



9
10
11
12
13
14
# File 'activesupport/lib/active_support/deprecation/proxy_wrappers.rb', line 9

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

  return object unless object
  super
end

Instance Method Details

#inspectObject

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



20
21
22
# File 'activesupport/lib/active_support/deprecation/proxy_wrappers.rb', line 20

def inspect
  target.inspect
end