Just so you know, I understand the given task in this exercise, my code will prove it as well.
Here's my 'update' block:
when 'update' puts 'Which movie would you like to update?' title = gets.chomp if movies[title] = nil puts 'This movie doesnt exist!' else movies[title.to_sym] puts 'What should his new rating be?' rating = gets.chomp movies[title.to_sym] = rating.to_i puts 'Done!' end
The reason I've created this topic is to understand how Ruby ( or own self as well ) understand the if\else statement.
If I'm following the 'else' statement in this block, it does it is suppose to do.
But if I'm following the 'if' statement, it totally ignore to check if the movie does exist!
I've been able to get past this exercise, this one scratch my head big times..