Method: CheckList::Validations.validate
- Defined in:
- lib/validations.rb
.validate(value, array) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/validations.rb', line 6 def self.validate(value, array) return 0 if value == 'q' return value.to_i if array && value.to_i < array.length + 1 && !value.to_i.zero? return false unless array nil end |