Sha256: a5440d84b17175a40418c4e9045539d5b76ef8f96d499cf575a782f6dee5f585

Contents?: true

Size: 197 Bytes

Versions: 5

Compression:

Stored size: 197 Bytes

Contents

unless {}.respond_to? :symbolize_keys
  class Hash
    def symbolize_keys
      inject({}) do |hash, pair|
        hash[pair[0].to_sym] = pair[1]
        hash
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
riak-client-2.4.1 lib/riak/core_ext/symbolize_keys.rb
riak-client-2.4.0 lib/riak/core_ext/symbolize_keys.rb
riak-client-2.4.0.pre1 lib/riak/core_ext/symbolize_keys.rb
riak-client-2.3.2 lib/riak/core_ext/symbolize_keys.rb
riak-client-2.3.1 lib/riak/core_ext/symbolize_keys.rb