Sha256: 15d03175a6aa569072d1ff567172250054272b220659a7bb64063e6646e356aa

Contents?: true

Size: 400 Bytes

Versions: 4

Compression:

Stored size: 400 Bytes

Contents

require 'forwardable'

module Roart

  class ConnectionAdapter
    extend Forwardable

    def initialize(config)
      @adapter = Roart::ConnectionAdapters.const_get(config[:adapter].capitalize).new(config)
      @adapter.login(config) if config[:user] && config[:pass]
    end

    def authenticate(config)
      @adapter.login(config)
    end

    def_delegators :@adapter, :get, :post

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
roart-0.1.7 lib/roart/connection_adapter.rb
roart-0.1.6 lib/roart/connection_adapter.rb
roart-0.1.5.1 lib/roart/connection_adapter.rb
roart-0.1.5 lib/roart/connection_adapter.rb