Method: Fast.group_results
- Defined in:
- lib/fast.rb
.group_results(group_files, locations, parallel: true) ⇒ Hash[String, Array]
Compact grouped results by file allowing parallel processing. parallel or not. while it process several locations in parallel.
231 232 233 234 235 236 237 238 239 |
# File 'lib/fast.rb', line 231 def group_results(group_files, locations, parallel: true) files = ruby_files_from(*locations) if parallel require 'parallel' unless defined?(Parallel) Parallel.map(files, &group_files) else files.map(&group_files) end.compact.inject(&:merge!) end |