Module: LLT::Review::Helpers::ReviewReporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#uniqueObject (readonly)

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



8
9
10
# File 'lib/llt/review/helpers/diff_reporter.rb', line 8

def unique
  @unique
end

Instance Method Details

#diff_idObject



19
20
21
# File 'lib/llt/review/helpers/diff_reporter.rb', line 19

def diff_id
  @diff_id ||= "#{id}:#{map { |_, v| v.diff_id }.join('::')}"
end

#initialize(item) ⇒ Object



10
11
12
13
# File 'lib/llt/review/helpers/diff_reporter.rb', line 10

def initialize(item)
  super(item.id)
  @item = item
end

#itemObject



15
16
17
# File 'lib/llt/review/helpers/diff_reporter.rb', line 15

def item
  @item
end

#report_diff(report, uniques = nil) ⇒ Object



27
28
29
30
31
32
# 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_attributesObject



23
24
25
# File 'lib/llt/review/helpers/diff_reporter.rb', line 23

def xml_attributes
  super.merge(unique: @unique)
end