Method: Chef::Node::Attribute#read!

Defined in:
lib/chef/node/attribute.rb

#read!(*path) ⇒ Object



466
467
468
469
470
471
472
473
474
# File 'lib/chef/node/attribute.rb', line 466

def read!(*path)
  if path[0].nil?
    Chef::Log.warn "Calling node.read!() without any path argument is very slow, probably a bug, and should be avoided"
    merged_attributes.read!(*path) # re-merges everything, slow edge case
  else
    self[path[0]] unless path[0].nil? # force deep_merge_cache key construction if necessary
    deep_merge_cache.read!(*path)
  end
end