6 Matching Annotations
  1. Sep 2021
    1. The important thing to understand is that there is no such thing as a class method in Ruby. A class method is really just a singleton method. There is nothing special about class methods. Every object can have singleton methods. We just call them "class methods" when the object is a Class because "singleton method of an instance of Class" is too long and unwieldy.
    2. Class methods are actually instance methods defined on the singleton class of a class.
  2. Apr 2021