The first important thing to note is that classes in ruby are just like most ruby objects in that they have their own singleton classes.
When you call a method directly on the class, it is going to look in the class's singleton class first.