class Consyncful::Stats

Responsible for recording changes during a sync for outputting in logs

Public Class Methods

new() click to toggle source
# File lib/consyncful/stats.rb, line 9
def initialize
  @stats = {
    records_added: 0,
    records_updated: 0,
    records_deleted: 0
  }
end

Public Instance Methods

print_stats() click to toggle source
record_added() click to toggle source
# File lib/consyncful/stats.rb, line 17
def record_added
  @stats[:records_added] += 1
end
record_deleted() click to toggle source
# File lib/consyncful/stats.rb, line 25
def record_deleted
  @stats[:records_deleted] += 1
end
record_updated() click to toggle source
# File lib/consyncful/stats.rb, line 21
def record_updated
  @stats[:records_updated] += 1
end