Sha256: a84d2e922d9e94a1becfe879207951ae81c8555efa474a69c52d5a60948239b7

Contents?: true

Size: 298 Bytes

Versions: 87

Compression:

Stored size: 298 Bytes

Contents

# frozen_string_literal: true

module HTTParty
  module Utils
    def self.stringify_keys(hash)
      return hash.transform_keys(&:to_s) if hash.respond_to?(:transform_keys)

      hash.each_with_object({}) do |(key, value), new_hash|
        new_hash[key.to_s] = value
      end
    end
  end
end

Version data entries

87 entries across 86 versions & 4 rubygems

Version Path
harbr-0.1.61 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.60 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.59 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.58 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.57 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.56 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.55 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.54 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.53 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.52 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.50 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.49 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.48 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.47 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.46 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.45 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.44 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.43 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.42 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.1.41 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb