Class: AbideDevUtils::XCCDF::Parser::Objects::Fixtext

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

Overview

Class for XCCDF Rule child element Fixtext

Instance Attribute Summary

Attributes inherited from ElementBase

#child_labels, #children, #link_labels

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ElementBase

#add_link, #add_links, #all_values, #find_child_by_attribute, #find_child_by_attribute_value, #find_child_by_class, #find_child_by_xpath, #find_children_by_attribute, #find_children_by_attribute_value, #find_children_by_class, #find_children_by_xpath, #find_children_that_respond_to, #label, #method_missing, #recursive_find_child, #recursive_select_children, #respond_to_missing?, #xccdf_type

Methods included from DigestObject

#digest_equal?, #digest_similarity, #digestable_instance_variables, #exclude_from_digest, #labeled_self_digest, #non_compatible?, #normalize_exclusion, #sorted_digest_parts, #split_labeled_digest

Constructor Details

#initialize(element) ⇒ Fixtext

Returns a new instance of Fixtext.



595
596
597
598
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 595

def initialize(element)
  super
  add_child(LongText, element)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AbideDevUtils::XCCDF::Parser::Objects::ElementBase

Class Method Details

.xpathObject



604
605
606
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 604

def self.xpath
  'xccdf:fixtext'
end

Instance Method Details

#digestObject



600
601
602
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 600

def digest
  @digest ||= find_child_by_class(LongText).digest
end

#to_sObject



608
609
610
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 608

def to_s
  find_child_by_class(LongText).to_s
end