Class: SocketLabs::InjectionApi::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/socketlabs/injectionapi/proxy.rb

Overview

Represents a http proxy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host = nil, port = nil) ⇒ Proxy



12
13
14
15
16
17
18
# File 'lib/socketlabs/injectionapi/proxy.rb', line 12

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

Instance Attribute Details

#hostObject

The name of the proxy hostname



8
9
10
# File 'lib/socketlabs/injectionapi/proxy.rb', line 8

def host
  @host
end

#portObject

The value of the proxy port



10
11
12
# File 'lib/socketlabs/injectionapi/proxy.rb', line 10

def port
  @port
end

Instance Method Details

#to_sString

Returns the Proxy as a string.



22
23
24
# File 'lib/socketlabs/injectionapi/proxy.rb', line 22

def to_s
  "#{@host}:#{@port}"
end