Class: Proxy::OpenSCAP::ArfHtml
- Inherits:
-
Object
- Object
- Proxy::OpenSCAP::ArfHtml
- Defined in:
- lib/smart_proxy_openscap/arf_html.rb
Instance Method Summary collapse
Instance Method Details
#generate_html(file_in, file_out) ⇒ Object
7 8 9 10 11 12 |
# 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) ensure ::OpenSCAP.oscap_cleanup end |
#get_arf_html(file_in) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/smart_proxy_openscap/arf_html.rb', line 14 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 |