Class: Maildir::Serializer::Marshal

Inherits:
Base
  • Object
show all
Defined in:
lib/maildir/serializer/marshal.rb

Overview

Serialize messages as Marshalled ruby objects

Instance Method Summary collapse

Instance Method Details

#dump(data, path) ⇒ Object

Marshal data and write it to path.



11
12
13
# File 'lib/maildir/serializer/marshal.rb', line 11

def dump(data, path)
  super(::Marshal.dump(data), path)
end

#load(path) ⇒ Object

Read data from path and unmarshal it.



6
7
8
# File 'lib/maildir/serializer/marshal.rb', line 6

def load(path)
  ::Marshal.load(super(path))
end