Class: Metasploit::Model::Search::Operator::Deprecated::Platform
- Inherits:
-
Group::Union
- Object
- Base
- Base
- Metasploit::Model::Search::Operator::Delegation
- Group::Base
- Group::Union
- Metasploit::Model::Search::Operator::Deprecated::Platform
- Defined in:
- app/models/metasploit/model/search/operator/deprecated/platform.rb
Overview
Translates <name>:<value>
to the union of platforms.name:<value>
and targets.name:<value>
in order to support
the os
and platform
operators.
Constant Summary collapse
- FORMATTED_OPERATORS =
Formatted operators that should be part of #children for this union.
[ 'platforms.fully_qualified_name', 'targets.name' ]
Instance Attribute Summary collapse
-
#name ⇒ Symbol
Name of this operator.
Attributes inherited from Base
Instance Method Summary collapse
-
#children(formatted_value) ⇒ Array<Metasploit::Model::Search::Operation::Base>
Array of
platforms.fully_qualified_name:<formatted_value>
andtargets.name:<formatted_value>
operations.
Methods inherited from Group::Base
#operate_on, operation_class, #operation_class, operation_class_name, operation_class_name!, operation_class_name=
Methods inherited from Metasploit::Model::Search::Operator::Delegation
Methods included from Help
Methods inherited from Base
Constructor Details
This class inherits a constructor from Metasploit::Model::Base
Instance Attribute Details
#name ⇒ Symbol
Name of this operator
24 25 26 |
# File 'app/models/metasploit/model/search/operator/deprecated/platform.rb', line 24 def name @name end |
Instance Method Details
#children(formatted_value) ⇒ Array<Metasploit::Model::Search::Operation::Base>
Array of platforms.fully_qualified_name:<formatted_value>
and targets.name:<formatted_value>
operations.
41 42 43 44 45 46 |
# File 'app/models/metasploit/model/search/operator/deprecated/platform.rb', line 41 def children(formatted_value) FORMATTED_OPERATORS.collect { |formatted_operator| association_operator = operator(formatted_operator) association_operator.operate_on(formatted_value) } end |