summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index ac6f5e8923..dca0033409 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -779,6 +779,7 @@ class Chef
def self.property(name, type=NOT_PASSED, **options)
name = name.to_sym
+ options[:instance_variable_name] = :"@#{name}" if !options.has_key?(:instance_variable_name)
options.merge!(name: name, declared_in: self)
if type == NOT_PASSED
@@ -1002,8 +1003,8 @@ class Chef
end
end
- # If state_attrs *excludes* something which is currently part of the
- # identity, mark it as identity: false.
+ # If identity_properties *excludes* something which is currently part of
+ # the identity, mark it as identity: false.
properties.each do |name,property|
if property.identity? && !names.include?(name)
self.property name, identity: false