Class: MasterDataTool::Report::VerifyReport
- Inherits:
-
Object
- Object
- MasterDataTool::Report::VerifyReport
- Includes:
- Core
- Defined in:
- lib/master_data_tool/report/verify_report.rb
Instance Attribute Summary collapse
-
#reports ⇒ Object
readonly
Returns the value of attribute reports.
Attributes included from Core
Class Method Summary collapse
Instance Method Summary collapse
- #append(report:) ⇒ Object
-
#initialize(master_data:) ⇒ VerifyReport
constructor
A new instance of VerifyReport.
- #print(printer:) ⇒ Object
Constructor Details
#initialize(master_data:) ⇒ VerifyReport
Returns a new instance of VerifyReport.
10 11 12 13 |
# File 'lib/master_data_tool/report/verify_report.rb', line 10 def initialize(master_data:) super(master_data: master_data) @reports = [] end |
Instance Attribute Details
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
8 9 10 |
# File 'lib/master_data_tool/report/verify_report.rb', line 8 def reports @reports end |
Class Method Details
.build_verify_record_report(master_data:, record:, valid:) ⇒ Object
26 27 28 |
# File 'lib/master_data_tool/report/verify_report.rb', line 26 def build_verify_record_report(master_data:, record:, valid:) { operation: :verify, table_name: master_data.table_name, valid: valid, id: record.id } end |
Instance Method Details
#append(report:) ⇒ Object
15 16 17 |
# File 'lib/master_data_tool/report/verify_report.rb', line 15 def append(report:) @reports << report end |
#print(printer:) ⇒ Object
19 20 21 22 23 |
# File 'lib/master_data_tool/report/verify_report.rb', line 19 def print(printer:) @reports.each do |report| printer.print(message: convert_to_ltsv(report)) end end |