Class: AbideDevUtils::Sce::Generate::CoverageReport::BenchmarkReport

Inherits:
Object
  • Object
show all
Defined in:
lib/abide_dev_utils/sce/generate/coverage_report.rb

Overview

Creates ReportOutput objects based on the given Benchmark

Instance Method Summary collapse

Constructor Details

#initialize(benchmark, opts = ReportOptions.new) ⇒ BenchmarkReport

Returns a new instance of BenchmarkReport.



310
311
312
313
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 310

def initialize(benchmark, opts = ReportOptions.new)
  @benchmark = benchmark
  @opts = opts
end

Instance Method Details

#basic_coverage(level: @opts.level, profile: @opts.profile) ⇒ Object



327
328
329
330
331
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 327

def basic_coverage(level: @opts.level, profile: @opts.profile)
  map_type = @benchmark.map_type(controls_in_resource_data[0])
  rules_in_map = @benchmark.rules_in_map(map_type, level: level, profile: profile)
  ReportOutput.new(@benchmark, controls_in_resource_data, rules_in_map)
end

#controls_in_mapping_dataObject



323
324
325
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 323

def controls_in_mapping_data
  @controls_in_mapping_data ||= find_controls_in_mapping_data
end

#controls_in_resource_dataObject



319
320
321
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 319

def controls_in_resource_data
  @controls_in_resource_data ||= find_controls_in_resource_data
end

#runObject



315
316
317
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 315

def run
  send(@opts.report_type)
end