Class: ArchiveStorage::Adapters::Metadata

Inherits:
Struct
  • Object
show all
Defined in:
lib/archive_storage/adapters/metadata.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#byte_sizeObject

Returns the value of attribute byte_size

Returns:

  • (Object)

    the current value of byte_size



5
6
7
# File 'lib/archive_storage/adapters/metadata.rb', line 5

def byte_size
  @byte_size
end

#checksumObject

Returns the value of attribute checksum

Returns:

  • (Object)

    the current value of checksum



5
6
7
# File 'lib/archive_storage/adapters/metadata.rb', line 5

def checksum
  @checksum
end

#checksum_algorithmObject

Returns the value of attribute checksum_algorithm

Returns:

  • (Object)

    the current value of checksum_algorithm



5
6
7
# File 'lib/archive_storage/adapters/metadata.rb', line 5

def checksum_algorithm
  @checksum_algorithm
end

#content_typeObject

Returns the value of attribute content_type

Returns:

  • (Object)

    the current value of content_type



5
6
7
# File 'lib/archive_storage/adapters/metadata.rb', line 5

def content_type
  @content_type
end

#etagObject

Returns the value of attribute etag

Returns:

  • (Object)

    the current value of etag



5
6
7
# File 'lib/archive_storage/adapters/metadata.rb', line 5

def etag
  @etag
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



5
6
7
# File 'lib/archive_storage/adapters/metadata.rb', line 5

def 
  @metadata
end

Instance Method Details

#multipart_etag?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/archive_storage/adapters/metadata.rb', line 14

def multipart_etag?
  etag.to_s.include?("-")
end

#safe_etag?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/archive_storage/adapters/metadata.rb', line 18

def safe_etag?
  etag && !multipart_etag?
end