Class: Hasta::CachedS3File

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/hasta/cached_s3_file.rb

Overview

Implements Hasta’s S3File interface for files retrieved from the cache

Instance Method Summary collapse

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

#keyObject



13
14
15
# File 'lib/hasta/cached_s3_file.rb', line 13

def key
  @s3_uri.path
end

#s3_uriObject



17
18
19
# File 'lib/hasta/cached_s3_file.rb', line 17

def s3_uri
  @s3_uri
end