Class: Rails::DeprecatedConstant

Inherits:
ActiveSupport::Deprecation::DeprecatedConstantProxy
  • Object
show all
Defined in:
lib/rails/deprecation.rb

Class Method Summary collapse

Class Method Details

.deprecate(old, current) ⇒ Object



5
6
7
8
9
# File 'lib/rails/deprecation.rb', line 5

def self.deprecate(old, current)
  # double assignment is used to avoid "assigned but unused variable" warning
  constant = constant = new(old, current)
  eval "::#{old} = constant"
end