summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/deprecation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin/deprecation.rb')
-rw-r--r--lib/chef/mixin/deprecation.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/mixin/deprecation.rb b/lib/chef/mixin/deprecation.rb
index c90daee4f5..562af541bd 100644
--- a/lib/chef/mixin/deprecation.rb
+++ b/lib/chef/mixin/deprecation.rb
@@ -102,20 +102,20 @@ class Chef
def deprecated_attr_reader(name, alternative, level=:warn)
define_method(name) do
- Chef.log.deprecation("#{self.class}.#{name} is deprecated. Support will be removed in a future release.")
- Chef.log.deprecation(alternative)
- Chef.log.deprecation("Called from:")
- caller[0..3].each {|c| Chef.log.deprecation(c)}
+ Chef.log_deprecation("#{self.class}.#{name} is deprecated. Support will be removed in a future release.")
+ Chef.log_deprecation(alternative)
+ Chef.log_deprecation("Called from:")
+ caller[0..3].each {|c| Chef.log_deprecation(c)}
instance_variable_get("@#{name}")
end
end
def deprecated_attr_writer(name, alternative, level=:warn)
define_method("#{name}=") do |value|
- Chef.log.deprecation("Writing to #{self.class}.#{name} with #{name}= is deprecated. Support will be removed in a future release.")
- Chef.log.deprecation(alternative)
- Chef.log.deprecation("Called from:")
- caller[0..3].each {|c| Chef.log.deprecation(c)}
+ Chef.log_deprecation("Writing to #{self.class}.#{name} with #{name}= is deprecated. Support will be removed in a future release.")
+ Chef.log_deprecation(alternative)
+ Chef.log_deprecation("Called from:")
+ caller[0..3].each {|c| Chef.log_deprecation(c)}
instance_variable_set("@#{name}", value)
end
end