If You Were A Ruby Class

—Thursday, February 23 2006

When I first came to Ruby I was a bit confused about Modules and Classes, well today I have finally found an explanation that I believe will help others understand.

If you and your siblings were Ruby Classes, your Uncle would be a Module that could impart infinite wisdom on both you and your siblings. So depending on your Uncles profession you could end up learning how to design a Bong from the exhaust pipes of a 76 Monte Carlo or how to prepare for next weeks Chemistry exam.

Now If you’ve got kids, they are your SubClasses. Your children inherit wisdom directly from you, so if you know all the notes to Mozart’s 40th Symphony, your children do too. Be careful though—Little Johnny could be getting high if he’s been over his Uncles house!

(Thanks Insomnia! You produced yet another jewel.)