Module: Orbit::Singleton::ClassMethods

Defined in:
lib/orbit/singleton.rb

Instance Method Summary collapse

Instance Method Details

#instanceObject



14
15
16
# File 'lib/orbit/singleton.rb', line 14

def instance
  @instance ||= new
end

#instance=(instance) ⇒ Object



18
19
20
# File 'lib/orbit/singleton.rb', line 18

def instance=(instance)
  @instance = instance
end

#instantiated?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/orbit/singleton.rb', line 22

def instantiated?
  !!@instance
end