Skip to content

Instantly share code, notes, and snippets.

@sirramongabriel
Created September 8, 2013 19:38
Show Gist options
  • Select an option

  • Save sirramongabriel/6487776 to your computer and use it in GitHub Desktop.

Select an option

Save sirramongabriel/6487776 to your computer and use it in GitHub Desktop.
when 'update'
puts "What movie do you want to update?"
title = gets.chomp
if movies[title.to_sym].nil?
puts "Movie not found!"
else
puts "What's the new rating? (Type a number 0 to 4.)"
rating = gets.chomp
movies[title.to_sym] = rating.to_i
puts "#{title} has been updated with new rating of #{rating}."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment