class Pfm::Command::Validate
def run(params)
def run(params) if validator_spec = validator_for(params[0]) params.shift validator = ValidatorCommands.build(validator_spec.class_name, params) validator.run else msg(banner) 1 end rescue OptionParser::InvalidOption, OptionParser::MissingArgument => e # Pfm::Command::Base also handles this error in the same way, but it # does not have access to the correct option parser, so it cannot print # the usage correctly. Therefore, invalid CLI usage needs to be handled # here. err("ERROR: #{e.message}\n") msg(validator.opt_parser) 1 end