Class: Madeleine::Automatic::Automatic_marshaller

Inherits:
Object
  • Object
show all
Defined in:
lib/madeleine/automatic.rb

Overview

add new objects to the list in AutomaticSnapshotMadeleine

Class Method Summary collapse

Class Method Details

.dump(obj, io = nil) ⇒ Object



161
162
163
# File 'lib/madeleine/automatic.rb', line 161

def Automatic_marshaller.dump(obj, io = nil)
  Thread.current[:system].marshaller.dump(obj, io)
end

.load(io) ⇒ Object

:nodoc:



155
156
157
158
159
160
# File 'lib/madeleine/automatic.rb', line 155

def Automatic_marshaller.load(io)
  restored_obj = Deserialize.load(io, Thread.current[:system].marshaller)
p restored_obj if restored_obj.class != Prox
  ObjectSpace.each_object(Prox) {|o| Thread.current[:system].restore(o) if (o.sysid == restored_obj.sysid)}
  restored_obj
end