Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadrienblanc/3b480745198a6939bb92080be14c199f to your computer and use it in GitHub Desktop.
Save hadrienblanc/3b480745198a6939bb92080be14c199f to your computer and use it in GitHub Desktop.
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