Sha256: 8dda34e8cf7b3331a159af9ddca9ea6778517115900b1908fa23c72a2491e0a2
Contents?: true
Size: 477 Bytes
Versions: 11
Compression:
Stored size: 477 Bytes
Contents
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
Version data entries
11 entries across 11 versions & 1 rubygems