Class: Roart::ConnectionAdapter

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/roart/connection_adapter.rb

Instance Method Summary collapse

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.(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.(config)
end