Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/rango/core_ext.rb
Instance Method Summary collapse
-
#symbolize_keys ⇒ Hash
Return duplication of self with all keys non-recursively converted to symbols.
Instance Method Details
#symbolize_keys ⇒ Hash
Return duplication of self with all keys non-recursively converted to symbols
40 41 42 43 44 45 |
# File 'lib/rango/core_ext.rb', line 40 def symbolize_keys self.inject(Hash.new) do |result, array| result[array.first.to_sym] = array.last result end end |