Class: InputValidator
- Inherits:
-
Object
- Object
- InputValidator
- Defined in:
- lib/input_validator.rb
Class Method Summary collapse
Class Method Details
.get_type_input ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/input_validator.rb', line 12 def self.get_type_input input = gets.chomp while !['number', 'string', 'random'].include?(input) puts 'Please try again, that was not valid' input = gets.chomp end return input end |
.reset_mentees_input ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/input_validator.rb', line 3 def self.reset_mentees_input input = gets.chomp while !['y', 'n'].include?(input) puts 'Please try again, that was not valid' input = gets.chomp end return input end |