Skip to content

Instantly share code, notes, and snippets.

@MikaAK
Created June 4, 2014 00:34
Show Gist options
  • Save MikaAK/f6e59280b83c491a14fe to your computer and use it in GitHub Desktop.
Save MikaAK/f6e59280b83c491a14fe to your computer and use it in GitHub Desktop.
Shakil The Dog
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