This post originated from an RSS feed registered with Ruby Buzz
by Patrick Farley.
Original Post: The Singleton Class
Feed Title: Klank Boom Klang
Feed URL: http://klankboomklang.com/feed/
Feed Description: Ruby and otherwise by Patrick Farley
There’s no shortage of literature on singleton classes, but it’s rare to see an explanation that covers implementation. This is unfortunate, as the implementation is not complex and familiarity with it leads to a more nuanced understanding.
A good way to look at singleton classes is to ask the question, “What is it that Ruby [...]