Module: Singleton::SingletonClassMethods
Do not use. This module is for internal use only.
Relationships & Source Files | |
Defined in: | lib/singleton.rb |
Instance Method Summary
-
#_load(str)
By default calls instance().
- #clone
- #instance
- #inherited(sub_klass) private
Instance Method Details
#_load(str)
By default calls instance(). Override to retain singleton state.
# File 'lib/singleton.rb', line 119
def _load(str) instance end
#clone
[ GitHub ]#inherited(sub_klass) (private)
[ GitHub ]#instance
[ GitHub ]# File 'lib/singleton.rb', line 123
def instance # :nodoc: return @singleton__instance__ if @singleton__instance__ @singleton__mutex__.synchronize { return @singleton__instance__ if @singleton__instance__ @singleton__instance__ = new() } @singleton__instance__ end