Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/zimdb/hash.rb

Instance Method Summary collapse

Instance Method Details

#symbolize_keysHash

Transforms hash keys into symbols.

Returns:

  • (Hash)

    the transformed hash



5
6
7
8
9
10
# File 'lib/zimdb/hash.rb', line 5

def symbolize_keys
  t = self.dup
  self.clear
  t.each_pair{|k, v| self[k.downcase.to_sym] = v}
  self
end