From 727e9dc18a7059f024b922b65951198ff0184fdd Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 17 Apr 2009 21:29:30 -0700 Subject: Dice up ActiveSupport::Deprecation --- activesupport/lib/active_support/core_ext/module/deprecation.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 activesupport/lib/active_support/core_ext/module/deprecation.rb (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/module/deprecation.rb b/activesupport/lib/active_support/core_ext/module/deprecation.rb new file mode 100644 index 0000000000..5a5b4e3f80 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/module/deprecation.rb @@ -0,0 +1,9 @@ +class Module + # Declare that a method has been deprecated. + # deprecate :foo + # deprecate :bar => 'message' + # deprecate :foo, :bar, :baz => 'warning!', :qux => 'gone!' + def deprecate(*method_names) + ActiveSupport::Deprecation.deprecate_methods(self, *method_names) + end +end -- cgit v1.2.3