Class: ExportManager
- Inherits:
-
Object
- Object
- ExportManager
- Defined in:
- lib/teuton/case_manager/export_manager.rb
Overview
Execute “export” order: Export every case report
Instance Method Summary collapse
-
#call(main_report, cases, args, default_format) ⇒ Object
Run export function.
Instance Method Details
#call(main_report, cases, args, default_format) ⇒ Object
Run export function
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/teuton/case_manager/export_manager.rb', line 14 def call(main_report, cases, args, default_format) if args.class != Hash puts Rainbow("[ERROR] Export argument error!").red puts Rainbow(" Revise: export #{args}").red puts Rainbow(" Use : export format: 'txt'").red puts "" exit 1 end = strings2symbols(args) if [:format].nil? [:format] = default_format end # Step 1: Export case reports threads = [] cases.each { |c| threads << Thread.new { c.export() } } threads.each(&:join) # Step 2: Export resume report main_report.export_resume() # Step 3: Preserve files if required preserve_files if [:preserve] == true end |