Module: DataMapper::Serializer::Collection::ToYaml

### Home Classes Methods

### In Files

- lib/dm-serializer/to_yaml.rb

### Methods

- #encode_with
- #to_yaml

### Files

- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- DataMapper
- DataMapper::Collection
- DataMapper::Serializer
- DataMapper::Serializer::Collection
- DataMapper::Serializer::Collection::ToYaml
- DataMapper::Serializer::ValidationErrors
- DataMapper::Serializer::ValidationErrors::ToCsv
- DataMapper::Serializer::ValidationErrors::ToJson
- DataMapper::Serializer::ValidationErrors::ToXml
- DataMapper::Serializer::ValidationErrors::ToYaml
- DataMapper::Serializer::XML
- DataMapper::Serializer::XML::LibXML
- DataMapper::Serializer::XML::Nokogiri
- DataMapper::Serializer::XML::REXML
- DataMapper::Validations
- DataMapper::Validations::ValidationErrors
- Object

No matching classes.

# 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.