Created
July 8, 2020 07:17
-
-
Save hadrienblanc/3b480745198a6939bb92080be14c199f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BundleDeleteService | |
def initialize(relative_path:) | |
@relative_path = relative_path | |
end | |
def delete | |
bucket_objects.each(&:delete) | |
end | |
def bucket_objects | |
s3_client.bucket(BUNDLE_BUCKET_NAME).objects(prefix: @relative_path) | |
end | |
def s3_client | |
Aws::S3::Resource.new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment