Methods

DataMapper::Serializer::ValidationErrors::ToCsv

Public Instance Methods

to_csv(*args) click to toggle source
    # File lib/dm-serializer/to_csv.rb, line 34
34:         def to_csv(*args)
35:           options = args.first || {}
36:           options = options.to_h if options.respond_to?(:to_h)
37:           options[:writer] = '' unless options.has_key? :writer
38: 
39:           CSV.generate(options[:writer]) do |csv|
40:             errors.each do |key, value|
41:               value.each do |error|
42:                 row = []
43:                 row << key.to_s
44:                 row << error.to_s
45:                 csv << row
46:               end
47:             end
48:           end
49:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.