Class: Foreigner::Adapter
- Inherits:
-
Object
- Object
- Foreigner::Adapter
- Defined in:
- lib/foreigner/adapter.rb
Class Method Summary collapse
Class Method Details
.configured_name ⇒ Object
17 18 19 |
# File 'lib/foreigner/adapter.rb', line 17 def configured_name ActiveRecord::Base.connection_pool.spec.config[:adapter] end |
.load! ⇒ Object
11 12 13 14 15 |
# File 'lib/foreigner/adapter.rb', line 11 def load! if registered.key?(configured_name) require registered[configured_name] end end |
.register(adapter_name, file_name) ⇒ Object
7 8 9 |
# File 'lib/foreigner/adapter.rb', line 7 def register(adapter_name, file_name) registered[adapter_name] = file_name end |