Class: Deltacloud::Database::Provider

Inherits:
Sequel::Model
  • Object
show all
Extended by:
Helpers::Drivers
Defined in:
lib/db/provider.rb

Class Method Summary collapse

Methods included from Helpers::Drivers

driver, driver_class, driver_class_name, driver_name, driver_source_name, driver_symbol, included, provider_name

Class Method Details

.lookupObject

Find the DB provider set in the environment/request



31
32
33
34
# File 'lib/db/provider.rb', line 31

def self.lookup
  prov = Thread.current[:provider] || ENV['API_PROVIDER'] || 'default'
  find_or_create(:driver => current_driver_name, :url => prov)
end