aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2015-05-24 10:49:22 -0700
committerZachary Scott <e@zzak.io>2015-05-24 10:49:22 -0700
commit53592a59595cb01169d6d16e207b1cfd25badd7a (patch)
tree93eb1c0dd3c535b794e68425644046981761ac22 /activesupport
parentc2ded92e3a49f6f7e095da5c87216ba7dfc5d15d (diff)
parentf671cbecf45a10d78c2617b08ea01d8d4a2a2b21 (diff)
downloadrails-53592a59595cb01169d6d16e207b1cfd25badd7a.tar.gz
rails-53592a59595cb01169d6d16e207b1cfd25badd7a.tar.bz2
rails-53592a59595cb01169d6d16e207b1cfd25badd7a.zip
Merge pull request #20282 from davydovanton/doc-proxy-wrappers
Add documentation for DeprecatedConstantProxy#class
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/deprecation/proxy_wrappers.rb5
1 files changed, 5 insertions, 0 deletions
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