Method: HttpUtilities::Http::ProxySupport#set_from_object
- Defined in:
- lib/http_utilities/http/proxy_support.rb
#set_from_object(proxy_object) ⇒ Object
73 74 75 76 77 78 79 80 81 82 |
# File 'lib/http_utilities/http/proxy_support.rb', line 73 def set_from_object(proxy_object) if proxy_object self.proxy[:host] = proxy_object.host self.proxy[:port] = proxy_object.port username = !proxy_object.username.to_s.empty? ? proxy_object.username : nil password = !proxy_object.password.to_s.empty? ? proxy_object.password : nil set_credentials(username, password) end end |