Method: InspecTools::Summary#initialize

Defined in:
lib/inspec_tools/summary.rb

#initialize(**options) ⇒ Summary

Returns a new instance of Summary.



20
21
22
23
24
25
26
27
28
# File 'lib/inspec_tools/summary.rb', line 20

def initialize(**options)
  options = options[:options]
  @json = JSON.parse(File.read(options[:inspec_json]))
  @json_full = false || options[:json_full]
  @json_counts = false || options[:json_counts]
  @threshold = parse_threshold(options[:threshold_inline], options[:threshold_file])
  @threshold_provided = options[:threshold_inline] || options[:threshold_file]
  @summary = compute_summary
end