Skip to content

Instantly share code, notes, and snippets.

@andrewclk
Forked from nextacademy-private/deaf_aunty.rb
Last active November 30, 2015 21:20
Show Gist options
  • Select an option

  • Save andrewclk/5ce27d54ddf3671189eb to your computer and use it in GitHub Desktop.

Select an option

Save andrewclk/5ce27d54ddf3671189eb to your computer and use it in GitHub Desktop.
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