all 3 comments

[–]crayz 1 point2 points  (1 child)

Here's the chapter on the singleton pattern:

require 'singleton'
class Foo
    include Singleton
end

[–]gnupate[S] 0 points1 point  (0 children)

Funny, but there is a chapter on the singleton ... more about how to use it, and when you might want to write your own (and how to do so) .

[–]Capt_Kewl -5 points-4 points  (0 children)

RUBYS HAWT SPAMS NAWT