From f671cbecf45a10d78c2617b08ea01d8d4a2a2b21 Mon Sep 17 00:00:00 2001 From: Anton Davydov Date: Sun, 24 May 2015 20:38:53 +0300 Subject: [skip ci] Add documentation for DeprecatedConstantProxy#class --- activesupport/lib/active_support/deprecation/proxy_wrappers.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport/lib/active_support/deprecation/proxy_wrappers.rb') diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb index dfdb8034e5..3ff4fe95aa 100644 --- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb @@ -127,6 +127,11 @@ module ActiveSupport @deprecator = deprecator end + # Returns class of a new contstant. + # + # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) + # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') + # PLANETS.class # => Array def class target.class end -- cgit v1.2.3