Re:Better Know a Ruby Thing: Singleton Classes
by mrinterweb on Friday January 31, 2025 @06:10PM
(#42893495)
Don't forget about the Singleton module ("include Singleton"). This one trips me up in terms of what is being referred to as a "singleton". This is more of an singleton class instance where there can only be only one class instance per-class. https://ruby-doc.org/3.4.1/stdlibs/singleton/Singleton.html
[ Parent
| on HN ]
There are no comments on this comment yet.