Syntax

Remarks

Singleton classes only have one instance: their corresponding object. This can be verified by querying Ruby’s [ObjectSpace](<http://ruby-doc.org/core/ObjectSpace.html>):

instances = ObjectSpace.each_object object.singleton_class

instances.count            # => 1
instances.include? object  # => true

Using [\\<](<http://ruby-doc.org/core/Module.html#method-i-3C>), they can also be verified to be subclasses of the object’s actual class:

object.singleton_class < object.class  # => true

References: