Class: Chef::Node::AttrArray
- Defined in:
- lib/chef/node/attribute_collections.rb
Overview
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.
Constant Summary collapse
- MUTATOR_METHODS =
[ :<<, :[]=, :clear, :collect!, :compact!, :default=, :default_proc=, :delete, :delete_at, :delete_if, :fill, :flatten!, :insert, :keep_if, :map!, :merge!, :pop, :push, :update, :reject!, :reverse!, :replace, :select!, :shift, :slice!, :sort!, :sort_by!, :uniq!, :unshift ]
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #dup ⇒ Object
-
#initialize(root, data) ⇒ AttrArray
constructor
A new instance of AttrArray.
Constructor Details
Instance Attribute Details
Instance Method Details
#dup ⇒ Object
79 80 81 |
# File 'lib/chef/node/attribute_collections.rb', line 79 def dup Array.new(map {|e| e.dup}) end |