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 [#] coder

  handles adding the values to the output

@return [undefined]

@api public

     # File lib/dm-serializer/to_yaml.rb, line 140
140:         def encode_with(coder)
141:           coder.seq = to_a
142:         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
128:         def to_yaml(*args)
129:           to_a.to_yaml(*args)
130:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.