Class: AbideDevUtils::XCCDF::StigControls
- Inherits:
-
ObjectContainer
- Object
- XccdfObject
- ObjectContainer
- AbideDevUtils::XCCDF::StigControls
- Defined in:
- lib/abide_dev_utils/xccdf.rb
Constant Summary
Constants included from Common
Common::CIS_CONTROL_NUMBER, Common::CIS_CONTROL_PARTS, Common::CIS_LEVEL_CODE, Common::CIS_NEXT_GEN_WINDOWS, Common::CIS_PROFILE_PARTS, Common::CIS_TITLE_MARKER, Common::CONTROL_PARTS, Common::CONTROL_PREFIX, Common::PROFILE_PARTS, Common::STIG_CONTROL_PARTS, Common::STIG_PROFILE_PARTS, Common::STIG_TITLE_MARKER, Common::UNDERSCORED, Common::XPATHS
Instance Method Summary collapse
- #include_ruleid?(item) ⇒ Boolean
- #include_vulnid?(item) ⇒ Boolean
-
#initialize(list, benchmark) ⇒ StigControls
constructor
A new instance of StigControls.
- #ruleids ⇒ Object
- #vulnids ⇒ Object
Methods inherited from ObjectContainer
#method_missing, #respond_to_missing?, #search, #to_h
Methods included from Common
#==, #abide_object?, #control_parts, #control_profile_text, #name_normalize_control, #normalize_control_name, #normalize_profile_name, #normalize_string, #number_normalize_control, #profile_parts, #text_normalize, #validate_xccdf, #xpath
Methods inherited from XccdfObject
#control_class, #control_sort_key, #controls_class
Constructor Details
#initialize(list, benchmark) ⇒ StigControls
Returns a new instance of StigControls.
531 532 533 534 535 536 |
# File 'lib/abide_dev_utils/xccdf.rb', line 531 def initialize(list, benchmark) super(list, :sorted_control_classes, benchmark) searchable! :vulnid, :ruleid index! :vulnid hash_key! :vulnid end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AbideDevUtils::XCCDF::ObjectContainer
Instance Method Details
#include_ruleid?(item) ⇒ Boolean
550 551 552 |
# File 'lib/abide_dev_utils/xccdf.rb', line 550 def include_ruleid?(item) @object_list.map(&:ruleid).include?(item) end |
#include_vulnid?(item) ⇒ Boolean
546 547 548 |
# File 'lib/abide_dev_utils/xccdf.rb', line 546 def include_vulnid?(item) @object_list.map(&:vulnid).include?(item) end |
#ruleids ⇒ Object
542 543 544 |
# File 'lib/abide_dev_utils/xccdf.rb', line 542 def ruleids @ruleids ||= @object_list.map(&:ruleid).sort end |
#vulnids ⇒ Object
538 539 540 |
# File 'lib/abide_dev_utils/xccdf.rb', line 538 def vulnids @vulnids ||= @object_list.map(&:vulnid).sort end |