Module: SmartCampus::Utils

Defined in:
lib/smart_campus/utils.rb

Class Method Summary collapse

Class Method Details

.stringify_keys(hash) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/smart_campus/utils.rb', line 3

def self.stringify_keys(hash)
  new_hash = {}
  hash.each do |key, value|
    new_hash[(key.to_s rescue key) || key] = value
  end
  new_hash
end