Sha256: 65a0abd418e67fb97f938df0e2aecd2e15bdb79dd092d41c570af269565fb772

Contents?: true

Size: 352 Bytes

Versions: 1

Compression:

Stored size: 352 Bytes

Contents

module NightcrawlerSwift
  class Delete < Command

    def execute path
      if path.nil? or path.empty?
        raise Exceptions::ValidationError.new "Delete command requires a path parameter"
      end

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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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