Module: MonkeyPatch::Hash

Defined in:
lib/monkey-patch/hash.rb

Instance Method Summary collapse

Instance Method Details

#symbolize_keys!Object



3
4
5
6
7
8
# File 'lib/monkey-patch/hash.rb', line 3

def symbolize_keys!
  keys.each do |key|
    self[(key.to_sym rescue key) || key] = delete(key)
  end
  self
end