Class: PrintPrimesTable::Validators::HelpValidator
- Inherits:
-
Object
- Object
- PrintPrimesTable::Validators::HelpValidator
- Defined in:
- lib/print_primes_table/validators/help_validator.rb
Overview
to validate the –help option
Class Method Summary (collapse)
-
+ (Symbol | String) validate(args)
validate the arguments of –help option.
Class Method Details
+ (Symbol | String) validate(args)
validate the arguments of –help option
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/print_primes_table/validators/help_validator.rb', line 13 def validate(args) begin raise ArgumentError.new( ErrorMessage.new(:command_wrong_arguments, {:max => 1, :argument_num => args.count } ).show_content) if args.count > 0 :valid rescue => err err. end end |