# encoding: utf-8 module LocalPac class PacFileValidator def valid?(file) validate(file) true rescue StandardError false end def errors(file) validate(file) '' rescue StandardError => e e.message end private def validate(file) pac = PAC.source(file.content) pac.find('http://www.example.com') end end end