Class: A

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/singleton.rb

Constant Summary

Constants included from Singleton

Singleton::FirstInstanceCall

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Singleton

__init__, #clone, #dup

Instance Attribute Details

#dieObject

Returns the value of attribute die



301
302
303
# File 'lib/singleton.rb', line 301

def die
  @die
end

#persistObject

Returns the value of attribute persist



301
302
303
# File 'lib/singleton.rb', line 301

def persist
  @persist
end

Class Method Details

._load(str) ⇒ Object



308
309
310
311
# File 'lib/singleton.rb', line 308

def A._load(str)
  instance.persist = Marshal.load(str)
  instance
end

Instance Method Details

#_dump(depth) ⇒ Object



302
303
304
305
# File 'lib/singleton.rb', line 302

def _dump(depth)
  # this strips the @die information from the instance
  Marshal.dump(@persist,depth)
end