Ruby - Class Methods and Variables
You want to track the number of instances created for a class and all its subclasses separately without interference. Why is using a class variable (
@@count) a bad idea, and what is a better alternative?