diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/deprecation.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/deprecation.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |