Sha256: a84d2e922d9e94a1becfe879207951ae81c8555efa474a69c52d5a60948239b7

Contents?: true

Size: 298 Bytes

Versions: 85

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

85 entries across 85 versions & 3 rubygems

Version Path
httparty-0.22.0 lib/httparty/utils.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.7 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.6 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.5 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.4 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.3 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.2 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.1 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
study_line-0.2.0 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/lib/httparty/utils.rb