Sha256: c09eea181654201457e1474840b3960100ee7523ea7594ef1d7374d9b0e29b2b
Contents?: true
Size: 638 Bytes
Versions: 22
Compression:
Stored size: 638 Bytes
Contents
module ErpTechSvcs module FileSupport DEFAULT_OPTIONS = {:storage => :filesystem} mattr_accessor :options @@options = HashWithIndifferentAccess.new(DEFAULT_OPTIONS) class Base attr_accessor :storage def initialize(options={}) @storage = options[:storage].nil? ? :filesystem : options[:storage] case @storage when :s3 @manager = S3Manager.new when :filesystem @manager = FileSystemManager.new end end def method_missing(m, *args, &block) @manager.respond_to?(m) ? @manager.send(m, *args) : super end end end end
Version data entries
22 entries across 22 versions & 1 rubygems