Class: LocalPac::PacFileValidator
- Inherits:
-
Object
- Object
- LocalPac::PacFileValidator
- Defined in:
- lib/local_pac/pac_file_validator.rb
Instance Method Summary collapse
- #errors(file) ⇒ Object
-
#initialize(pac_engine = ProxyPacRb::Parser) ⇒ PacFileValidator
constructor
A new instance of PacFileValidator.
- #valid?(file) ⇒ Boolean
Constructor Details
#initialize(pac_engine = ProxyPacRb::Parser) ⇒ PacFileValidator
Returns a new instance of PacFileValidator.
10 11 12 |
# File 'lib/local_pac/pac_file_validator.rb', line 10 def initialize(pac_engine = ProxyPacRb::Parser) @pac_engine = pac_engine end |
Instance Method Details
#errors(file) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/local_pac/pac_file_validator.rb', line 22 def errors(file) validate(file) '' rescue StandardError => e e. end |
#valid?(file) ⇒ Boolean
14 15 16 17 18 19 20 |
# File 'lib/local_pac/pac_file_validator.rb', line 14 def valid?(file) validate(file) true rescue StandardError false end |