I donβt know if you know about it, but when you do class Class ... end
, you do not create a new class called Class
, you open the existing Class class again.
Since Class
is a class that all classes are instances of, this means that Class
is an instance of itself. And because of this, you can call any methods of an instance of Class
directly on Class
just like you can in any other class.
source share