Skip to content

Instantly share code, notes, and snippets.

@sixtyfive
Created July 3, 2019 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixtyfive/f79dfc1e5ad2ad7f62b682d989919120 to your computer and use it in GitHub Desktop.
Save sixtyfive/f79dfc1e5ad2ad7f62b682d989919120 to your computer and use it in GitHub Desktop.
def col_stats(col, err = nil)
@cols.send(col).stats ||= {entries: 0, faulty_ones: 0, total_errors: 0}
unless err
@cols.send(col).stats[:entries] += 1
else
@cols.send(col).stats[:faulty_ones] += 1
@cols.send(col).stats[:total_errors] += err
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment