Class: AbideDevUtils::XCCDF::Parser::Objects::ComplexCheck
- Inherits:
-
ElementBase
- Object
- ElementBase
- AbideDevUtils::XCCDF::Parser::Objects::ComplexCheck
- Defined in:
- lib/abide_dev_utils/xccdf/parser/objects.rb
Overview
Class for XCCDF rule complex check
Constant Summary
Constants inherited from ElementBase
Instance Attribute Summary collapse
-
#check ⇒ Object
readonly
Returns the value of attribute check.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
Attributes inherited from ElementBase
#child_labels, #children, #link_labels, #links, #parent
Class Method Summary collapse
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(element, parent: nil, parent_node: nil) ⇒ ComplexCheck
constructor
A new instance of ComplexCheck.
Methods inherited from ElementBase
#<=>, #add_link, #add_links, #all_values, #ancestors, #depth, #descendants, #find_similarity, #inspect, #label, #leaf?, #print_tree, #root, #root?, #siblings, #xccdf_type, xmlns
Methods included from Helpers::XPath
Methods included from DiffableObject
#check_diffable!, #correlate_added_removed, #diff, #diff_ambiguous, #diff_array_obj, #diff_benchmark, #diff_change_result, #diff_check, #diff_complex_check, #diff_group, #diff_plain_obj, #diff_profile, #diff_rule, #diff_str_obj, #diff_value, #diff_xccdf_select, #process_details_hash!, #result_from_details_hash
Constructor Details
#initialize(element, parent: nil, parent_node: nil) ⇒ ComplexCheck
Returns a new instance of ComplexCheck.
624 625 626 627 628 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 624 def initialize(element, parent: nil, parent_node: nil) super add_child(AttributeValue, element, 'operator') add_children(Check, element) end |
Instance Attribute Details
#check ⇒ Object (readonly)
Returns the value of attribute check.
622 623 624 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 622 def check @check end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
622 623 624 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 622 def operator @operator end |
Class Method Details
.xpath ⇒ Object
638 639 640 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 638 def self.xpath 'complex-check' end |
Instance Method Details
#eql?(other) ⇒ Boolean
630 631 632 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 630 def eql?(other) @children.map(&:to_s).join == other.children.map(&:to_s).join end |
#hash ⇒ Object
634 635 636 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 634 def hash @children.map(&:to_s).join.hash end |