DataMapper::Serializer::ValidationErrors::ToYaml

Public Instance Methods

encode_with(coder) click to toggle source

A callback to encode the errors 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 108
108:         def encode_with(coder)
109:           coder.map = Hash[errors]
110:         end
to_yaml(*args) click to toggle source

Serialize the errors to YAML

@example

  yaml = errors.to_yaml  # => a valid YAML string

@param [Hash] options

@return [String]

@api public

    # File lib/dm-serializer/to_yaml.rb, line 96
96:         def to_yaml(*args)
97:           Hash[errors].to_yaml(*args)
98:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.