Class: Hash

Inherits:
Object show all
Defined in:
lib/ambition/core_ext.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.array_backedObject



13
14
15
# File 'lib/ambition/core_ext.rb', line 13

def self.array_backed
  Hash.new {|hsh,k| hsh[k] = [] }
end

Instance Method Details

#dup_update(hsh) ⇒ Object



17
18
19
20
# File 'lib/ambition/core_ext.rb', line 17

def dup_update hsh
  hsh.each {|k,v| self[k] = v.dup }
  self
end