Skip to content

Instantly share code, notes, and snippets.

@Casual3498
Last active December 13, 2017 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Casual3498/761be64b6190a5940cec7ee050c8a115 to your computer and use it in GitHub Desktop.
Save Casual3498/761be64b6190a5940cec7ee050c8a115 to your computer and use it in GitHub Desktop.
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