Module: ExportManager
- Defined in:
- lib/teuton/case_manager/export_manager.rb
Overview
ExportManager is used by CaseManager to export output reports
Class Method Summary collapse
-
.run(main_report, cases, input) ⇒ Object
Run export function rubocop:disable Metrics/AbcSize rubocop:disable Metrics/CyclomaticComplexity.
Class Method Details
.run(main_report, cases, input) ⇒ Object
Run export function rubocop:disable Metrics/AbcSize rubocop:disable Metrics/CyclomaticComplexity
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/teuton/case_manager/export_manager.rb', line 15 def self.run(main_report, cases, input) args = strings2symbols(input) # default :mode=>:all, :format=>:txt format = args[:format] || Application.instance.default[:format] mode = args[:mode] || :all # Step 1: Export case reports if %i[details all].include? mode threads = [] cases.each { |c| threads << Thread.new { c.export format } } threads.each(&:join) end # Step 2: Export resume report main_report.export_resume format if %i[resume all].include? mode # Step 3: Preserve files if required preserve_files if args[:preserve] == true end |