Displaying a Menu3:57 with Jason Seifer
Our users will need a way to interact with our program. In this video, we begin to offer that functionality by displaying a simple menu and waiting for input.
def run loop do puts "Address Book" puts "e: Exit" print 'Enter your choice: ' input = gets.chomp case input when 'e' break end end end
We call this by saying:
You need to sign up for Treehouse in order to download course files.Sign up