Sha256: 87fb09247783bbc4a2402abe811d29e2b190219882b0fbe848007d2a448d1795

Contents?: true

Size: 587 Bytes

Versions: 5

Compression:

Stored size: 587 Bytes

Contents

require 'active_support/core_ext/module/attribute_accessors'

module MultiEncoder
  module Storage
    mattr_reader :destination
    mattr_accessor :aws_bucket_prefix
    mattr_accessor :aws_access_key
    mattr_accessor :aws_secret_access_key

    def self.configure
      yield self
    end

    def self.destination=(dest)
      unless [:filesystem, :aws].include? dest
        raise ArgumentError.new('Unsopported storage distination mate')
      end
      @@destination = dest
    end
    self.destination = :filesystem
  end
end

require 'storage/aws'
require 'storage/filesystem'

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
barcode_encoder-0.0.9 lib/multi_encoder/storage.rb
multi_encoder-0.0.9 lib/multi_encoder/storage.rb
multi_encoder-0.0.8 lib/multi_encoder/storage.rb
multi_encoder-0.0.7 lib/multi_encoder/storage.rb
multi_encoder-0.0.6 lib/multi_encoder/storage.rb