= ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ActiveSupport::Deprecation::DeprecationProxy (from /home/chedong/.local/share/rdoc) ------------------------------------------------------------------------ DeprecatedInstanceVariableProxy transforms an instance variable into a deprecated one. It takes an instance of a class, a method on that class and an instance variable. It optionally takes a deprecator as the last argument. The deprecator defaults to ActiveSupport::Deprecator if none is specified. class Example def initialize @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request) @_request = :special_request end def request @_request end def old_request @request end end example = Example.new # => #<Example:0x007fb9b31090b8 @_request=:special_request, @request=:special_request> example.old_request.to_s # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of @request.to_s (Backtrace information…) "special_request" example.request.to_s # => "special_request" ------------------------------------------------------------------------ = Class methods: new
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-29 18:22 @216.73.216.250
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)