Class: Roart::ConnectionAdapter
- Inherits:
-
Object
- Object
- Roart::ConnectionAdapter
- Extended by:
- Forwardable
- Defined in:
- lib/roart/connection_adapter.rb
Instance Method Summary collapse
- #authenticate(config) ⇒ Object
-
#initialize(config) ⇒ ConnectionAdapter
constructor
A new instance of ConnectionAdapter.
Constructor Details
#initialize(config) ⇒ ConnectionAdapter
Returns a new instance of ConnectionAdapter.
8 9 10 11 |
# File 'lib/roart/connection_adapter.rb', line 8 def initialize(config) @adapter = Roart::ConnectionAdapters.const_get(config[:adapter].capitalize + "Adapter").new(config) @adapter.login(config) if config[:user] && config[:pass] end |
Instance Method Details
#authenticate(config) ⇒ Object
13 14 15 |
# File 'lib/roart/connection_adapter.rb', line 13 def authenticate(config) @adapter.login(config) end |