Class: Atlantis::Portal::Agent
- Inherits:
-
Mechanize
- Object
- Mechanize
- Atlantis::Portal::Agent
- Defined in:
- lib/Atlantis/portal/agent.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#service ⇒ Object
Returns the value of attribute service.
-
#service_instance ⇒ Object
Returns the value of attribute service_instance.
Instance Method Summary collapse
-
#initialize ⇒ Agent
constructor
A new instance of Agent.
Constructor Details
#initialize ⇒ Agent
Returns a new instance of Agent.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/Atlantis/portal/agent.rb', line 13 def initialize super self.user_agent_alias = 'Mac Safari' self.log ||= Logger.new(STDOUT) self.log.level = Logger::ERROR if ENV['HTTP_PROXY'] uri = URI.parse(ENV['HTTP_PROXY']) user = ENV['HTTP_PROXY_USER'] if ENV['HTTP_PROXY_USER'] password = ENV['HTTP_PROXY_PASSWORD'] if ENV['HTTP_PROXY_PASSWORD'] set_proxy(uri.host, uri.port, user || uri.user, password || uri.password) end end |
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format.
11 12 13 |
# File 'lib/Atlantis/portal/agent.rb', line 11 def format @format end |
#service ⇒ Object
Returns the value of attribute service.
11 12 13 |
# File 'lib/Atlantis/portal/agent.rb', line 11 def service @service end |
#service_instance ⇒ Object
Returns the value of attribute service_instance.
11 12 13 |
# File 'lib/Atlantis/portal/agent.rb', line 11 def service_instance @service_instance end |