Sha256: b7f32451882072373a103dbd13a2653f2e43692bc1dc3047b6bf004dfd10736b

Contents?: true

Size: 208 Bytes

Versions: 6

Compression:

Stored size: 208 Bytes

Contents

module Support
  module Helper
    def to_query_api(params)
      query = params.collect do |key, value|
        "#{key}=#{value}"
      end.compact

      query.sort!
      query.join("&")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
api_pack-1.3.1 lib/api_pack/support/helper.rb
api_pack-1.2.1 lib/api_pack/support/helper.rb
api_pack-1.1.4 lib/api_pack/support/helper.rb
api_pack-1.1.3 lib/api_pack/support/helper.rb
api_pack-1.1.2 lib/api_pack/support/helper.rb
api_pack-1.1.1 lib/api_pack/support/helper.rb