Class: Metasploit::Model::Search::Operator::Association
- Defined in:
- app/models/metasploit/model/search/operator/association.rb
Overview
A search operator declared with search_association.
Instance Attribute Summary collapse
-
#association ⇒ Symbol
The association on which #source_operator was declared.
-
#source_operator ⇒ Metasploit::Model::Search::Operator::Base
The operator as declared on the #association class.
Attributes inherited from Base
Instance Method Summary collapse
-
#name ⇒ String
The name of this operator.
-
#operate_on(formatted_value) ⇒ Metasploit::Model::Search::Operation::Association
Creates a Metasploit::Model::Search::Operation::Association to wrap the original operation returned by #source_operator's
#operate_on
.
Methods included from Help
Methods inherited from Base
Constructor Details
This class inherits a constructor from Metasploit::Model::Base
Instance Attribute Details
#association ⇒ Symbol
The association on which #source_operator was declared.
12 13 14 |
# File 'app/models/metasploit/model/search/operator/association.rb', line 12 def association @association end |
#source_operator ⇒ Metasploit::Model::Search::Operator::Base
The operator as declared on the #association class.
18 19 20 |
# File 'app/models/metasploit/model/search/operator/association.rb', line 18 def source_operator @source_operator end |
Instance Method Details
#name ⇒ String
The name of this operator.
37 38 39 |
# File 'app/models/metasploit/model/search/operator/association.rb', line 37 def name @name ||= "#{association}.#{source_operator.name}".to_sym end |
#operate_on(formatted_value) ⇒ Metasploit::Model::Search::Operation::Association
Creates a Metasploit::Model::Search::Operation::Association to wrap the original operation returned by
#source_operator's #operate_on
.
47 48 49 50 51 52 |
# File 'app/models/metasploit/model/search/operator/association.rb', line 47 def operate_on(formatted_value) Metasploit::Model::Search::Operation::Association.new( operator: self, source_operation: source_operator.operate_on(formatted_value) ) end |