Class: AbideDevUtils::Sce::Generate::CoverageReport::BenchmarkReport
- Inherits:
-
Object
- Object
- AbideDevUtils::Sce::Generate::CoverageReport::BenchmarkReport
- Defined in:
- lib/abide_dev_utils/sce/generate/coverage_report.rb
Overview
Creates ReportOutput objects based on the given Benchmark
Instance Method Summary collapse
- #basic_coverage(level: @opts.level, profile: @opts.profile) ⇒ Object
- #controls_in_mapping_data ⇒ Object
- #controls_in_resource_data ⇒ Object
-
#initialize(benchmark, opts = ReportOptions.new) ⇒ BenchmarkReport
constructor
A new instance of BenchmarkReport.
- #run ⇒ Object
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_data ⇒ Object
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_data ⇒ Object
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 |
#run ⇒ Object
315 316 317 |
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 315 def run send(@opts.report_type) end |