Class: Locomotive::Steam::Repositories
- Inherits:
-
Object
- Object
- Locomotive::Steam::Repositories
- 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 50 51 52 53 54 55 |
# File 'lib/locomotive/steam/repositories.rb', line 44 def build_adapter() name = (( || {})[:name] || :filesystem).to_s begin require_relative "adapters/#{name.downcase}" rescue LoadError => e puts 'Not a Steam built-in adapter' puts e.inspect puts e.backtrace end klass = "Locomotive::Steam::#{name.camelize}Adapter".constantize klass.new() end |