Class: ProxyPacRb::CliValidator
- Inherits:
-
Object
- Object
- ProxyPacRb::CliValidator
- Defined in:
- lib/proxy_pac_rb/cli_validator.rb
Overview
Validator for commandline options
Instance Method Summary collapse
-
#initialize(options) ⇒ CliValidator
constructor
A new instance of CliValidator.
- #validate ⇒ Object
Constructor Details
#initialize(options) ⇒ CliValidator
Returns a new instance of CliValidator.
11 12 13 |
# File 'lib/proxy_pac_rb/cli_validator.rb', line 11 def initialize() @options = end |
Instance Method Details
#validate ⇒ Object
15 16 17 18 19 |
# File 'lib/proxy_pac_rb/cli_validator.rb', line 15 def validate 'You need to provide at least one url. Multiple urls need to be separated by a space.' if empty_url? 'You need to provide a proxy pac file.' if empty_pac_file? %(You need to provide a path to an existing proxy pac file. The file "#{[:proxy_pac]}" does not exist.) if non_existing_proxy_pac_file? end |