keyword_search 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +1 -1
- data/lib/keyword_search.rb +6 -2
- metadata +2 -2
data/History.txt
CHANGED
data/lib/keyword_search.rb
CHANGED
@@ -7,7 +7,7 @@ end
|
|
7
7
|
|
8
8
|
module KeywordSearch
|
9
9
|
|
10
|
-
VERSION = '1.0.
|
10
|
+
VERSION = '1.0.6'
|
11
11
|
|
12
12
|
class << self
|
13
13
|
def search(input_string, definition=nil, &block)
|
@@ -15,9 +15,13 @@ module KeywordSearch
|
|
15
15
|
tokens = Tokenizer.tokenize(input_string.downcase)
|
16
16
|
parse_result = Parser.parse(tokens)
|
17
17
|
unless parse_result.has_error?
|
18
|
-
Evaluator.new(parse_result.syntax_tree).result
|
18
|
+
results = Evaluator.new(parse_result.syntax_tree).result
|
19
|
+
results.each do |key, terms|
|
19
20
|
definition.handle(key, terms)
|
20
21
|
end
|
22
|
+
results
|
23
|
+
else
|
24
|
+
{}
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: keyword_search
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.0.6
|
7
|
+
date: 2007-02-26 00:00:00 -07:00
|
8
8
|
summary: Generic support for extracting GMail-style search keywords/values from strings
|
9
9
|
require_paths:
|
10
10
|
- lib
|