class Chef::Node::AttrArray
AttrArray¶ ↑
AttrArray is identical to Array, except that it keeps a reference to the “root” (Chef::Node::Attribute) object, and will trigger a cache invalidation on that object when mutated.
Constants
- MUTATOR_METHODS
Attributes
root[R]
Public Class Methods
new(root, data)
click to toggle source
Calls superclass method
# File lib/chef/node/attribute_collections.rb, line 74 def initialize(root, data) @root = root super(data) end
Public Instance Methods
dup()
click to toggle source
# File lib/chef/node/attribute_collections.rb, line 86 def dup Array.new(map {|e| safe_dup(e)}) end
safe_dup(e)
click to toggle source
For elements like Fixnums, true, nil…
# File lib/chef/node/attribute_collections.rb, line 80 def safe_dup(e) e.dup rescue TypeError e end