Module: Codebreaker::Validation
Instance Method Summary collapse
Instance Method Details
#guess_valid?(value) ⇒ Boolean
9 10 11 |
# File 'lib/modules/validation.rb', line 9 def guess_valid?(value) /^[1-6]{4}$/.match?(value) end |
#size_correct?(value) ⇒ Boolean
5 6 7 |
# File 'lib/modules/validation.rb', line 5 def size_correct?(value) value.length.between?(3, 20) end |