Class: Maildir::Serializer::YAML
- Defined in:
- lib/maildir/serializer/yaml.rb
Overview
Serialize messages as YAML
Instance Method Summary collapse
-
#dump(data, path) ⇒ Object
Dump data as YAML and writes it to path.
-
#load(path) ⇒ Object
Read data from path and parse it as YAML.
Instance Method Details
#dump(data, path) ⇒ Object
Dump data as YAML and writes it to path.
10 11 12 |
# File 'lib/maildir/serializer/yaml.rb', line 10 def dump(data, path) super(data.to_yaml, path) end |
#load(path) ⇒ Object
Read data from path and parse it as YAML.
5 6 7 |
# File 'lib/maildir/serializer/yaml.rb', line 5 def load(path) ::YAML.load(super(path)) end |