Class: Metasploit::Model::Search::Operator::Base Abstract

Inherits:
Base
  • Object
show all
Includes:
ActiveModel::Validations, Help
Defined in:
app/models/metasploit/model/search/operator/base.rb

Overview

This class is abstract.

Declare search operators using ClassMethods#search_attribute and include operators from associations with ClassMethods#search_association.

A search operator.

Direct Known Subclasses

Delegation, Single

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#klassClass

The class on which this operator is usable.

Returns:

  • (Class)


17
18
19
# File 'app/models/metasploit/model/search/operator/base.rb', line 17

def klass
  @klass
end

Instance Method Details

#nameString

This method is abstract.

subclass and derive operator name from attributes of subclass.

Name of this operator.

Returns:

  • (String)

Raises:

  • (NotImplementedError)


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

def name
  raise NotImplementedError
end