Sha256: 03101db5e1170fd4286278e7fb40a7a7d5a889bb1fc37969c4061f5557dbebe9

Contents?: true

Size: 510 Bytes

Versions: 6

Compression:

Stored size: 510 Bytes

Contents

module Heirloom
  module Destroyer
    class S3

      def initialize(args)
        @config = args[:config]
        @region = args[:region]
      end

      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

      private

      def s3
        @s3 ||= AWS::S3.new :config => @config,
                            :region => @region
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
heirloom-0.1.3 lib/heirloom/destroyer/s3.rb
heirloom-0.1.2 lib/heirloom/destroyer/s3.rb
heirloom-0.1.1 lib/heirloom/destroyer/s3.rb
heirloom-0.1.0 lib/heirloom/destroyer/s3.rb
heirloom-0.0.9 lib/heirloom/destroyer/s3.rb
heirloom-0.0.8 lib/heirloom/destroyer/s3.rb