Class: AbideDevUtils::XCCDF::Parser::Objects::ElementWithIdref
- Inherits:
-
ElementBase
- Object
- ElementBase
- AbideDevUtils::XCCDF::Parser::Objects::ElementWithIdref
- Defined in:
- lib/abide_dev_utils/xccdf/parser/objects.rb
Overview
Base class for elements that have the idref attribute
Direct Known Subclasses
Instance Attribute Summary collapse
-
#idref ⇒ Object
readonly
Returns the value of attribute idref.
Attributes inherited from ElementBase
#child_labels, #children, #link_labels
Instance Method Summary collapse
-
#initialize(element) ⇒ ElementWithIdref
constructor
A new instance of ElementWithIdref.
- #to_s ⇒ Object
Methods inherited from ElementBase
#add_link, #add_links, #all_values, #label, #method_missing, #respond_to_missing?, #xccdf_type, xmlns, xpath
Methods included from Helpers::XPath
Methods included from Helpers::ElementChildren
Methods included from DigestObject
#digest, #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) ⇒ ElementWithIdref
Returns a new instance of ElementWithIdref.
266 267 268 269 270 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 266 def initialize(element) super add_child(AttributeValue, element, 'idref') @idref = search_children.find_child_by_attribute('idref').value.to_s end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AbideDevUtils::XCCDF::Parser::Objects::ElementBase
Instance Attribute Details
#idref ⇒ Object (readonly)
Returns the value of attribute idref.
264 265 266 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 264 def idref @idref end |
Instance Method Details
#to_s ⇒ Object
272 273 274 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 272 def to_s @idref end |