Class: LocalPac::ProxyPac::PacResult

Inherits:
Object
  • Object
show all
Defined in:
lib/local_pac/proxy_pac/pac_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verbatim_content) ⇒ PacResult

Returns a new instance of PacResult.



9
10
11
12
13
14
15
16
17
# File 'lib/local_pac/proxy_pac/pac_result.rb', line 9

def initialize(verbatim_content)
  @verbatim_content = verbatim_content

  parsed_content = parse(verbatim_content) || {}

  @proxy         = parsed_content[:proxy]
  @proxy_port    = parsed_content[:proxy_port]
  @request_type  = parsed_content[:request_type]
end

Instance Attribute Details

#proxyObject (readonly)

Returns the value of attribute proxy.



7
8
9
# File 'lib/local_pac/proxy_pac/pac_result.rb', line 7

def proxy
  @proxy
end

#proxy_portObject (readonly)

Returns the value of attribute proxy_port.



7
8
9
# File 'lib/local_pac/proxy_pac/pac_result.rb', line 7

def proxy_port
  @proxy_port
end

#request_typeObject (readonly)

Returns the value of attribute request_type.



7
8
9
# File 'lib/local_pac/proxy_pac/pac_result.rb', line 7

def request_type
  @request_type
end

#styled_contentObject

Returns the value of attribute styled_content.



6
7
8
# File 'lib/local_pac/proxy_pac/pac_result.rb', line 6

def styled_content
  @styled_content
end

#verbatim_contentObject (readonly)

Returns the value of attribute verbatim_content.



7
8
9
# File 'lib/local_pac/proxy_pac/pac_result.rb', line 7

def verbatim_content
  @verbatim_content
end