Class | Hash |
In: |
lib/powerpack/hash/symbolize_keys.rb
|
Parent: | Object |
Converts the keys of the hash to symbols.
@return [Hash] a copy of the original hash with its keys converted to symbols. Leave nonconvertible keys untouched when symbolizing keys.
@example
{ 'one' => 1, 'two' => 2 }.symbolize_keys #=> { :one => 1, :two => 2 } { 1 => "a" }.symbolize_keys #=> { 1 => "a" }