Method: Metasploit::Model::Search::Operation::Group::Base#children_valid

Defined in:
app/models/metasploit/model/search/operation/group/base.rb

#children_validvoid (private)

This method returns an undefined value.

Validates that #children are valid



49
50
51
52
53
54
55
56
57
58
# File 'app/models/metasploit/model/search/operation/group/base.rb', line 49

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