class Hash

Public Instance Methods

set_deep(keypath, value) click to toggle source

The mkdir -p of []=

# File lib/noms/httpclient.rb, line 29
def set_deep(keypath, value)
    if keypath.length == 1
        self[keypath[0]] = value
    else
        self[keypath[0]] ||= Hash.new
        self[keypath[0]].set_deep(keypath[1 .. -1], value)
    end
end