Method: Top25TravelDestinations::CLI#choose_destination

Defined in:
lib/top_25_travel_destinations/cli.rb

#choose_destinationObject



24
25
26
27
28
29
30
31
# File 'lib/top_25_travel_destinations/cli.rb', line 24

def choose_destination
  if @input == "exit"
    goodbye
  elsif !@input.to_i.between?(1,25) 
    puts "Incorrect input, try again"
    @input = gets.chomp.to_i
  end
end