Class: ProxyTester::CapybaraProxyPac

Inherits:
Object
  • Object
show all
Defined in:
lib/proxy_tester/capybara_proxy_pac.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#client_ipObject

Returns the value of attribute client_ip.



10
11
12
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 10

def client_ip
  @client_ip
end

#pac_fileObject

Returns the value of attribute pac_file.



10
11
12
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 10

def pac_file
  @pac_file
end

#result=(value) ⇒ Object

Sets the attribute result

Parameters:

  • value

    the value to set the attribute result to.



10
11
12
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 10

def result=(value)
  @result = value
end

#timeObject

Returns the value of attribute time.



10
11
12
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 10

def time
  @time
end

#urlObject

Returns the value of attribute url.



10
11
12
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 10

def url
  @url
end

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 20

def blank?
  host.blank? or port.blank?
end

#direct?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 24

def direct?
  result.request_type == 'DIRECT'
end

#hostObject



12
13
14
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 12

def host
  result.proxy
end

#portObject



16
17
18
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 16

def port
  result.proxy_port
end

#verbatimObject



28
29
30
# File 'lib/proxy_tester/capybara_proxy_pac.rb', line 28

def verbatim
  result.verbatim
end