Class: DatabaseConsistency::Writers::TodoWriter
- Inherits:
-
BaseWriter
- Object
- BaseWriter
- DatabaseConsistency::Writers::TodoWriter
- Defined in:
- lib/database_consistency/writers/todo_writer.rb
Overview
The writer that generates to-do file
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
#write ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/database_consistency/writers/todo_writer.rb', line 8 def write hash = results.each_with_object({}) do |result, hash| next unless write?(result.status) assign_result(hash, result) end File.write(file_name, hash.to_yaml) end |
#write?(status) ⇒ Boolean
18 19 20 |
# File 'lib/database_consistency/writers/todo_writer.rb', line 18 def write?(status) status == :fail end |