Class: AbideDevUtils::XCCDF::Parser::Objects::CheckExport

Inherits:
ElementBase
  • Object
show all
Defined in:
lib/abide_dev_utils/xccdf/parser/objects.rb

Overview

Class for XCCDF check-export

Constant Summary

Constants inherited from ElementBase

ElementBase::UNICODE_SYMBOLS

Instance Attribute Summary

Attributes inherited from ElementBase

#child_labels, #children, #link_labels, #links, #parent

Class Method Summary collapse

Instance Method Summary collapse

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

#find_element

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_node: nil) ⇒ CheckExport

Returns a new instance of CheckExport.



479
480
481
482
483
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 479

def initialize(element, parent_node: nil)
  super
  add_child(AttributeValue, element, 'export-name')
  add_child(AttributeValue, element, 'value-id')
end

Class Method Details

.xpathObject



485
486
487
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 485

def self.xpath
  'check-export'
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


489
490
491
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 489

def eql?(other)
  to_s == other.to_s
end

#hashObject



493
494
495
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 493

def hash
  to_s.hash
end

#to_sObject



497
498
499
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 497

def to_s
  [export_name.to_s, value_id.to_s].join('|')
end