Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • singleton.rb

Methods

Class/Module Index [+]

Quicksearch

Singleton::SingletonClassMethods

Public Instance Methods

_load(str) click to toggle source
 
               # File singleton.rb, line 86
def _load(str)
  instance
end
            
clone() click to toggle source

properly clone the Singleton pattern - did you know that duping doesn’t copy class methods?

 
               # File singleton.rb, line 82
def clone
  Singleton.__init__(super)
end