Sha256: 2c59390623a59bd46c1363908331240329a0d5aba54a7742f2162e41509d2e53
Contents?: true
Size: 428 Bytes
Versions: 2
Compression:
Stored size: 428 Bytes
Contents
require 'thor' require 'number_plate_validator' module NumberPlateValidator class CLI < Thor desc "validate -c COUNTRY PLATE", "validate if a PLATE is valid in the country CC" method_option :country, aliases: "-c", desc: "standard country code in capital letters", required: true def validate(plate) validator = NumberPlateValidator.validator(options[:country]) puts(validator.is_valid? plate) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
number_plate_validator-0.2.2 | lib/number_plate_validator/cli.rb |
number_plate_validator-0.2.1 | lib/number_plate_validator/cli.rb |