Add method for checking if upload can be resumed

This commit is contained in:
Steven Bazyl committed 2012-10-10 14:28:46 -06:00
1 parent e88dabaf4c
commit 000fedfbfb
1 file changed
+8
+8
View File
@@ -100,6 +100,14 @@ module Google
return @expired
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,
# request headers, and body