Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#stringify_keysObject



8
9
10
11
12
13
14
# File 'lib/bok.rb', line 8

def stringify_keys
  inject({}) do |hash, (key, value)|
    value = value.stringify_keys if value.is_a?(Hash)
    hash[key.to_s] = value
    hash
  end
end