Class: DatabaseConsistency::Writers::SimpleWriter
- Inherits:
-
BaseWriter
- Object
- BaseWriter
- DatabaseConsistency::Writers::SimpleWriter
- Defined in:
- lib/database_consistency/writers/simple_writer.rb
Overview
The simplest formatter
Constant Summary collapse
- COLORS =
{ blue: "\e[34m", yellow: "\e[33m", green: "\e[32m", red: "\e[31m" }.freeze
Instance Attribute Summary
Attributes inherited from BaseWriter
Instance Method Summary collapse
Methods inherited from BaseWriter
Constructor Details
This class inherits a constructor from DatabaseConsistency::Writers::BaseWriter
Instance Method Details
#msg(result) ⇒ Object
23 24 25 26 27 |
# File 'lib/database_consistency/writers/simple_writer.rb', line 23 def msg(result) msg = "#{status_text(result)} #{key_text(result)} #{result.}" msg += " (checker: #{result.checker_name})" if config.debug? msg end |
#write ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/database_consistency/writers/simple_writer.rb', line 15 def write results.each do |result| next unless write?(result.status) puts msg(result) end end |