module LLT::Review::Helpers::ReviewReporter

Attributes

unique[R]

While all classes that include ReviewReporter also include HashContainable, we cannot include it here, as HashContainable contains ClassMethods that otherwise won't reach the object that need it

Public Class Methods

new(item) click to toggle source
Calls superclass method
# File lib/llt/review/helpers/diff_reporter.rb, line 10
def initialize(item)
  super(item.id)
  @item = item
end

Public Instance Methods

diff_id() click to toggle source
# File lib/llt/review/helpers/diff_reporter.rb, line 19
def diff_id
  @diff_id ||= "#{id}:#{map { |_, v| v.diff_id }.join('::')}"
end
item() click to toggle source
# File lib/llt/review/helpers/diff_reporter.rb, line 15
def item
  @item
end
report_diff(report, uniques = nil) click to toggle source
# File lib/llt/review/helpers/diff_reporter.rb, line 27
def report_diff(report, uniques = nil)
  report_unique = report_unique?(uniques)
  @unique = report_unique ? 1 : 0
  write_to_report(report, report_unique)
  each_value { |v| v.report_diff(report, uniques) }
end
xml_attributes() click to toggle source
Calls superclass method
# File lib/llt/review/helpers/diff_reporter.rb, line 23
def xml_attributes
  super.merge(unique: @unique)
end

Private Instance Methods

report_unique?(uniques) click to toggle source
# File lib/llt/review/helpers/diff_reporter.rb, line 36
def report_unique?(uniques)
  return unless uniques && ! uniques.include?(diff_id)
  !! (uniques << diff_id)
end
write_to_report(report, unique) click to toggle source
# File lib/llt/review/helpers/diff_reporter.rb, line 41
def write_to_report(report, unique)
end