class Proxy::OpenSCAP::ArfHtml

Public Instance Methods

generate_html(file_in, file_out) click to toggle source
# File lib/smart_proxy_openscap/arf_html.rb, line 7
def generate_html(file_in, file_out)
  ::OpenSCAP.oscap_init
  File.write file_out, get_arf_html(file_in)
  ::OpenSCAP.oscap_cleanup
end
get_arf_html(file_in) click to toggle source
# File lib/smart_proxy_openscap/arf_html.rb, line 13
def get_arf_html(file_in)
  arf_object = ::OpenSCAP::DS::Arf.new(file_in)
  # @TODO: Drop this when support for 1.8.7 ends
  return arf_object.html if RUBY_VERSION.start_with? '1.8'
  arf_object.html.force_encoding('UTF-8')
end