Class: Metasploit::Model::Search::Operation::Group::Base
- Defined in:
- app/models/metasploit/model/search/operation/group/base.rb
Overview
A group of one or more child operations from an operator's #operate_on
, should be visited the same as
Group::Base.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#children ⇒ Object
Methods.
Attributes inherited from Base
Instance Method Summary collapse
-
#children_valid ⇒ void
private
Validates that #children are valid.
Methods inherited from Base
Methods inherited from Base
Constructor Details
This class inherits a constructor from Metasploit::Model::Base
Instance Attribute Details
#children ⇒ Object
Methods
14 |
# File 'app/models/metasploit/model/search/operation/group/base.rb', line 14 attr_writer :children |
Instance Method Details
#children_valid ⇒ void (private)
This method returns an undefined value.
Validates that #children are valid
51 52 53 54 55 56 57 58 59 60 |
# File 'app/models/metasploit/model/search/operation/group/base.rb', line 51 def children_valid if children.is_a? Enumerable # can't use children.all?(&:valid?) as it will short-circuit and want all children to have validation errors valids = children.map(&:valid?) unless valids.all? errors.add(:children, :invalid, value: children) end end end |