Created
June 4, 2014 00:34
-
-
Save MikaAK/f6e59280b83c491a14fe to your computer and use it in GitHub Desktop.
Shakil The Dog
This file contains 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 shakil_the_dog | |
while true | |
print "Give shakil a command: " | |
input = gets.chomp | |
case input | |
when 'woof' | |
puts "WOOF WOOF WOOF" | |
when 'shakil stop' || 'shakil STOP!' | |
puts ' ' | |
when 'meow' | |
puts "woof woof woof woof woof" | |
when /^treat$/ | |
puts 'shakilexpectsatreat' | |
when 'go away' | |
break | |
else | |
puts 'woof' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment