module Chef::Deprecation::Warnings

Public Instance Methods

add_deprecation_warnings_for(method_names) click to toggle source
Calls superclass method
# File lib/chef/deprecation/warnings.rb, line 25
def add_deprecation_warnings_for(method_names)
  method_names.each do |name|
    define_method(name) do |*args|
      message = "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef #{Chef::VERSION.to_i.next}."
      message << " Please update your cookbooks accordingly."
      Chef.deprecated(:internal_api, message)
      super(*args)
    end
  end
end