December 2011
1 post
2 tags
Sharing static variables through the inheritance...
I’ve been struggling a couple of hours with trying to declare static variables inside subclasses that can be used in the baseclass. Unfortunately ruby shares the class variables across all subclasses, this can lead into some unexpected behavior, see the following example: After a lot of googling I gladly came across class_attribute. Declare a class-level attribute whose value is inheritable...
Dec 5th