Skip to content

Instantly share code, notes, and snippets.

@vosechu
Last active December 17, 2015 19:09
Show Gist options
  • Save vosechu/5658490 to your computer and use it in GitHub Desktop.
Save vosechu/5658490 to your computer and use it in GitHub Desktop.
Dog/cat get in fight
class Dog
def bark_at(cat)
"Curse you #{cat}!!"
end
end
class Cat
def initialize(name)
@name = name
end
def to_s
sleep 3
@name
end
end
c = Cat.new('meowkins')
d = Dog.new
d.bark_at(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment