Method: InspecTools::PDF#to_inspec
- Defined in:
- lib/inspec_tools/pdf.rb
#to_inspec ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/inspec_tools/pdf.rb', line 23 def to_inspec @controls = [] @csv_handle = nil @cci_xml = nil @nist_mapping = Utils::CisToNist.get_mapping('cis_to_nist_critical_controls') @pdf_text = '' @clean_text = '' @transformed_data = '' @profile = {} read_pdf @title ||= extract_title clean_pdf_text transform_data @profile['controls'] = parse_controls @profile['sha256'] = Digest::SHA256.hexdigest @profile.to_s @profile end |