Sha256: d52205c0c51bd31bb90992880cad63149734c6648801f532058024d3c21e2451

Contents?: true

Size: 183 Bytes

Versions: 23

Compression:

Stored size: 183 Bytes

Contents

class Hash
  def symbolize_keys!
    replace(inject({}) do |hash,(key,value)|
      hash[key.to_sym] = value.is_a?(Hash) ? value.symbolize_keys! : value
      hash
    end)
  end
end

Version data entries

23 entries across 23 versions & 6 rubygems

Version Path
badboy-jabbot-0.1.0 lib/hash.rb
badboy-jabbot-0.1.1 lib/hash.rb
badboy-jabbot-0.1.2 lib/hash.rb
bjeanes-twibot-0.1.6 lib/hash.rb
bjeanes-twibot-0.1.7 lib/hash.rb
mattmueller-twibot-0.1.7.1 lib/hash.rb
jabbot-1.0.0 lib/hash.rb
jabbot-0.3.2 lib/hash.rb
jabbot-0.3.1 lib/hash.rb
jabbot-0.2.0 lib/hash.rb
chewbranca-twibot-0.1.7.5 lib/hash.rb
chewbranca-twibot-0.1.7.4 lib/hash.rb
chewbranca-twibot-0.1.7.3 lib/hash.rb
chewbranca-twibot-0.1.7.2 lib/hash.rb
jabbot-0.1.2 lib/hash.rb
twibot-0.1.1 lib/hash.rb
twibot-0.1.0 lib/hash.rb
twibot-0.1.3 lib/hash.rb
twibot-0.1.4 lib/hash.rb
twibot-0.1.6 lib/hash.rb