ActiveSupport::Deprecation::MethodWrapper

module ActiveSupport::Deprecation::MethodWrapper

Public Instance Methods

deprecate_methods(target_module, *method_names) Show source

Declare that a method has been deprecated.

module Fred
  extend self

  def foo; end
  def bar; end
  def baz; end
end

ActiveSupport::Deprecation.deprecate_methods(Fred, :foo, bar: :qux, baz: 'use Bar#baz instead')
# => [:foo, :bar, :baz]

Fred.foo
# => "DEPRECATION WARNING: foo is deprecated and will be removed from Rails 4.1."