3 Comments
To access a class method from an instance, you have to use the reference to that class (because that’s where the method resides). The attribute reader that returns that reference is named class
I like to remind myself that a method never floats in the air and that it is always contained into an object. That’s why I prefer to specify a receiver before the name of a method… no wonder if I’m outside the object or inside the object.
First of all, let’s go back to the basics. What we generally call a class method is a method that resides at the class level. On the opposite, an instance method is a method that resides at the object level. The thing is, a class is also an object.