Class: Metasploit::Model::Search::Operator::Deprecated::Authority

Inherits:
Metasploit::Model::Search::Operator::Delegation show all
Defined in:
app/models/metasploit/model/search/operator/deprecated/authority.rb

Overview

Operator for the direct, single authority reference search. Translates <abbreviation>:<designation> to authorities.abbreviation:<abbreviation> references.designation:<designation>.

Instance Attribute Summary collapse

Attributes inherited from Base

#klass

Instance Method Summary collapse

Methods inherited from Metasploit::Model::Search::Operator::Delegation

#operator, operator_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

#abbreviationString Also known as: name

Value passed to authorities.abbreviation operator

Returns:

  • (String)

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

def abbreviation
  @abbreviation
end

Instance Method Details

#operate_on(formatted_value) ⇒ Array<Metasploit::Model::Search::Operation::Base>

Returns list of operations that search for the authority with #abbreviation and formatted_value for reference designation.

Returns:


32
33
34
35
36
37
38
39
40
41
42
# File 'app/models/metasploit/model/search/operator/deprecated/authority.rb', line 32

def operate_on(formatted_value)
  operations = []

  authorities_abbreviation_operator = operator('authorities.abbreviation')
  operations << authorities_abbreviation_operator.operate_on(abbreviation)

  references_designation_operator = operator('references.designation')
  operations << references_designation_operator.operate_on(formatted_value)

  operations
end