Class: S3diff::S3File
- Inherits:
-
Object
- Object
- S3diff::S3File
- Defined in:
- lib/s3diff/s3_file.rb
Instance Method Summary collapse
- #etag ⇒ Object
- #exist? ⇒ Boolean
-
#initialize(s3_uri, s3_client) ⇒ S3File
constructor
A new instance of S3File.
- #original_path ⇒ Object
- #path ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize(s3_uri, s3_client) ⇒ S3File
Returns a new instance of S3File.
6 7 8 9 |
# File 'lib/s3diff/s3_file.rb', line 6 def initialize(s3_uri, s3_client) @s3c = s3_client @uri = s3_uri end |
Instance Method Details
#etag ⇒ Object
11 12 13 |
# File 'lib/s3diff/s3_file.rb', line 11 def etag head.etag.delete(%(")) if exist? end |
#exist? ⇒ Boolean
27 28 29 |
# File 'lib/s3diff/s3_file.rb', line 27 def exist? !head.nil? end |
#original_path ⇒ Object
23 24 25 |
# File 'lib/s3diff/s3_file.rb', line 23 def original_path @uri end |
#path ⇒ Object
19 20 21 |
# File 'lib/s3diff/s3_file.rb', line 19 def path cache_file.path end |
#size ⇒ Object
15 16 17 |
# File 'lib/s3diff/s3_file.rb', line 15 def size head.content_length if exist? end |