Method: DatabaseConsistency::Writers::TodoWriter#write

Defined in:
lib/database_consistency/writers/todo_writer.rb

#writeObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/database_consistency/writers/todo_writer.rb', line 8

def write
  h = results.each_with_object({}) do |result, hash|
    next unless write?(result.status)

    assign_result(hash, result)
  end

  sorted_hash = sort(h)

  File.write(file_name, sorted_hash.to_yaml)
end