Module: Marshal

Defined in:
opal/opal/corelib/marshal.rb,
opal/opal/corelib/marshal/read_buffer.rb,
opal/opal/corelib/marshal/write_buffer.rb

Defined Under Namespace

Classes: BinaryString, ReadBuffer, WriteBuffer

Constant Summary

MAJOR_VERSION =
4
MINOR_VERSION =
8

Class Method Summary collapse

Class Method Details

.dump(object) ⇒ Object



21
22
23
# File 'opal/opal/corelib/marshal.rb', line 21

def dump(object)
  WriteBuffer.new(object).write
end

.load(marshaled) ⇒ Object Also known as: restore



25
26
27
# File 'opal/opal/corelib/marshal.rb', line 25

def load(marshaled)
  ReadBuffer.new(marshaled).read
end