class Duracloud::ChunkedContent
Public Class Methods
find(**kwargs)
click to toggle source
# File lib/duracloud/chunked_content.rb, line 4 def self.find(**kwargs) new(**kwargs).tap do |content| content.manifest end end
Public Instance Methods
chunked?()
click to toggle source
# File lib/duracloud/chunked_content.rb, line 20 def chunked? true end
manifest()
click to toggle source
# File lib/duracloud/chunked_content.rb, line 10 def manifest if @manifest.nil? @manifest = ContentManifest.find(space_id: space_id, manifest_id: content_id + MANIFEST_EXT, store_id: store_id) load_properties end @manifest end
Private Instance Methods
do_load_properties()
click to toggle source
# File lib/duracloud/chunked_content.rb, line 26 def do_load_properties if md5 if md5 != manifest.source.md5 raise MessageDigestError, "Expected MD5: {#{md5}}; DuraCloud MD5: {#{manifest.source.md5}}." end else self.md5 = manifest.source.md5 end self.properties = manifest.properties.dup self.content_type = manifest.source.content_type self.size = manifest.source.size self.modified = manifest.content.modified end