Class: SearchCopGrammar::AndOrExpression

Inherits:
BaseNode
  • Object
show all
Defined in:
lib/search_cop_grammar.rb

Instance Attribute Summary

Attributes inherited from BaseNode

#query_info, #query_options

Instance Method Summary collapse

Methods inherited from BaseNode

#collection_for, #elements

Instance Method Details

#evaluateObject



117
118
119
120
# File 'lib/search_cop_grammar.rb', line 117

def evaluate
  default_operator = SearchCop::Helpers.sanitize_default_operator(query_options)
  [elements.first.evaluate, elements.last.evaluate].inject(default_operator)
end