Sha256: 8a2954b6df8da2cbbb4f71b727e6728f78e35bf38a333822fa8ba87b2ff09b75

Contents?: true

Size: 385 Bytes

Versions: 4

Compression:

Stored size: 385 Bytes

Contents

module Bing
  module Ads
    class Utils
      class << self
        def camelcase_keys(object)
          object.each_with_object({}) do |(k, v), obj|
            obj[k.to_s.camelcase] = v
          end
        end

        def sort_keys(object)
          object = Hash[ object.sort_by { |key, val| key.to_s } ]
          object.symbolize_keys!
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bing-ads-0.1.4 lib/bing/ads/utils.rb
bing-ads-0.1.3 lib/bing/ads/utils.rb
bing-ads-0.1.2 lib/bing/ads/utils.rb
bing-ads-0.1.0 lib/bing/ads/utils.rb