Skip to content

Instantly share code, notes, and snippets.

@JustSilverman
Created January 28, 2013 20:52
Show Gist options
  • Save JustSilverman/4658893 to your computer and use it in GitHub Desktop.
Save JustSilverman/4658893 to your computer and use it in GitHub Desktop.
Deaf Grandma
def deaf_grandma
loop do
response = gets.chomp
if response == "I love ya, Grandma, but I've got to go."
break
elsif curse_word_check(response)
puts "Make your own Fucking meatloaf"
elsif response.upcase == response
puts "NO, NOT SINCE 1983!"
else
puts "HUH?! SPEAK UP, SONNY!"
end
end
end
def curse_words
['fuck', 'shit']
end
def curse_word_check(response)
response.split(' ').each do |x|
if curse_words.include?(x.downcase)
return true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment