Class: DatabaseConsistency::Writers::SimpleWriter

Inherits:
BaseWriter
  • Object
show all
Defined in:
lib/database_consistency/writers/simple_writer.rb

Overview

The simplest formatter

Instance Attribute Summary

Attributes inherited from BaseWriter

#config, #results

Instance Method Summary collapse

Methods inherited from BaseWriter

#initialize, write

Constructor Details

This class inherits a constructor from DatabaseConsistency::Writers::BaseWriter

Instance Method Details

#writeObject



8
9
10
11
12
13
14
15
# File 'lib/database_consistency/writers/simple_writer.rb', line 8

def write
  results.select(&method(:write?))
         .map(&method(:writer))
         .group_by(&:unique_key)
         .each_value do |writers|
    puts message(writers)
  end
end