ITP2 - OOP Tutorials - Inheritance - Class Inheritance

In the GoodDog class, we're overriding the speak method in the Animal
class because Ruby checks the object's class first for the method before
it looks in the superclass. So, that means when we wrote the code
sparky.speak, it first looked at sparky's class, which is GoodDog. It
found the speak method there and used it. When we wrote the code
paws.speak, Ruby first looked at paws's class, which is Cat. It did not
find a speak method there, so it continued to look in Cat's superclass,
Animal. It found a speak method in Animal, and used it.