class TusClient::OffsetResponse

Parses the response from an OffsetRequest

Surfacing important info:

Public Class Methods

new(response) click to toggle source
# File lib/tusc/offset_response.rb, line 9
def initialize(response)
  @response = response
end

Public Instance Methods

offset() click to toggle source
# File lib/tusc/offset_response.rb, line 13
def offset
  raw.header['Upload-Offset'].to_i # nil.to_i == 0
end
success?() click to toggle source
# File lib/tusc/offset_response.rb, line 17
def success?
  status_code == 204 && (offset >= 0)
end