Sha256: 2ce66d38c672356bf161b5eeb6b9b53f9dcec91df258ca60f956db1ad26fe7bc

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 Bytes

Contents

require "plate_api/request"

module PlateApi
  class DeleteRequest < Request
    def initialize(public_key, secret, path, parameters={}, custom_server=nil)
      super(public_key, secret, "DELETE", path, custom_server)

      sorted_params = parameters.to_a.sort_by{|x| x[0]}
      @url_parameters = sorted_params.map{|x| "#{x[0]}=#{x[1]}"}.join("&")
    end

    def url_path
      "#{@path}?#{@url_parameters}"
    end

    def url_parameters
      @url_parameters
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
plate_api-0.4.0 lib/plate_api/delete_request.rb