class Chef::Decorator::Unchain


.keys is not legal now or ever<br>node.default.keys is legal
array… e.g.
#[] until the chain comes to an end with #[]=, so does not behave like a hash or
to call anything on the intermediate values and only supports method chaining with
it deliberately does not need or want the method_missing magic. It is not legal
While this is a decorator it is not a Decorator and does not inherit because
node.set_unless(“foo”, “bar”, “baz”)
Can become:<br><br>node.set_unless[“bar”] = “baz”
with variable args. So this:
This decorator unchains method call chains and turns them into method calls

def [](key)

def [](key)
  __path__.push(key)
  self
end

def []=(key, value)

def []=(key, value)
  __path__.push(key)
  @delegate_sd_obj.public_send(__method__, *__path__, value)
end

def initialize(obj, method)

def initialize(obj, method)
  @__path__        = []
  @__method__      = method
  @delegate_sd_obj = obj
end