Module: DataMapper::Serializer::Collection::ToYaml
- Included in:
- Collection
- Defined in:
- lib/dm-serializer/to_yaml.rb
Instance Method Summary collapse
-
#encode_with(coder) ⇒ undefined
A callback to encode the collection in the YAML stream.
-
#to_yaml(*args) ⇒ String
Serialize the collection to YAML.
Instance Method Details
#encode_with(coder) ⇒ undefined
A callback to encode the collection in the YAML stream
140 141 142 |
# File 'lib/dm-serializer/to_yaml.rb', line 140 def encode_with(coder) coder.seq = to_a end |
#to_yaml(*args) ⇒ String
Serialize the collection to YAML
128 129 130 |
# File 'lib/dm-serializer/to_yaml.rb', line 128 def to_yaml(*args) to_a.to_yaml(*args) end |