Class: Proxtopus::Proxy
- Inherits:
-
Object
- Object
- Proxtopus::Proxy
- Defined in:
- lib/proxtopus/proxy.rb
Instance Attribute Summary collapse
-
#anonymity ⇒ Object
Returns the value of attribute anonymity.
-
#country ⇒ Object
Returns the value of attribute country.
-
#host ⇒ Object
Returns the value of attribute host.
-
#port ⇒ Object
Returns the value of attribute port.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(host, port, protocol, country, anonymity) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
#initialize(host, port, protocol, country, anonymity) ⇒ Proxy
Returns a new instance of Proxy.
6 7 8 9 10 11 12 |
# File 'lib/proxtopus/proxy.rb', line 6 def initialize(host, port, protocol, country, anonymity) @host = host.to_s @port = port.to_i @protocol = protocol.to_s @country = country.to_s @anonymity = anonymity.to_s end |
Instance Attribute Details
#anonymity ⇒ Object
Returns the value of attribute anonymity.
4 5 6 |
# File 'lib/proxtopus/proxy.rb', line 4 def anonymity @anonymity end |
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/proxtopus/proxy.rb', line 4 def country @country end |
#host ⇒ Object
Returns the value of attribute host.
4 5 6 |
# File 'lib/proxtopus/proxy.rb', line 4 def host @host end |
#port ⇒ Object
Returns the value of attribute port.
4 5 6 |
# File 'lib/proxtopus/proxy.rb', line 4 def port @port end |
#protocol ⇒ Object
Returns the value of attribute protocol.
4 5 6 |
# File 'lib/proxtopus/proxy.rb', line 4 def protocol @protocol end |
Instance Method Details
#==(other) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/proxtopus/proxy.rb', line 14 def ==(other) if other.is_a?(Proxtopus::Proxy) if @host == other.host && @port == other.port && @protocol == other.protocol true else false end else false end end |