Last active
May 25, 2016 02:12
-
-
Save Olgaliber/3055ade799e151a6c72b3f694d920a13 to your computer and use it in GitHub Desktop.
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
# shakil_the_dog.rb | |
def shakil_the_dog | |
puts "give shakil a command" | |
user_input = gets.chomp | |
case user_input.downcase | |
when "woof" | |
puts "WOOF WOOF WOOF" | |
when "shakil stop", "shakil stop!" | |
puts "yey! no more barking!" | |
when "meow" | |
puts "woof woof woof woof woof" | |
when "treat" | |
puts "shakil is quiet because he is thinks he's getting a treat" | |
when "go away" | |
exit | |
else | |
puts "this not a command!" | |
end | |
end | |
while true | |
shakil_the_dog | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment