Class: YamlMarshaller
- Inherits:
-
Object
- Object
- YamlMarshaller
- Defined in:
- lib/internal/marshallers/yaml_marshaller.rb
Instance Method Summary collapse
Instance Method Details
#restore(stream) ⇒ Object
16 17 18 19 |
# File 'lib/internal/marshallers/yaml_marshaller.rb', line 16 def restore(stream) content = Marshal.load( stream ) YAML.load(content) end |
#serialize(graph) ⇒ Object
6 7 8 9 |
# File 'lib/internal/marshallers/yaml_marshaller.rb', line 6 def serialize(graph) content = YAML.dump(graph) Marshal.dump( content ) end |
#serialize_to_stream(graph, stream) ⇒ Object
11 12 13 14 |
# File 'lib/internal/marshallers/yaml_marshaller.rb', line 11 def serialize_to_stream(graph, stream) content = YAML.dump(graph) Marshal.dump( content, stream ) end |