Class: Maildir::Serializer::Mail

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

Overview

Serialize messages as a ruby Mail object

Instance Method Summary collapse

Instance Method Details

#dump(data, path) ⇒ Object

Write data to path as a Mail message.



12
13
14
# File 'lib/maildir/serializer/mail.rb', line 12

def dump(data, path)
  super(data.to_s, path)
end

#load(path) ⇒ Object

Build a new Mail object from the data at path.



7
8
9
# File 'lib/maildir/serializer/mail.rb', line 7

def load(path)
  ::Mail.new(super(path))
end