Module: Singleton

Included in:
ActiveSupport::Deprecation
Defined in:
lib/active_support/core_ext/object/duplicable.rb

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)


66
67
68
# File 'lib/active_support/core_ext/object/duplicable.rb', line 66

def duplicable?
  false
end