W3cubDocs

/Ruby on Rails 7.0

module Singleton

Public Instance Methods

duplicable?() Show source
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 57
def duplicable?
  false
end

Singleton instances are not duplicable:

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

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.