Class: ProxyRb::ProxyUrlParser

Inherits:
Object
  • Object
show all
Defined in:
lib/proxy_rb/proxy_url_parser.rb

Overview

Parse urls for proxies

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ ProxyUrlParser

Returns a new instance of ProxyUrlParser.

Parameters:

  • url (String)

    The url for the proxy configuration



20
21
22
23
24
25
# File 'lib/proxy_rb/proxy_url_parser.rb', line 20

def initialize(url)
  temporary_url = ProxyUrl.parse(url)

  @proxy_url   = temporary_url.without_user_name_and_password
  @credentials = Credentials.new(temporary_url.user, temporary_url.password)
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



16
17
18
# File 'lib/proxy_rb/proxy_url_parser.rb', line 16

def credentials
  @credentials
end

#proxy_urlObject (readonly)

Returns the value of attribute proxy_url.



16
17
18
# File 'lib/proxy_rb/proxy_url_parser.rb', line 16

def proxy_url
  @proxy_url
end