Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/metricky/core_ext.rb
Class Method Summary collapse
Class Method Details
.deprecate_and_alias_method(new_method, old_method) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/metricky/core_ext.rb', line 2 def self.deprecate_and_alias_method(new_method, old_method) define_method(old_method) do ActiveSupport::Deprecation.warn("#{old_method} is deprecated. Use #{new_method} instead.") send(new_method) end end |