Class: Heirloom::Destroyer::S3
- Inherits:
-
Object
- Object
- Heirloom::Destroyer::S3
- Defined in:
- lib/heirloom/destroyer/s3.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
- #destroy_file(args) ⇒ Object
-
#initialize(args) ⇒ S3
constructor
A new instance of S3.
Constructor Details
#initialize(args) ⇒ S3
Returns a new instance of S3.
7 8 9 10 |
# File 'lib/heirloom/destroyer/s3.rb', line 7 def initialize(args) self.config = args[:config] self.region = args[:region] end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/heirloom/destroyer/s3.rb', line 5 def config @config end |
#region ⇒ Object
Returns the value of attribute region.
5 6 7 |
# File 'lib/heirloom/destroyer/s3.rb', line 5 def region @region end |
Instance Method Details
#destroy_file(args) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/heirloom/destroyer/s3.rb', line 12 def destroy_file(args) key_name = args[:key_name] key_folder = args[:key_folder] bucket = args[:bucket] s3.delete_object bucket, "#{key_folder}/#{key_name}" end |