Module: ActiveSupport::Deprecation::ClassMethods
- Included in:
- Class
- Defined in:
- lib/monetra/active_support/deprecation.rb
Instance Method Summary collapse
-
#deprecate(*method_names) ⇒ Object
Declare that a method has been deprecated.
Instance Method Details
#deprecate(*method_names) ⇒ Object
Declare that a method has been deprecated.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/monetra/active_support/deprecation.rb', line 37 def deprecate(*method_names) method_names.each do |method_name| class_eval(<<-EOS, __FILE__, __LINE__) def #{method_name}_with_deprecation(*args, &block) ::ActiveSupport::Deprecation.warn #{method_name}_without_deprecation(*args, &block) end EOS alias_method_chain(method_name, :deprecation) end end |