Skip to content

Instantly share code, notes, and snippets.

@benjaminyeo
Forked from nextacademy-private/deaf_aunty.rb
Created September 11, 2015 10:17
Show Gist options
  • Select an option

  • Save benjaminyeo/5022fb23f4a0fbf41cfc to your computer and use it in GitHub Desktop.

Select an option

Save benjaminyeo/5022fb23f4a0fbf41cfc to your computer and use it in GitHub Desktop.
def get_input
print "Say something"
input = gets.chomp
end
def deaf_aunty
sandra = get_input
while sandra != "I love ya, aunty, but i've got to go."
shout = sandra.upcase
if sandra != shout
puts "HUH?! SPEAK UP, SANDRA!"
sandra = get_input
elsif sandra == ""
sandra = get_input
break if sandra == ""
elsif sandra == shout
puts "NO, WE CAN'T DO THAT!"
sandra = get_input
end
end
end
deaf_aunty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment