summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/params_validate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin/params_validate.rb')
-rw-r--r--lib/chef/mixin/params_validate.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb
index b16df41c8e..0db058c3ab 100644
--- a/lib/chef/mixin/params_validate.rb
+++ b/lib/chef/mixin/params_validate.rb
@@ -102,8 +102,8 @@ class Chef
when Hash
validation.each do |check, carg|
check_method = "_pv_#{check}"
- if self.respond_to?(check_method, true)
- self.send(check_method, opts, key, carg)
+ if respond_to?(check_method, true)
+ send(check_method, opts, key, carg)
else
raise ArgumentError, "Validation map has unknown check: #{check}"
end
@@ -333,7 +333,7 @@ class Chef
if is_name_property
if opts[key].nil?
raise CannotValidateStaticallyError, "name_property cannot be evaluated without a resource." if self == Chef::Mixin::ParamsValidate
- opts[key] = self.instance_variable_get(:"@name")
+ opts[key] = instance_variable_get(:"@name")
end
end
end