class InputValidator

Public Class Methods

get_type_input() click to toggle source
# 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() click to toggle source
# 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