Class: SocketLabs::InjectionApi::Proxy
- Inherits:
-
Object
- Object
- SocketLabs::InjectionApi::Proxy
- Defined in:
- lib/socketlabs/injectionapi/proxy.rb
Overview
Represents a http proxy.
Instance Attribute Summary collapse
-
#host ⇒ Object
The name of the proxy hostname.
-
#port ⇒ Object
The value of the proxy port.
Instance Method Summary collapse
-
#initialize(host = nil, port = nil) ⇒ Proxy
constructor
A new instance of Proxy.
-
#to_s ⇒ String
Returns the Proxy as a string.
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
#host ⇒ Object
The name of the proxy hostname
8 9 10 |
# File 'lib/socketlabs/injectionapi/proxy.rb', line 8 def host @host end |
#port ⇒ Object
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_s ⇒ String
Returns the Proxy as a string.
22 23 24 |
# File 'lib/socketlabs/injectionapi/proxy.rb', line 22 def to_s "#{@host}:#{@port}" end |