Class: Maildir::Serializer::YAML

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

Overview

Serialize messages as YAML

Instance Method Summary collapse

Instance Method Details

#dump(data, path) ⇒ Object

Dump data as YAML and writes it to path.



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

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

#load(path) ⇒ Object

Read data from path and parse it as YAML.



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

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