Class: Wiris::HttpProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/src-generic/system/HttpProxy.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port) ⇒ HttpProxy

Returns a new instance of HttpProxy.



7
8
9
10
11
# File 'lib/src-generic/system/HttpProxy.rb', line 7

def initialize(host, port)
  @port = port
  @host = host
  @auth = nil
end

Instance Attribute Details

#authObject

Returns the value of attribute auth.



5
6
7
# File 'lib/src-generic/system/HttpProxy.rb', line 5

def auth
  @auth
end

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/src-generic/system/HttpProxy.rb', line 4

def host
  @host
end

#portObject

Returns the value of attribute port.



3
4
5
# File 'lib/src-generic/system/HttpProxy.rb', line 3

def port
  @port
end

Class Method Details

.newHttpProxy(host, port, user, pass) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/src-generic/system/HttpProxy.rb', line 13

def self.newHttpProxy(host, port, user, pass)
  proxy = HttpProxy.new(host, port)
  hpa = HttpProxyAuth.new()
  hpa.user = user
  hpa.pass = pass
  proxy.auth = hpa
  return proxy
end