Class: Spellr::CheckParallel
- Defined in:
- lib/spellr/check_parallel.rb
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
-
#check ⇒ Object
rubocop:disable Metrics/MethodLength.
Methods inherited from Check
Methods included from StringFormat
aqua, bold, green, key, lighten, normal, pluralize, red
Constructor Details
This class inherits a constructor from Spellr::Check
Instance Method Details
#check ⇒ Object
rubocop:disable Metrics/MethodLength
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/spellr/check_parallel.rb', line 10 def check # rubocop:disable Metrics/MethodLength acc_reporter = @reporter Parallel.each(files, finish: ->(_, _, result) { acc_reporter.output << result }) do |file| @reporter = acc_reporter.class.new(Spellr::OutputStubbed.new) check_and_count_file(file) reporter.output end @reporter = acc_reporter reporter.finish end |