module DataMapper::Serializer::Collection::ToYaml
Public Instance Methods
encode_with(coder)
click to toggle source
A callback to encode the collection in the YAML stream
@param [#add] coder
handles adding the values to the output
@return [undefined]
@api public
# File lib/dm-serializer/to_yaml.rb, line 140 def encode_with(coder) coder.seq = to_a end
to_yaml(*args)
click to toggle source
Serialize
the collection to YAML
@example
yaml = collection.to_yaml # => a valid YAML string
@param [Hash] options
@return [String]
@api public
# File lib/dm-serializer/to_yaml.rb, line 128 def to_yaml(*args) to_a.to_yaml(*args) end