Class: Hasta::CachedS3File
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Hasta::CachedS3File
- Defined in:
- lib/hasta/cached_s3_file.rb
Overview
Implements Hasta’s S3File interface for files retrieved from the cache
Instance Method Summary collapse
-
#initialize(cached_file, s3_uri) ⇒ CachedS3File
constructor
A new instance of CachedS3File.
- #key ⇒ Object
- #s3_uri ⇒ Object
Constructor Details
#initialize(cached_file, s3_uri) ⇒ CachedS3File
Returns a new instance of CachedS3File.
8 9 10 11 |
# File 'lib/hasta/cached_s3_file.rb', line 8 def initialize(cached_file, s3_uri) super(S3File.wrap(cached_file)) @s3_uri = s3_uri end |
Instance Method Details
#key ⇒ Object
13 14 15 |
# File 'lib/hasta/cached_s3_file.rb', line 13 def key @s3_uri.path end |
#s3_uri ⇒ Object
17 18 19 |
# File 'lib/hasta/cached_s3_file.rb', line 17 def s3_uri @s3_uri end |