Class: Pacproxy::PacFile
- Inherits:
-
Object
- Object
- Pacproxy::PacFile
- Defined in:
- lib/pacproxy/pac_file.rb
Overview
Pacproxy::PacFile represent proxy.pac file
Instance Method Summary collapse
- #find(uri) ⇒ Object
-
#initialize(file_location, update_interval = 1800) ⇒ PacFile
constructor
A new instance of PacFile.
Constructor Details
#initialize(file_location, update_interval = 1800) ⇒ PacFile
Returns a new instance of PacFile.
8 9 10 11 |
# File 'lib/pacproxy/pac_file.rb', line 8 def initialize(file_location, update_interval = 1800) @pac = nil begin_update(file_location, update_interval) end |
Instance Method Details
#find(uri) ⇒ Object
13 14 15 16 |
# File 'lib/pacproxy/pac_file.rb', line 13 def find(uri) return 'DIRECT' unless @pac @pac.find(uri) end |