Class: CaseManager
- Inherits:
-
Object
- Object
- CaseManager
- Includes:
- CheckCasesExtension, ReportExtension, Verbose
- Defined in:
- lib/teuton/case_manager/case_manager.rb
Overview
-
initialize
-
play
Split into several files:
-
check_cases
-
export_manager
-
send_manager
-
show_report
Instance Method Summary collapse
- #export(args = {}) ⇒ Object
-
#initialize ⇒ CaseManager
constructor
A new instance of CaseManager.
- #play(&block) ⇒ Object
- #send(args = {}) ⇒ Object
- #show(options = {verbose: 1}) ⇒ Object
Methods included from ReportExtension
#close_main_report, #open_main_report, #trim
Methods included from CheckCasesExtension
#check_cases!, #close_reports_for_all_cases, #collect_uniques_for_all_cases, #run_all_cases
Methods included from Verbose
Constructor Details
#initialize ⇒ CaseManager
Returns a new instance of CaseManager.
21 22 23 24 25 |
# File 'lib/teuton/case_manager/case_manager.rb', line 21 def initialize @cases = [] @report = Report.new(0) @report.filename = "resume" end |
Instance Method Details
#export(args = {}) ⇒ Object
41 42 43 |
# File 'lib/teuton/case_manager/case_manager.rb', line 41 def export(args = {}) ExportManager.new.call(@report, @cases, args) end |
#play(&block) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/teuton/case_manager/case_manager.rb', line 27 def play(&block) # Execute "play" order: Start every single case test check_cases! instance_eval(&block) # Run export if user pass option command "--export=FORMAT" i = Project.value[:options]["export"] export(format: i.to_sym) unless i.nil? # Accept "configfile" param REVISE There exists? i = Project.value[:options]["configfile"] export(format: i.to_sym) unless i.nil? # TODO: Export Stats # StatsManager.new.call(@cases) end |
#send(args = {}) ⇒ Object
45 46 47 |
# File 'lib/teuton/case_manager/case_manager.rb', line 45 def send(args = {}) SendManager.new.call(@cases, args) end |
#show(options = {verbose: 1}) ⇒ Object
49 50 51 |
# File 'lib/teuton/case_manager/case_manager.rb', line 49 def show( = {verbose: 1}) ShowResumeReport.new(@report).call([:verbose]) end |