Class: DTK::Network::Client::Storage::Adapter::S3
- Inherits:
-
Object
- Object
- DTK::Network::Client::Storage::Adapter::S3
- Defined in:
- lib/client/storage/adapters/s3.rb
Instance Method Summary collapse
- #delete(data_hash, opts = {}) ⇒ Object
- #download(data_hash, opts = {}) ⇒ Object
-
#initialize(data_hash) ⇒ S3
constructor
A new instance of S3.
- #upload(data_hash) ⇒ Object
Constructor Details
#initialize(data_hash) ⇒ S3
Returns a new instance of S3.
7 8 9 |
# File 'lib/client/storage/adapters/s3.rb', line 7 def initialize(data_hash) @s3 = Aws::S3::Client.new(data_hash) end |
Instance Method Details
#delete(data_hash, opts = {}) ⇒ Object
19 20 21 |
# File 'lib/client/storage/adapters/s3.rb', line 19 def delete(data_hash, opts = {}) @s3.delete_object(data_hash, opts) end |
#download(data_hash, opts = {}) ⇒ Object
15 16 17 |
# File 'lib/client/storage/adapters/s3.rb', line 15 def download(data_hash, opts = {}) @s3.get_object(data_hash, opts) end |
#upload(data_hash) ⇒ Object
11 12 13 |
# File 'lib/client/storage/adapters/s3.rb', line 11 def upload(data_hash) @s3.put_object(data_hash) end |