lib/presidents/cli.rb
def start
  print_presidents 
  puts ""    
  puts "Which president would you like more information on?" 
  input = gets.strip
  
  president = Presidents::President.find(input.to_i)
  
  print_president(president) 
  puts "Would you like to see another president? Enter Y or N" 
  input = gets.strip.downcase 
  if input == "y"
   start
  else
   puts "Thank you! Have a nice day!" 
   exit 
  end
 end
#gives Presidents module access to the methods of the CLI class
gives Presidents module access to the methods of the CLI class
gives Presidents module access to the methods of the CLI class
def start
  print_presidents 
  puts ""    
  puts "Which president would you like more information on?" 
  input = gets.strip
  president = Presidents::President.find(input.to_i)
  print_president(president) 
  puts "Would you like to see another president? Enter Y or N" 
  input = gets.strip.downcase 
  if input == "y"
   start
  else
   puts "Thank you! Have a nice day!" 
   exit 
  end
 end
def start print_presidents puts "" puts "Which president would you like more information on?" input = gets . strip president = Presidents :: President . find ( input . to_i ) print_president ( president ) puts "Would you like to see another president? Enter Y or N" input = gets . strip . downcase if input == "y" start else puts "Thank you! Have a nice day!" exit end end
gives Presidents module access to the methods of the CLI class
gives Presidents module access to the methods of the CLI class