Class: OpenscapParser::TailoringFile

Inherits:
XmlFile show all
Includes:
Tailorings
Defined in:
lib/openscap_parser/tailoring_file.rb

Overview

A class to represent a tailoring XmlFile

Instance Attribute Summary

Attributes inherited from XmlNode

#namespaces

Instance Method Summary collapse

Methods included from Tailorings

included

Methods inherited from XmlFile

#initialize

Methods inherited from XmlNode

#initialize, #parsed_xml, #text, #xpath_node, #xpath_nodes

Constructor Details

This class inherits a constructor from OpenscapParser::XmlFile

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/openscap_parser/tailoring_file.rb', line 10

def valid?
  return true if @parsed_xml.root.name == 'Tailoring' && namespaces.keys.include?('xmlns:xccdf')
  false
end