Module: Merritt::Manifest::File
- Defined in:
- lib/merritt/manifest/file.rb
Overview
A marker interface for file-like objects. Each field may or may not be relevant to a given manifest format.
Instance Attribute Summary collapse
-
#file_last_modified ⇒ nil, DateTime
readonly
Date and time the file was last modified.
-
#file_name ⇒ nil, String
readonly
The file name.
-
#file_size ⇒ nil, Integer
readonly
The file size in bytes.
-
#file_url ⇒ nil, URI
readonly
The URL at which to retrieve the file.
-
#hash_algorithm ⇒ nil, String
readonly
The hash algorithm used to hash the file.
-
#hash_value ⇒ nil, String
readonly
The hash value.
-
#mime_type ⇒ nil, MIME::Type
readonly
The mime type.
Instance Attribute Details
#file_last_modified ⇒ nil, DateTime (readonly)
Returns date and time the file was last modified. Note that according to the Merritt Ingest Service docs, “modification time field SHOULD NOT be specified, and will be ignored if provided.”.
23 24 25 |
# File 'lib/merritt/manifest/file.rb', line 23 def file_last_modified @file_last_modified end |
#file_name ⇒ nil, String (readonly)
Returns the file name. If not present, will be inferred from #file_url.
27 28 29 |
# File 'lib/merritt/manifest/file.rb', line 27 def file_name @file_name end |
#file_size ⇒ nil, Integer (readonly)
Returns the file size in bytes.
18 19 20 |
# File 'lib/merritt/manifest/file.rb', line 18 def file_size @file_size end |
#file_url ⇒ nil, URI (readonly)
Returns the URL at which to retrieve the file.
9 10 11 |
# File 'lib/merritt/manifest/file.rb', line 9 def file_url @file_url end |
#hash_algorithm ⇒ nil, String (readonly)
Returns the hash algorithm used to hash the file.
12 13 14 |
# File 'lib/merritt/manifest/file.rb', line 12 def hash_algorithm @hash_algorithm end |
#hash_value ⇒ nil, String (readonly)
Returns the hash value.
15 16 17 |
# File 'lib/merritt/manifest/file.rb', line 15 def hash_value @hash_value end |
#mime_type ⇒ nil, MIME::Type (readonly)
Returns the mime type.
30 31 32 |
# File 'lib/merritt/manifest/file.rb', line 30 def mime_type @mime_type end |