Sha256: 5fab23fdd371dcedaeb67f0f715fe0df0d8e299e8412eca6a2585200c54c2b2d

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

module NightcrawlerSwift
  class Delete < Command

    def execute path
      response = delete "#{connection.upload_url}/#{path}", headers: {accept: :json }
      [200, 201].include?(response.code)

    rescue RestClient::ResourceNotFound => e
      raise Exceptions::NotFoundError.new(e)

    rescue StandardError => e
      raise Exceptions::ConnectionError.new(e)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nightcrawler_swift-0.4.0 lib/nightcrawler_swift/commands/delete.rb