Sha256: 1e4b959ed39f727597844050989b7144f1c36af84ae473d41cd3b7cc9afa7540

Contents?: true

Size: 211 Bytes

Versions: 2

Compression:

Stored size: 211 Bytes

Contents

module Support
  module ApiHelper
    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

2 entries across 2 versions & 1 rubygems

Version Path
api_pack-1.0.1 lib/api_pack/support/api_helper.rb
api_pack-1.0.0 lib/api_pack/support/api_helper.rb