module StructuredSearch
Public Class Methods
evaluate(input, providers)
click to toggle source
Creates an evaluator instance, with a given input and provider hash and returns the evaluator result. Params:
input
-
Input string to parse and evaluate.
providers
-
The search provider keys and classes.
# File lib/structured_search.rb, line 17 def evaluate(input, providers) parser = StructuredSearch::Parser.new(input, providers) parser.parse_to_end @evaluator = StructuredSearch::Evaluator.new(parser.statements) @evaluator.eval if @evaluator end