module Singleton::SingletonInstanceMethods

Public Instance Methods

_dump(depth = -1) click to toggle source

By default, do not retain any state when marshalling.

# File lib/singleton.rb, line 109
def _dump(depth = -1)
  ''
end
clone() click to toggle source

Raises a TypeError to prevent cloning.

# File lib/singleton.rb, line 99
def clone
  raise TypeError, "can't clone instance of singleton #{self.class}"
end
dup() click to toggle source

Raises a TypeError to prevent duping.

# File lib/singleton.rb, line 104
def dup
  raise TypeError, "can't dup instance of singleton #{self.class}"
end