Class: PmdTester::CpdReport
- Inherits:
-
Object
- Object
- PmdTester::CpdReport
- Defined in:
- lib/pmdtester/cpd_report_diff.rb
Overview
A full CPD report, created by the report XML parser, can be diffed with another report into a CpdReportDiff
Instance Attribute Summary collapse
-
#duplications ⇒ Object
readonly
Returns the value of attribute duplications.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#report_details ⇒ Object
readonly
Returns the value of attribute report_details.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(report_details:, report_document:, file:) ⇒ CpdReport
constructor
A new instance of CpdReport.
Constructor Details
#initialize(report_details:, report_document:, file:) ⇒ CpdReport
Returns a new instance of CpdReport.
11 12 13 14 15 16 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 11 def initialize(report_details:, report_document:, file:) initialize_empty initialize_with_report_document report_document unless report_document.nil? @report_details = report_details @file = file end |
Instance Attribute Details
#duplications ⇒ Object (readonly)
Returns the value of attribute duplications.
7 8 9 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 7 def duplications @duplications end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 7 def errors @errors end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
7 8 9 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 7 def file @file end |
#report_details ⇒ Object (readonly)
Returns the value of attribute report_details.
7 8 9 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 7 def report_details @report_details end |
Class Method Details
.empty ⇒ Object
18 19 20 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 18 def self.empty new(report_details: PmdTester::PmdReportDetail.empty, report_document: nil, file: '') end |