-
-
Save anonymous/4645f39f1c78bf9783b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
movies = { | |
"Gatsby" => 4 | |
} | |
puts "What's a movie you like?" | |
choice = gets.chomp | |
case choice | |
when "add" | |
puts "What's the title?" | |
title = gets.chomp | |
if movies[title] | |
puts "What's the rating?" | |
rating = gets.chomp | |
movies[title] = rating | |
end | |
when "update" | |
puts "Updated!" | |
when "display" | |
puts "Movies!" | |
when "delete" | |
puts "Deleted!" | |
else | |
puts "Error!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment