deprecate(*method_names)
public
Declare that a method has been deprecated.
# File activesupport/lib/active_support/deprecation.rb, line 87
def deprecate(*method_names)
options = method_names.extract_options!
method_names = method_names + options.keys
method_names.each do |method_name|
alias_method_chain(method_name, :deprecation) do |target, punctuation|
class_eval("def \#{target}_with_deprecation\#{punctuation}(*args, &block)\n::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:\#{method_name}, \#{options[method_name].inspect}), caller)\n\#{target}_without_deprecation\#{punctuation}(*args, &block)\nend\n", __FILE__, __LINE__)
end
end
end