class Chef::Node::VividMash

  • attr_accessor style element set and get are supported via method_missing
    #fetch, work as normal).
    using the element reference method, ‘[]` – other methods, such as
    in the creation of a new VividMash for that key. (This only works when
    * It auto-vivifies, that is a reference to a missing element will result
    mutated.
    belongs, and will trigger cache invalidation on that object when
    * It has a reference to the root Chef::Node::Attribute to which it
    VividMash is identical to a Mash, with a few exceptions:
    == VividMash

def [](key)

def [](key)
  value = super
  if !key?(key)
    value = self.class.new({}, __root__)
    self[key] = value
  else
    value
  end
end

def []=(key, value)

def []=(key, value)
  ret = super
  send_reset_cache(__path__, key)
  ret # rubocop:disable Lint/Void
end

def convert_key(key)

def convert_key(key)
  super
end

def convert_value(value)

attribute tree will have the correct cache invalidation behavior.
AttrArray for consistency and to ensure that the added parts of the
We override it here to convert hash or array values to VividMash or
Mash uses #convert_value to mashify values on input.
def convert_value(value)
  case value
  when VividMash, AttrArray
    value
  when Hash
    VividMash.new(value, __root__, __node__, __precedence__)
  when Array
    AttrArray.new(value, __root__, __node__, __precedence__)
  else
    value
  end
end

def delete(key, &block)

def delete(key, &block)
  send_reset_cache(__path__, key)
  super
end

def dup

def dup
  Mash.new(self)
end

def initialize(data = {})

def initialize(data = {})
  super(data)
end

def to_yaml(*opts)

def to_yaml(*opts)
  to_h.to_yaml(*opts)
end