Class: Continuum::Proxy

Inherits:
Object
  • Object
show all
Defined in:
src/lib/continuum/proxy.rb

Overview

A class that encapsulates proxy configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(proxy_config) ⇒ Proxy

Creates a new Proxy instance.

Parameters:

  • proxy_config (Hash)

    The proxy config as defined in thee continuum.json file



40
41
42
43
44
45
# File 'src/lib/continuum/proxy.rb', line 40

def initialize(proxy_config)
  @host = proxy_config['host']
  @port = proxy_config['port']
  @username = proxy_config['username']
  @password = proxy_config['password']
end

Instance Attribute Details

#hostString

Gets the value for the ‘host’ attribute of the the ‘proxy’ object defined in continuum.json. The IP address or hostname of the desired proxy to route all network traffic from Continuum through. Set to null if you don’t want to use a proxy.

Returns:

  • (String)

    The value for the ‘host’ attribute of the the ‘proxy’ object defined in continuum.json



13
14
15
# File 'src/lib/continuum/proxy.rb', line 13

def host
  @host
end

#passwordString

Gets the value for the ‘password’ attribute of the the ‘proxy’ object defined in continuum.json. The password for the desired proxy to route all network traffic from Continuum through. Set to null if your proxy does not require a password, or if you don’t want to use a proxy.

Returns:

  • (String)

    The value for the ‘password’ attribute of the the ‘proxy’ object defined in continuum.json



34
35
36
# File 'src/lib/continuum/proxy.rb', line 34

def password
  @password
end

#portInteger

Gets the value for the ‘port’ attribute of the the ‘proxy’ object defined in continuum.json. The port of the desired proxy to route all network traffic from Continuum through. Set to null if you don’t want to use a proxy.

Returns:

  • (Integer)

    The value for the ‘port’ attribute of the the ‘proxy’ object defined in continuum.json



20
21
22
# File 'src/lib/continuum/proxy.rb', line 20

def port
  @port
end

#usernameString

Gets the value for the ‘username’ attribute of the the ‘proxy’ object defined in continuum.json. The username for the desired proxy to route all network traffic from Continuum through. Set to null if your proxy does not require a username, or if you don’t want to use a proxy.

Returns:

  • (String)

    The value for the ‘username’ attribute of the the ‘proxy’ object defined in continuum.json



27
28
29
# File 'src/lib/continuum/proxy.rb', line 27

def username
  @username
end