Sha256: 884624464e5f7635fb6c5aeeb338c8d703265e73c182ad369b05b71addc01375

Contents?: true

Size: 412 Bytes

Versions: 16

Compression:

Stored size: 412 Bytes

Contents

require 'forwardable'

module Roart

  class ConnectionAdapter
    extend Forwardable

    def initialize(config)
      @adapter = Roart::ConnectionAdapters.const_get(config[:adapter].capitalize + "Adapter").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

16 entries across 16 versions & 3 rubygems

Version Path
ludo-roart-0.1.19 lib/roart/connection_adapter.rb
ludo-roart-0.1.18 lib/roart/connection_adapter.rb
ludo-roart-0.1.17 lib/roart/connection_adapter.rb
ludo-roart-0.1.16 lib/roart/connection_adapter.rb
ludo-roart-0.1.15 lib/roart/connection_adapter.rb
ludo-roart-0.1.14 lib/roart/connection_adapter.rb
ludo-roart-0.1.13 lib/roart/connection_adapter.rb
ludo-roart-0.1.12 lib/roart/connection_adapter.rb
ludo-roart-0.1.11 lib/roart/connection_adapter.rb
roart-0.1.10 lib/roart/connection_adapter.rb
axtro-roart-0.1.9.2 lib/roart/connection_adapter.rb
axtro-roart-0.1.9.1 lib/roart/connection_adapter.rb
roart-0.1.9 lib/roart/connection_adapter.rb
axtro-roart-0.1.9 lib/roart/connection_adapter.rb
axtro-roart-0.1.8 lib/roart/connection_adapter.rb
roart-0.1.8 lib/roart/connection_adapter.rb