Class: Utils::CisToNist

Inherits:
Object show all
Defined in:
lib/utilities/cis_to_nist.rb

Class Method Summary collapse

Class Method Details

.get_mapping(mapping_file) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/utilities/cis_to_nist.rb', line 3

def self.get_mapping(mapping_file)
  path = File.expand_path(File.join(File.expand_path(__dir__), '..', 'data', mapping_file))
  raise "CIS to NIST control mapping does not exist at #{path}. Has it been generated?" unless File.exist?(path)

  mapping = File.open(path)
  Marshal.load(mapping)
end