Class: AbideDevUtils::XCCDF::Parser::Objects::Profile
- Inherits:
-
ElementWithId
- Object
- ElementBase
- ElementWithId
- AbideDevUtils::XCCDF::Parser::Objects::Profile
- Defined in:
- lib/abide_dev_utils/xccdf/parser/objects.rb
Overview
Class for XCCDF profile
Instance Attribute Summary
Attributes inherited from ElementWithId
Attributes inherited from ElementBase
#child_labels, #children, #link_labels
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(element) ⇒ Profile
constructor
A new instance of Profile.
- #level ⇒ Object
Methods inherited from ElementWithId
Methods inherited from ElementBase
#add_link, #add_links, #all_values, #label, #method_missing, #respond_to_missing?, #xccdf_type, xmlns
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) ⇒ Profile
Returns a new instance of Profile.
291 292 293 294 295 296 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 291 def initialize(element) super add_child(Title, element) add_child(Description, element) add_children(XccdfSelect, 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
.xpath ⇒ Object
306 307 308 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 306 def self.xpath 'Profile' end |
Instance Method Details
#level ⇒ Object
298 299 300 301 302 303 304 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 298 def level return @level if defined?(@level) level_match = title.to_s.match(/([Ll]evel [0-9]+)/) @level = level_match.nil? ? level_match : level_match[1] @level end |