Module: Singleton

Instance Method Summary collapse

Instance Method Details

#duplicable?Boolean

Singleton instances are not duplicable:

Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton

Returns:

  • (Boolean)


57
58
59
# File 'activesupport/lib/active_support/core_ext/object/duplicable.rb', line 57

def duplicable?
  false
end