diff options
author | Adam Edwards <adamed@opscode.com> | 2014-03-28 16:28:36 -0700 |
---|---|---|
committer | Adam Edwards <adamed@opscode.com> | 2014-03-29 00:21:13 -0700 |
commit | bada8aeb8cdac4779a0d65d4d3fd9333910fc886 (patch) | |
tree | effffe837fe7140c955b6e18f0b5ff28761892c1 /lib/chef/guard_interpreter | |
parent | dfe1ebf9bf59d02aa78c1fdef8787af1665a22fd (diff) | |
download | chef-bada8aeb8cdac4779a0d65d4d3fd9333910fc886.tar.gz |
CR feedback: move inheritance to class level, add tests for convert_boolean_true
Diffstat (limited to 'lib/chef/guard_interpreter')
-rw-r--r-- | lib/chef/guard_interpreter/resource_guard_interpreter.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/guard_interpreter/resource_guard_interpreter.rb b/lib/chef/guard_interpreter/resource_guard_interpreter.rb index 946ee2ba49..0a88d75d5c 100644 --- a/lib/chef/guard_interpreter/resource_guard_interpreter.rb +++ b/lib/chef/guard_interpreter/resource_guard_interpreter.rb @@ -92,11 +92,11 @@ class Chef def merge_inherited_attributes inherited_attributes = [] - if @parent_resource.respond_to?(:guard_inherited_attributes) - inherited_attributes = @parent_resource.send(:guard_inherited_attributes) + if @parent_resource.class.respond_to?(:guard_inherited_attributes) + inherited_attributes = @parent_resource.class.send(:guard_inherited_attributes) end - - if inherited_attributes + + if inherited_attributes && !inherited_attributes.empty? inherited_attributes.each do |attribute| if @parent_resource.respond_to?(attribute) && @resource.respond_to?(attribute) parent_value = @parent_resource.send(attribute) |