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)


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

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



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

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

#operation_classClass (protected)

Null operation Class.



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

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

#typenil

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

Returns:

  • (nil)


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

def type
  nil
end