lib/duracloud/response.rb in duracloud-client-0.6.0 vs lib/duracloud/response.rb in duracloud-client-0.7.0
- old
+ new
@@ -1,6 +1,7 @@
require "forwardable"
+require "date"
module Duracloud
class Response
extend Forwardable
@@ -40,8 +41,12 @@
header["content-md5"].first
end
def size
header["content-length"].first.to_i rescue nil
+ end
+
+ def modified
+ DateTime.parse(header["last-modified"].first) rescue nil
end
end
end