Last active
September 2, 2015 02:59
-
-
Save heavymetta/a02212ed350a16b3cc9a 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 | |
puts "Your with shakil" | |
puts "Say something" | |
carryon = true | |
while carryon | |
userInput = gets.chomp.downcase | |
case userInput | |
when "woof" | |
puts "WOOF"*3 | |
when "shakil stop" || "shakil stop!" | |
puts " " | |
when "meow" | |
puts "meow"*3 | |
when /.*treat.*/ | |
puts "be patient" | |
when "go away" | |
carryon = false | |
end | |
end | |
end | |
shakil_the_dog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment