Class: Spidr::Proxy
- Inherits:
-
Struct
- Object
- Struct
- Spidr::Proxy
- Defined in:
- lib/spidr/proxy.rb
Overview
Constant Summary collapse
- DEFAULT_PORT =
Default port to use.
8080
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#disabled? ⇒ Boolean
Determines if the proxy is not set.
-
#enabled? ⇒ Boolean
Determines if the proxy settings are set.
-
#initialize(host: nil, port: DEFAULT_PORT, user: nil, password: nil) ⇒ Proxy
constructor
Initializes the proxy.
Constructor Details
#initialize(host: nil, port: DEFAULT_PORT, user: nil, password: nil) ⇒ Proxy
Initializes the proxy.
25 26 27 |
# File 'lib/spidr/proxy.rb', line 25 def initialize(host: nil, port: DEFAULT_PORT, user: nil, password: nil) super(host,port,user,password) end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host
5 6 7 |
# File 'lib/spidr/proxy.rb', line 5 def host @host end |
#password ⇒ Object
Returns the value of attribute password
5 6 7 |
# File 'lib/spidr/proxy.rb', line 5 def password @password end |
#port ⇒ Object
Returns the value of attribute port
5 6 7 |
# File 'lib/spidr/proxy.rb', line 5 def port @port end |
#user ⇒ Object
Returns the value of attribute user
5 6 7 |
# File 'lib/spidr/proxy.rb', line 5 def user @user end |
Instance Method Details
#disabled? ⇒ Boolean
Determines if the proxy is not set.
43 44 45 |
# File 'lib/spidr/proxy.rb', line 43 def disabled? host.nil? end |
#enabled? ⇒ Boolean
Determines if the proxy settings are set.
34 35 36 |
# File 'lib/spidr/proxy.rb', line 34 def enabled? !host.nil? end |