summaryrefslogtreecommitdiff
path: root/lib/chef/node/attribute_collections.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-10-07 16:47:43 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-10-25 09:29:29 -0700
commit9edd0113f2d046e051845cf1916fcf733d392791 (patch)
tree3d23e6552e610f3be6b860c487385e77c5b04cf4 /lib/chef/node/attribute_collections.rb
parentcbbc1c722a662596189a1a0b9aeee584b3482873 (diff)
downloadchef-9edd0113f2d046e051845cf1916fcf733d392791.tar.gz
rename __path to __path__ and __node to __node__lcg/node-path-tracking
consistency with Unchain here: https://github.com/chef/chef/blob/master/lib/chef/decorator/unchain.rb#L23-L24 and with SimpleDelegator: https://ruby-doc.org/stdlib-2.1.0/libdoc/delegate/rdoc/SimpleDelegator.html#method-i-__getobj__ Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/node/attribute_collections.rb')
-rw-r--r--lib/chef/node/attribute_collections.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/node/attribute_collections.rb b/lib/chef/node/attribute_collections.rb
index 412fb52a48..b01b447978 100644
--- a/lib/chef/node/attribute_collections.rb
+++ b/lib/chef/node/attribute_collections.rb
@@ -94,15 +94,15 @@ class Chef
when AttrArray
value
when Hash
- VividMash.new(value, __root)
+ VividMash.new(value, __root__)
when Array
- AttrArray.new(value, __root)
+ AttrArray.new(value, __root__)
else
value
end
end
- # needed for __path
+ # needed for __path__
def convert_key(key)
key
end
@@ -143,7 +143,7 @@ class Chef
# object.
def delete(key, &block)
- send_reset_cache(__path + [ key ])
+ send_reset_cache(__path__ + [ key ])
super
end
@@ -161,7 +161,7 @@ class Chef
def [](key)
value = super
if !key?(key)
- value = self.class.new({}, __root)
+ value = self.class.new({}, __root__)
self[key] = value
else
value
@@ -170,7 +170,7 @@ class Chef
def []=(key, value)
ret = super
- send_reset_cache(__path + [ key ])
+ send_reset_cache(__path__ + [ key ])
ret
end
@@ -209,9 +209,9 @@ class Chef
when AttrArray
value
when Hash
- VividMash.new(value, __root)
+ VividMash.new(value, __root__)
when Array
- AttrArray.new(value, __root)
+ AttrArray.new(value, __root__)
else
value
end