Class: Metasploit::Model::Search::Operation::Null

Inherits:
Base
  • Object
show all
Defined in:
app/models/metasploit/model/search/operation/null.rb

Overview

Operation that uses a null operator.

Instance Attribute Summary

Attributes inherited from Base

#operator, #value

Instance Method Summary collapse

Methods inherited from Base

#operator_valid

Methods inherited from Base

#initialize, #valid!

Constructor Details

This class inherits a constructor from Metasploit::Model::Base

Instance Method Details

#null_operatorvoid (private)

This method returns an undefined value.

Validates that Base#operator is a Metasploit::Model::Search::Operator::Null, as Metasploit::Model::Search::Operation::Null won't validate correctly (and be invalid) if Base#operator is not a Metasploit::Model::Search::Operator::Null.



21
22
23
24
25
# File 'app/models/metasploit/model/search/operation/null.rb', line 21

def null_operator
  unless operator.is_a? Metasploit::Model::Search::Operator::Null
    errors.add(:operator, :type, :type => Metasploit::Model::Search::Operator::Null)
  end
end