Accessing Singleton Class
suggest changeThere are two ways to get singleton class of an object
singleton_class
method.- Reopening singleton class of an object and returning
self
.
object.singleton_class
—singleton_class = class << object self end
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents