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.
27 28 29 |
# File 'lib/spidr/proxy.rb', line 27 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
7 8 9 |
# File 'lib/spidr/proxy.rb', line 7 def host @host end |
#password ⇒ Object
Returns the value of attribute password
7 8 9 |
# File 'lib/spidr/proxy.rb', line 7 def password @password end |
#port ⇒ Object
Returns the value of attribute port
7 8 9 |
# File 'lib/spidr/proxy.rb', line 7 def port @port end |
#user ⇒ Object
Returns the value of attribute user
7 8 9 |
# File 'lib/spidr/proxy.rb', line 7 def user @user end |
Instance Method Details
#disabled? ⇒ Boolean
Determines if the proxy is not set.
45 46 47 |
# File 'lib/spidr/proxy.rb', line 45 def disabled? host.nil? end |
#enabled? ⇒ Boolean
Determines if the proxy settings are set.
36 37 38 |
# File 'lib/spidr/proxy.rb', line 36 def enabled? !host.nil? end |