From 69e348013bc3ce4289c5fefc29c1aacc47048c0d Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 2 Mar 2011 09:31:40 -0800 Subject: adding deprecation noticies to deprecated class cache methods --- activesupport/lib/active_support/dependencies.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 97e20bdaf4..4abeb74c45 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -557,6 +557,7 @@ module ActiveSupport #:nodoc: def get Reference.get @name end + deprecate :get end def new(name) @@ -565,6 +566,11 @@ module ActiveSupport #:nodoc: end deprecate :new + def store(name) + self[name] = name + self + end + def clear! @store.clear end @@ -575,7 +581,14 @@ module ActiveSupport #:nodoc: def ref(name) Reference.new(name) end + deprecate :ref + + # Store a reference to a class +klass+. + def reference(klass) + Reference.store klass + end + # Get the reference for class named +name+. def constantize(name) Reference.get(name) end -- cgit v1.2.3