Mega Code Archive

 
Categories / Ruby / Development
 

Use while loop to read a command

command = '' while command != 'bye'   puts command   command = gets.chomp end puts 'Come again soon!'