Class: Singleton

Inherits:
Object
  • Object
show all
Included in:
Again
Defined in:
lib/again/patches/singleton.rb

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



12
13
14
15
16
# File 'lib/again/patches/singleton.rb', line 12

def included(klass)
  return if klass.instance_variable_get(:@singleton_included)
  included_without_guard(klass)
  klass.instance_variable_set(:@singleton_included, true)
end

.included_without_guardObject



10
# File 'lib/again/patches/singleton.rb', line 10

alias :included_without_guard :included