Class: Gitlab::Ci::Reports::ReportsComparer
- Inherits:
-
Object
- Object
- Gitlab::Ci::Reports::ReportsComparer
show all
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/ci/reports/reports_comparer.rb
Constant Summary
collapse
- STATUS_SUCCESS =
'success'
- STATUS_FAILED =
'failed'
- STATUS_NOT_FOUND =
'not_found'
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(base_report, head_report) ⇒ ReportsComparer
Returns a new instance of ReportsComparer.
15
16
17
18
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 15
def initialize(base_report, head_report)
@base_report = base_report
@head_report = head_report
end
|
Instance Attribute Details
#base_report ⇒ Object
Returns the value of attribute base_report.
13
14
15
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 13
def base_report
@base_report
end
|
#head_report ⇒ Object
Returns the value of attribute head_report.
13
14
15
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 13
def head_report
@head_report
end
|
Instance Method Details
#errors_count ⇒ Object
46
47
48
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 46
def errors_count
raise NotImplementedError
end
|
#existing_errors ⇒ Object
34
35
36
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 34
def existing_errors
raise NotImplementedError
end
|
#new_errors ⇒ Object
38
39
40
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 38
def new_errors
raise NotImplementedError
end
|
#not_found? ⇒ Boolean
58
59
60
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 58
def not_found?
status == STATUS_NOT_FOUND
end
|
#resolved_count ⇒ Object
50
51
52
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 50
def resolved_count
resolved_errors.size
end
|
#resolved_errors ⇒ Object
42
43
44
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 42
def resolved_errors
raise NotImplementedError
end
|
#success? ⇒ Boolean
30
31
32
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 30
def success?
raise NotImplementedError
end
|
#total_count ⇒ Object
54
55
56
|
# File 'lib/gitlab/ci/reports/reports_comparer.rb', line 54
def total_count
existing_errors.size + new_errors.size
end
|