Class: Locomotive::Steam::Repositories

Inherits:
Object
  • Object
show all
Includes:
Morphine
Defined in:
lib/locomotive/steam/repositories.rb

Instance Method Summary collapse

Instance Method Details

#build_adapter(options) ⇒ Object



44
45
46
47
48
49
# File 'lib/locomotive/steam/repositories.rb', line 44

def build_adapter(options)
  name = ((options || {})[:name] || :filesystem).to_s
  require_relative "adapters/#{name.downcase}"
  klass = "Locomotive::Steam::#{name.camelize}Adapter".constantize
  klass.new(options)
end