Class: ActiveSupport::Deprecation::DeprecatedInstanceVariable
- Inherits:
-
Delegator
- Object
- Delegator
- ActiveSupport::Deprecation::DeprecatedInstanceVariable
- Defined in:
- lib/active_support/deprecation.rb
Instance Method Summary collapse
- #__getobj__ ⇒ Object
-
#initialize(value, method) ⇒ DeprecatedInstanceVariable
constructor
A new instance of DeprecatedInstanceVariable.
Constructor Details
#initialize(value, method) ⇒ DeprecatedInstanceVariable
Returns a new instance of DeprecatedInstanceVariable.
181 182 183 184 185 |
# File 'lib/active_support/deprecation.rb', line 181 def initialize(value, method) super(value) @method = method @value = value end |
Instance Method Details
#__getobj__ ⇒ Object
187 188 189 190 |
# File 'lib/active_support/deprecation.rb', line 187 def __getobj__ ActiveSupport::Deprecation.warn("Instance variable @#{@method} is deprecated! Call instance method #{@method} instead.") @value end |