Sha256: 6c3a8992f85729368e1321625c5a2e89d7d82cb5802afe76ba9d496321ecd95c

Contents?: true

Size: 207 Bytes

Versions: 142

Compression:

Stored size: 207 Bytes

Contents

class Hash
  def deep_stringify_keys
    new_hash = {}
    self.each do |key, value|
      new_hash.merge!(key.to_s => (value.is_a?(Hash) ? value.deep_stringify_keys : value))
    end
    new_hash
  end
end

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
shelly-0.5.7 lib/core_ext/hash.rb
shelly-0.5.6 lib/core_ext/hash.rb
shelly-0.5.5 lib/core_ext/hash.rb
shelly-0.5.4 lib/core_ext/hash.rb
shelly-0.5.3 lib/core_ext/hash.rb
shelly-0.5.2 lib/core_ext/hash.rb
shelly-0.5.1 lib/core_ext/hash.rb
shelly-0.5.0 lib/core_ext/hash.rb
shelly-0.4.42 lib/core_ext/hash.rb
shelly-0.4.41 lib/core_ext/hash.rb
shelly-0.4.40 lib/core_ext/hash.rb
shelly-0.4.39 lib/core_ext/hash.rb
shelly-0.4.38 lib/core_ext/hash.rb
shelly-0.4.37 lib/core_ext/hash.rb
shelly-0.4.36 lib/core_ext/hash.rb
shelly-0.4.35 lib/core_ext/hash.rb
shelly-0.4.34 lib/core_ext/hash.rb
shelly-0.4.33 lib/core_ext/hash.rb
shelly-0.4.32 lib/core_ext/hash.rb
shelly-0.4.31 lib/core_ext/hash.rb