Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#symbolize_keysObject



3
4
5
# File 'lib/persistable/xt/hash.rb', line 3

def symbolize_keys
  inject({}) { |hash, (key, value)| hash[key.to_s.to_sym] = value; hash }
end

#symbolize_keys!Object



7
8
9
# File 'lib/persistable/xt/hash.rb', line 7

def symbolize_keys!
  replace symbolize_keys
end