Class: MetasploitDataModels::Search::Visitor::Where

Inherits:
Object
  • Object
show all
Includes:
Metasploit::Model::Visitation::Visit
Defined in:
app/models/metasploit_data_models/search/visitor/where.rb

Overview

Generates AREL to pass to ActiveRecord::Relation#where from a Metasploit::Model::Search::Query.

Constant Summary collapse

EQUALITY_OPERATION_CLASS_NAMES =

Metasploit::Model::Search::Operation::Base subclasses that check their value with the equality operator in AREL

[
    'Metasploit::Model::Search::Operation::Boolean',
    'Metasploit::Model::Search::Operation::Date',
    'Metasploit::Model::Search::Operation::Integer',
    'Metasploit::Model::Search::Operation::Set'
]

Instance Method Summary collapse

Instance Method Details

#attribute_visitorMetasploitDataModels::Search::Visitor::Attribute

Visitor for Metasploit::Model::Search::Operator::Base subclasses to generate Arel::Attributes::Attribute.



104
105
106
# File 'app/models/metasploit_data_models/search/visitor/where.rb', line 104

def attribute_visitor
  @attribute_visitor ||= MetasploitDataModels::Search::Visitor::Attribute.new
end

#method_visitorMetasploitDataModels::Search::Visitor::Method

Visitor for Metasploit::Model::Search::Group::Base subclasses to generate equivalent AREL node methods.



111
112
113
# File 'app/models/metasploit_data_models/search/visitor/where.rb', line 111

def method_visitor
  @method_visitor ||= MetasploitDataModels::Search::Visitor::Method.new
end