module AlexCodebreaker module Modules module Validators def argument_length_check(arg, length) arg.to_s.length == length end def argument_max_length_check(arg, max) arg.length <= max end def argument_min_length_check(arg, min) arg.length >= min end def digits_check(arg, min_digit, max_digit) arg.split('').all? { |value| value.to_i.between?(min_digit, max_digit) } end end end end