Skip to content

Instantly share code, notes, and snippets.

@hcatlin
Created Aug 25, 2008
Embed
What would you like to do?
if field.is_a? String
# Create a criteria parser
line, formatted_value = Searcher::Criteria.new(field, operator, value).matcher
formatted_values = [formatted_value]
elsif field.is_a? Proc
line, *formatted_values = field.call(*[value, operator, field][0...field.arity])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment