Class: S3ReproxyDownload::S3Object
- Inherits:
-
Object
- Object
- S3ReproxyDownload::S3Object
- Defined in:
- lib/s3_reproxy_download.rb
Instance Method Summary collapse
- #filename ⇒ Object
-
#initialize(bucket_name, path) ⇒ S3Object
constructor
A new instance of S3Object.
- #presigned_url ⇒ Object
Constructor Details
#initialize(bucket_name, path) ⇒ S3Object
Returns a new instance of S3Object.
31 32 33 34 |
# File 'lib/s3_reproxy_download.rb', line 31 def initialize(bucket_name, path) @bucket = Aws::S3::Resource.new.bucket(bucket_name) @path = path end |
Instance Method Details
#filename ⇒ Object
40 41 42 |
# File 'lib/s3_reproxy_download.rb', line 40 def filename File.basename(@path) end |
#presigned_url ⇒ Object
36 37 38 |
# File 'lib/s3_reproxy_download.rb', line 36 def presigned_url @bucket.object(@path).presigned_url(:get, @path) end |