Skip to content

Instantly share code, notes, and snippets.

@charmainetham
Created April 27, 2016 02:00
Show Gist options
  • Save charmainetham/0efbbb468ce0a381857a2b93125ed3c4 to your computer and use it in GitHub Desktop.
Save charmainetham/0efbbb468ce0a381857a2b93125ed3c4 to your computer and use it in GitHub Desktop.
SHAKIL THE DOG
#AFTER CODE REVIEW
def shakil_the_dog
response = nil
until (response == "go away")
puts "what would you like to say to Shakil?"
response = gets.chomp.downcase
case
when response == "woof" then puts "WOOF WOOF WOOF"
when response == ("shakil stop" || "Shakil STOP!") then puts "*no response*"
when response == "meow" then puts "woof woof woof woof woof"
when response.include?("treat") then puts "* ~ waiting patiently for treats ~ * "
else
puts "woof"
end
end
end
# Run our method
shakil_the_dog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment