class PmdTester::RunningDiffCounters

A bunch of counters to summarize differences

Attributes

base_total[RW]
changed[RW]
new[RW]
patch_total[RW]
removed[RW]

Public Class Methods

new(base_total) click to toggle source
# File lib/pmdtester/report_diff.rb, line 8
def initialize(base_total)
  @base_total = base_total
  @patch_total = 0

  @new = @removed = @changed = 0
end

Public Instance Methods

changed_total() click to toggle source
# File lib/pmdtester/report_diff.rb, line 15
def changed_total
  new + removed + changed
end
merge!(other) click to toggle source
# File lib/pmdtester/report_diff.rb, line 19
def merge!(other)
  self.changed += other.changed
  self.new += other.new
  self.removed += other.removed
  self.base_total += other.base_total
  self.patch_total += other.patch_total
end
to_h() click to toggle source
# File lib/pmdtester/report_diff.rb, line 27
def to_h
  {
    changed: changed,
    new: new,
    removed: removed,
    base_total: base_total,
    patch_total: patch_total
  }
end
to_s() click to toggle source
# File lib/pmdtester/report_diff.rb, line 37
def to_s
  "RunningDiffCounters[#{to_h}]"
end