Add method for checking if upload can be resumed

This commit is contained in:
Steven Bazyl 2012-10-04 15:31:46 -07:00
parent 3270a47fa8
commit 016689fa7c
1 changed files with 8 additions and 0 deletions

View File

@ -100,6 +100,14 @@ module Google
return @expired return @expired
end end
##
# Check if upload is resumable. That is, neither complete nor expired
#
# @return [TrueClass, FalseClass] True if upload can be resumed
def resumable?
return !(self.complete? or self.expired?)
end
## ##
# Convert to an HTTP request. Returns components in order of method, URI, # Convert to an HTTP request. Returns components in order of method, URI,
# request headers, and body # request headers, and body