Sha256: 7bc58592ddc25d32c616a9725535af0e4a8253d3bffca1c4f10b38315082a3f2

Contents?: true

Size: 539 Bytes

Versions: 7

Compression:

Stored size: 539 Bytes

Contents

module RSocks
  class Config
    def initialize
      @store = {}
    end

    def auth_adaptor=(adaptor)
      @store[:adaptor] = adaptor
    end

    def auth_adaptor
      @store[:adaptor]
    end

    def auth_method=(method)
      if method == :no_auth
        @store[:auth_method] = RSocks::NO_AUTH
      elsif method == :password
        @store[:auth_method] = RSocks::PASSWORD_LOGIN

      else
        raise Error, "unknown auth method #{method}"
      end
    end

    def auth_method
      @store[:auth_method]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
r_socks-0.1.7 lib/r_socks/config.rb
r_socks-0.1.6 lib/r_socks/config.rb
r_socks-0.1.5 lib/r_socks/config.rb
r_socks-0.1.4 lib/r_socks/config.rb
r_socks-0.1.3 lib/r_socks/config.rb
r_socks-0.1.2 lib/r_socks/config.rb
r_socks-0.1.1 lib/r_socks/config.rb