Class: ProxyTester::PacResult
- Inherits:
-
Object
- Object
- ProxyTester::PacResult
- Defined in:
- lib/proxy_tester/pac_result.rb
Instance Attribute Summary collapse
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
-
#proxy_port ⇒ Object
readonly
Returns the value of attribute proxy_port.
-
#request_type ⇒ Object
readonly
Returns the value of attribute request_type.
Instance Method Summary collapse
-
#initialize(verbatim = '') ⇒ PacResult
constructor
A new instance of PacResult.
- #verbatim ⇒ Object
Constructor Details
#initialize(verbatim = '') ⇒ PacResult
Returns a new instance of PacResult.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/proxy_tester/pac_result.rb', line 7 def initialize(verbatim = '') @verbatim = verbatim if verbatim.blank? parsed_content = {} else parsed_content = parse(verbatim) || {} end @proxy = parsed_content[:proxy] @proxy_port = parsed_content[:proxy_port] @request_type = parsed_content[:request_type] end |
Instance Attribute Details
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
5 6 7 |
# File 'lib/proxy_tester/pac_result.rb', line 5 def proxy @proxy end |
#proxy_port ⇒ Object (readonly)
Returns the value of attribute proxy_port.
5 6 7 |
# File 'lib/proxy_tester/pac_result.rb', line 5 def proxy_port @proxy_port end |
#request_type ⇒ Object (readonly)
Returns the value of attribute request_type.
5 6 7 |
# File 'lib/proxy_tester/pac_result.rb', line 5 def request_type @request_type end |
Instance Method Details
#verbatim ⇒ Object
21 22 23 |
# File 'lib/proxy_tester/pac_result.rb', line 21 def verbatim @verbatim.to_s end |