Skip to content

Instantly share code, notes, and snippets.

@Casual3498
Last active Dec 13, 2017
Embed
What would you like to do?
1lesson
#!/usr/bin/env ruby
bad_films = ['Titanic', 'Alien 18']
good_films = ['Matrix', 'Interstate 60']
puts case
when good_films.map(&:downcase).include?(ARGV[0].downcase) then "#{ARGV[0]} is a good movie."
when bad_films.map(&:downcase).include?(ARGV[0].downcase) then "#{ARGV[0]} is a bad movie."
else "Haven't seen #{ARGV[0]} yet"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment