Skip to content

Commit

Permalink
Merge pull request #20282 from davydovanton/doc-proxy-wrappers
Browse files Browse the repository at this point in the history
Add documentation for DeprecatedConstantProxy#class
  • Loading branch information
Zachary Scott committed May 24, 2015
2 parents c2ded92 + f671cbe commit 53592a5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ def initialize(old_const, new_const, deprecator = ActiveSupport::Deprecation.ins
@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
Expand Down

0 comments on commit 53592a5

Please sign in to comment.