Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/lightning/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#symbolize_keysObject

from Rails’ ActiveSupport



3
4
5
6
7
8
# File 'lib/lightning/core_extensions.rb', line 3

def symbolize_keys
  inject({}) do |options, (key, value)|
    options[(key.to_sym rescue key) || key] = value
    options
  end
end