Class: AlpacaBuildTool::ReportManager

Inherits:
Object
  • Object
show all
Defined in:
lib/alpacabuildtool/managers/report_manager.rb

Overview

ReportManager provides methods to convert test results to reports

Instance Method Summary collapse

Constructor Details

#initialize(solution) ⇒ ReportManager

Creates an instance

solution

solution to be used to configure reports manager


13
14
15
16
17
# File 'lib/alpacabuildtool/managers/report_manager.rb', line 13

def initialize(solution)
  package_manager = PackageManager.new(solution)
  @test_tool = package_manager.get('NUnitOrange')
  @coverage_tool = package_manager.get('ReportGenerator')
end

Instance Method Details

#convert(type) ⇒ Object

Convert results to reports

type

type of results to be converted(tests, coverage, all)


23
24
25
26
27
28
29
30
31
# File 'lib/alpacabuildtool/managers/report_manager.rb', line 23

def convert(type)
  case type
  when 'tests' then @test_tool.convert
  when 'coverage' then @coverage_tool.convert
  when 'all'
    @test_tool.convert
    @coverage_tool.convert
  end
end