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(" def \#{method_name}_with_deprecation(*args, &block)\n ::ActiveSupport::Deprecation.warn\n \#{method_name}_without_deprecation(*args, &block)\n end\n EOS\n alias_method_chain(method_name, :deprecation)\n end\nend\n", __FILE__, __LINE__) |