From: Brian Candler Date: 2004-10-22T00:43:26+09:00 Subject: Re: Singleton Class or Module Functions? > module Foo > class << self > def initialize > puts "Never called" > end > end > end module Foo puts "Called once when module loaded" end But maybe you want to defer this until some later point in time. You could always write module Foo def self.setup return if defined?(@initialized) @initialized = true puts "Doing it once" end end Foo.setup Foo.setup but that's not thread-safe; if that's a concern then Singleton is going to be better. Regards, Brian.