Class: MasterDataTool::Report::VerifyReport

Inherits:
Object
  • Object
show all
Includes:
Core
Defined in:
lib/master_data_tool/report/verify_report.rb

Instance Attribute Summary collapse

Attributes included from Core

#master_data

Class Method Summary collapse

Instance Method Summary collapse

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

#reportsObject (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


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