Created
August 25, 2008 06:22
-
-
Save HamptonMakes/7034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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