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.
247 248 249 250 251 252 |
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 247 def initialize(benchmark, opts = ReportOptions.new) @benchmark = benchmark @opts = opts @special_control_names = %w[sce_options sce_protected] @stig_map_types = %w[vulnid ruleid] end |
Instance Method Details
#basic_coverage(level: @opts.level, profile: @opts.profile) ⇒ Object
266 267 268 269 270 |
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 266 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, profile: profile, level: level) end |
#controls_in_mapping_data ⇒ Object
262 263 264 |
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 262 def controls_in_mapping_data @controls_in_mapping_data ||= find_controls_in_mapping_data end |
#controls_in_resource_data ⇒ Object
258 259 260 |
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 258 def controls_in_resource_data @controls_in_resource_data ||= find_controls_in_resource_data end |
#run ⇒ Object
254 255 256 |
# File 'lib/abide_dev_utils/sce/generate/coverage_report.rb', line 254 def run send(@opts.report_type) end |