Class: Commons::Integrity::Report
- Inherits:
-
Object
- Object
- Commons::Integrity::Report
- Defined in:
- lib/commons/integrity/report.rb
Overview
Collate the errors from all reports applying to a file
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(file:, config: nil) ⇒ Report
constructor
A new instance of Report.
Constructor Details
#initialize(file:, config: nil) ⇒ Report
Returns a new instance of Report.
13 14 15 16 |
# File 'lib/commons/integrity/report.rb', line 13 def initialize(file:, config: nil) @file = Pathname.new(file) @config = config end |
Instance Method Details
#errors ⇒ Object
18 19 20 |
# File 'lib/commons/integrity/report.rb', line 18 def errors relevant_checks.flat_map { |check| check.new(file).errors } end |