/deaf_aunty.rb Secret
Last active
November 30, 2015 21:20
-
-
Save andrewclk/5ce27d54ddf3671189eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def speak | |
| puts"NOW TRY AGAIN!" | |
| user_input = gets.chomp | |
| deaf_aunty(user_input) | |
| end | |
| def deaf_aunty(input) | |
| if input == input.downcase | |
| puts "HUH?! SPEAK UP, SANDRA!" | |
| speak | |
| elsif input == input.upcase then | |
| puts "NO, WE CAN'T DO THAT!" | |
| puts "SAY YOU LOVE ME POLITELY IF YOU WANT TO LEAVE!" | |
| puts "Maybe like - I love ya, aunty, but I've got to go." | |
| speak | |
| elsif input == "I love ya." || input = 2.times{"\n"} | |
| puts "Thank you Sandra, you may go now. :)" | |
| else | |
| puts "HUH?! SPEAK UP, SANDRA!" | |
| speak | |
| end | |
| end | |
| puts "Hello, Sandra, anything you want?" | |
| user_input = gets.chomp | |
| deaf_aunty(user_input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment