Module: Infrastructure::Loaders

Defined in:
lib/infrastructure/loaders.rb,
lib/infrastructure/loaders/s3.rb,
lib/infrastructure/loaders/base.rb,
lib/infrastructure/loaders/local.rb

Overview

::nodoc

Defined Under Namespace

Classes: Base, Local, S3

Class Method Summary collapse

Class Method Details

.build(config) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/infrastructure/loaders.rb', line 10

def build(config)
  case config.storage.to_s.downcase.to_sym
  when :s3
    S3.new(config)
  when :local
    Local.new(config)
  else
    raise ArgumentError, "Unknown storage type #{config.storage}"
  end
end