Class: Metasploit::Model::Search::Operator::Null

Inherits:
Single show all
Defined in:
app/models/metasploit/model/search/operator/null.rb

Overview

Operator used when the formatted operator name does not match a class's operators.

Constant Summary

Constants inherited from Single

Single::MODULE_SEPARATOR, Single::OPERATION_NAMESPACE_NAME

Instance Attribute Summary collapse

Attributes inherited from Base

#klass

Instance Method Summary collapse

Methods inherited from Single

constant_name, #operate_on, #operation_class_name

Methods included from Help

#help

Methods inherited from Base

#initialize, #valid!

Constructor Details

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

Instance Attribute Details

#nameSymbol

The name of this operator that was not the name of a search operator for Base#klass.

Returns:

  • (Symbol)


12
13
14
# File 'app/models/metasploit/model/search/operator/null.rb', line 12

def name
  @name
end

Instance Method Details

#name_invalidvoid (private)

This method returns an undefined value.

Always records an error that name is not an operator name



41
42
43
# File 'app/models/metasploit/model/search/operator/null.rb', line 41

def name_invalid
  errors.add(:name, :unknown)
end

#operation_classClass (protected)

Null operation Class.



32
33
34
# File 'app/models/metasploit/model/search/operator/null.rb', line 32

def operation_class
  Metasploit::Model::Search::Operation::Null
end

#typenil

Null operators do not have a type since the attribute is unknown.

Returns:

  • (nil)


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

def type
  nil
end