doc/CodeZauker/FileScanner.html in code_zauker-0.0.7 vs doc/CodeZauker/FileScanner.html in code_zauker-0.0.8
- old
+ new
@@ -4,60 +4,67 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: CodeZauker::FileScanner
- — Code Zauker 0.0.5 Documentation
+ — Code Zauker 0.0.8 Documentation
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
- relpath = '..';
- if (relpath != '') relpath += '/';
+ hasFrames = window.top.frames.main ? true : false;
+ relpath = '../';
+ framesUrl = "../frames.html#!" + escape(window.location.href);
</script>
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
- <script type="text/javascript" charset="utf-8">
- if (window.top.frames.main) document.body.className = 'frames';
- </script>
-
<div id="header">
<div id="menu">
- <a href="../_index.html">Index (F)</a> »
+ <a href="../_index.html">Index (F)</a> »
<span class='title'><span class='object_link'><a href="../CodeZauker.html" title="CodeZauker (module)">CodeZauker</a></span></span>
»
<span class="title">FileScanner</span>
-
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
- <a id="class_list_link" href="#">Class List</a>
+ <a class="full_list_link" id="class_list_link"
+ href="../class_list.html">
+ Class List
+ </a>
- <a id="method_list_link" href="#">Method List</a>
+ <a class="full_list_link" id="method_list_link"
+ href="../method_list.html">
+ Method List
+ </a>
- <a id="file_list_link" href="#">File List</a>
+ <a class="full_list_link" id="file_list_link"
+ href="../file_list.html">
+ File List
+ </a>
</div>
<div class="clear"></div>
</div>
-
+
<iframe id="search_frame"></iframe>
-
+
<div id="content"><h1>Class: CodeZauker::FileScanner
</h1>
@@ -131,10 +138,11 @@
+
<span class="summary_desc"><div class='inline'></div></span>
</li>
@@ -147,10 +155,11 @@
</span>
+
<span class="note title constructor">constructor</span>
@@ -177,10 +186,11 @@
+
<span class="summary_desc"><div class='inline'>
<h1>Do a case-insenitive search </h1>
@@ -202,10 +212,11 @@
+
<span class="summary_desc"><div class='inline'></div></span>
</li>
@@ -223,10 +234,11 @@
+
<span class="summary_desc"><div class='inline'></div></span>
</li>
@@ -244,10 +256,11 @@
+
<span class="summary_desc"><div class='inline'></div></span>
</li>
@@ -265,10 +278,11 @@
+
<span class="summary_desc"><div class='inline'>
<p>Remove the files from the index, updating trigrams.</p>
</div></span>
@@ -288,10 +302,11 @@
+
<span class="summary_desc"><div class='inline'>
<p>Remove all the keys.</p>
</div></span>
@@ -311,10 +326,11 @@
+
<span class="summary_desc"><div class='inline'>
<h1>search</h1>
@@ -323,24 +339,53 @@
</div></span>
</li>
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#wsearch-instance_method" title="#wsearch (instance method)">- (Object) <strong>wsearch</strong>(term) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<h1>wild cards search</h1>
+
+<p>You can search trigram in the form public*class*Apple will match java
+declaration of MyApple but not YourAppManager.</p>
+</div></span>
+
+</li>
+
+
</ul>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
- <p class="signature first" id="initialize-instance_method">
+ <h3 class="signature first" id="initialize-instance_method">
- (<tt><span class='object_link'><a href="" title="CodeZauker::FileScanner (class)">FileScanner</a></span></tt>) <strong>initialize</strong>(redisConnection = nil)
-</p><div class="docstring">
+
+
+</h3><div class="docstring">
<div class="discussion">
<p>A new instance of FileScanner</p>
@@ -353,20 +398,20 @@
<tr>
<td>
<pre class="lines">
-112
-113
-114
-115
-116
-117
-118</pre>
+154
+155
+156
+157
+158
+159
+160</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 112</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 154</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_redisConnection'>redisConnection</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_redisConnection'>redisConnection</span><span class='op'>==</span><span class='kw'>nil</span>
<span class='ivar'>@redis</span><span class='op'>=</span><span class='const'>Redis</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='kw'>else</span>
@@ -381,48 +426,62 @@
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
+
-
<div class="method_details first">
- <p class="signature first" id="disconnect-instance_method">
+ <h3 class="signature first" id="disconnect-instance_method">
- (<tt>Object</tt>) <strong>disconnect</strong>
-</p><table class="source_code">
+
+
+</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
-121
-122
-123</pre>
+163
+164
+165
+166
+167
+168
+169
+170</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 121</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 163</span>
<span class='kw'>def</span> <span class='id identifier rubyid_disconnect'>disconnect</span><span class='lparen'>(</span><span class='rparen'>)</span>
- <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_quit'>quit</span>
+ <span class='kw'>begin</span>
+ <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_quit'>quit</span>
+ <span class='kw'>rescue</span> <span class='const'>Errno</span><span class='op'>::</span><span class='const'>EAGAIN</span> <span class='op'>=></span><span class='id identifier rubyid_e'>e</span>
+ <span class='comment'># Nothing to do...
+</span> <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Ignored EAGAIN ERROR during disconnect...</span><span class='tstring_end'>"</span></span>
+ <span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
- <p class="signature " id="isearch-instance_method">
+ <h3 class="signature " id="isearch-instance_method">
- (<tt>Object</tt>) <strong>isearch</strong>(term)
-</p><div class="docstring">
+
+
+</h3><div class="docstring">
<div class="discussion">
<h1>Do a case-insenitive search </h1>
<p>using the special set of trigrams "trigram:ci:*" all downcase</p>
@@ -437,22 +496,22 @@
<tr>
<td>
<pre class="lines">
-282
-283
-284
-285
-286
-287
-288
-289
-290</pre>
+329
+330
+331
+332
+333
+334
+335
+336
+337</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 282</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 329</span>
<span class='kw'>def</span> <span class='id identifier rubyid_isearch'>isearch</span><span class='lparen'>(</span><span class='id identifier rubyid_term'>term</span><span class='rparen'>)</span>
<span class='id identifier rubyid_termLowercase'>termLowercase</span><span class='op'>=</span><span class='id identifier rubyid_term'>term</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='lparen'>(</span><span class='rparen'>)</span>
<span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='op'>=</span><span class='id identifier rubyid_split_in_trigrams'>split_in_trigrams</span><span class='lparen'>(</span><span class='id identifier rubyid_termLowercase'>termLowercase</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>trigram:ci</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>==</span><span class='int'>0</span>
@@ -465,69 +524,24 @@
</tr>
</table>
</div>
<div class="method_details ">
- <p class="signature " id="load-instance_method">
+ <h3 class="signature " id="load-instance_method">
- (<tt>Object</tt>) <strong>load</strong>(filename, noReload = false)
-</p><table class="source_code">
+
+
+</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
231
232
233
234
235
@@ -541,14 +555,61 @@
243
244
245
246
247
-248</pre>
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 184</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 231</span>
<span class='kw'>def</span> <span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_noReload'>noReload</span><span class='op'>=</span><span class='kw'>false</span><span class='rparen'>)</span>
<span class='comment'># Define my redis id...
</span> <span class='comment'># Already exists?...
</span> <span class='id identifier rubyid_fid'>fid</span><span class='op'>=</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>fscan:id:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_filename'>filename</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
@@ -617,35 +678,37 @@
</tr>
</table>
</div>
<div class="method_details ">
- <p class="signature " id="map_ids_to_files-instance_method">
+ <h3 class="signature " id="map_ids_to_files-instance_method">
- (<tt>Object</tt>) <strong>map_ids_to_files</strong>(fileIds)
-</p><table class="source_code">
+
+
+</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273</pre>
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 264</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 311</span>
<span class='kw'>def</span> <span class='id identifier rubyid_map_ids_to_files'>map_ids_to_files</span><span class='lparen'>(</span><span class='id identifier rubyid_fileIds'>fileIds</span><span class='rparen'>)</span>
<span class='id identifier rubyid_filenames'>filenames</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='comment'># fscan:id2filename:#{fid}....
</span> <span class='id identifier rubyid_fileIds'>fileIds</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span> <span class='id identifier rubyid_id'>id</span> <span class='op'>|</span>
@@ -659,32 +722,34 @@
</tr>
</table>
</div>
<div class="method_details ">
- <p class="signature " id="reindex-instance_method">
+ <h3 class="signature " id="reindex-instance_method">
- (<tt>Object</tt>) <strong>reindex</strong>(fileList)
-</p><table class="source_code">
+
+
+</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
-312
-313
-314
-315
-316
-317
-318</pre>
+394
+395
+396
+397
+398
+399
+400</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 312</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 394</span>
<span class='kw'>def</span> <span class='id identifier rubyid_reindex'>reindex</span><span class='lparen'>(</span><span class='id identifier rubyid_fileList'>fileList</span><span class='rparen'>)</span>
<span class='comment'>#puts "Reindexing... #{fileList.length} files..."
</span> <span class='id identifier rubyid_fileList'>fileList</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_current_file'>current_file</span> <span class='op'>|</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_current_file'>current_file</span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -695,17 +760,19 @@
</tr>
</table>
</div>
<div class="method_details ">
- <p class="signature " id="remove-instance_method">
+ <h3 class="signature " id="remove-instance_method">
- (<tt>Object</tt>) <strong>remove</strong>(filePaths = nil)
-</p><div class="docstring">
+
+
+</h3><div class="docstring">
<div class="discussion">
<p>Remove the files from the index, updating trigrams</p>
@@ -718,49 +785,49 @@
<tr>
<td>
<pre class="lines">
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368</pre>
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 333</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 415</span>
<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='id identifier rubyid_filePaths'>filePaths</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_filePaths'>filePaths</span><span class='op'>==</span><span class='kw'>nil</span>
<span class='id identifier rubyid_fileList'>fileList</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_storedFiles'>storedFiles</span><span class='op'>=</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>fscan:id:*</span><span class='tstring_end'>"</span></span>
@@ -800,17 +867,19 @@
</tr>
</table>
</div>
<div class="method_details ">
- <p class="signature " id="removeAll-instance_method">
+ <h3 class="signature " id="removeAll-instance_method">
- (<tt>Object</tt>) <strong>removeAll</strong>
-</p><div class="docstring">
+
+
+</h3><div class="docstring">
<div class="discussion">
<p>Remove all the keys</p>
@@ -823,23 +892,23 @@
<tr>
<td>
<pre class="lines">
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330</pre>
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 321</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 403</span>
<span class='kw'>def</span> <span class='id identifier rubyid_removeAll'>removeAll</span><span class='lparen'>(</span><span class='rparen'>)</span>
<span class='id identifier rubyid_tokill'>tokill</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_tokill'>tokill</span><span class='op'>=</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>fscan:*</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_tokill'>tokill</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='op'>*</span><span class='lparen'>(</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>trigram*</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span>
@@ -853,17 +922,19 @@
</tr>
</table>
</div>
<div class="method_details ">
- <p class="signature " id="search-instance_method">
+ <h3 class="signature " id="search-instance_method">
- (<tt>Object</tt>) <strong>search</strong>(term)
-</p><div class="docstring">
+
+
+</h3><div class="docstring">
<div class="discussion">
<h1>search</h1>
<p>Find a list of file candidates to a search string The search string is
@@ -879,28 +950,28 @@
<tr>
<td>
<pre class="lines">
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310</pre>
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 296</span>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 378</span>
<span class='kw'>def</span> <span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='id identifier rubyid_term'>term</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_term'>term</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'><</span> <span class='const'>GRAM_SIZE</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FATAL: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_term'>term</span><span class='rbrace'>}</span><span class='tstring_content'> is shorter then the minimum size of </span><span class='embexpr_beg'>#{</span><span class='const'>GRAM_SIZE</span><span class='rbrace'>}</span><span class='tstring_content'> character</span><span class='tstring_end'>"</span></span>
<span class='kw'>end</span>
@@ -918,17 +989,113 @@
</td>
</tr>
</table>
</div>
+ <div class="method_details ">
+ <h3 class="signature " id="wsearch-instance_method">
+
+ - (<tt>Object</tt>) <strong>wsearch</strong>(term)
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<h1>wild cards search</h1>
+
+<p>You can search trigram in the form public*class*Apple will match java
+declaration of MyApple but not YourAppManager</p>
+
+
</div>
+</div>
+<div class="tags">
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 344</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_wsearch'>wsearch</span><span class='lparen'>(</span><span class='id identifier rubyid_term'>term</span><span class='rparen'>)</span>
+ <span class='comment'># Split stuff
+</span> <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Wild Search request:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_term'>term</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
+ <span class='id identifier rubyid_m'>m</span><span class='op'>=</span><span class='id identifier rubyid_term'>term</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
+ <span class='kw'>if</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>></span><span class='int'>0</span>
+ <span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='op'>=</span><span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*= Found:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
+ <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span> <span class='id identifier rubyid_wtc'>wtc</span> <span class='op'>|</span>
+ <span class='id identifier rubyid_wt'>wt</span><span class='op'>=</span><span class='id identifier rubyid_wtc'>wtc</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='lparen'>(</span><span class='rparen'>)</span>
+ <span class='comment'>#puts "Splitting #{wt}"
+</span> <span class='id identifier rubyid_trigSet'>trigSet</span><span class='op'>=</span><span class='id identifier rubyid_split_in_trigrams'>split_in_trigrams</span><span class='lparen'>(</span><span class='id identifier rubyid_wt'>wt</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>trigram:ci</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='op'>=</span><span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_trigSet'>trigSet</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Trigrams: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
+ <span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span> <span class='id identifier rubyid_x'>x</span> <span class='op'>|</span>
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_x'>x</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
+ <span class='kw'>end</span>
+ <span class='kw'>if</span> <span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>==</span><span class='int'>0</span>
+ <span class='kw'>return</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_fileIds'>fileIds</span><span class='op'>=</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_sinter'>sinter</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_trigramInAnd'>trigramInAnd</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_fileNames'>fileNames</span><span class='op'>=</span><span class='id identifier rubyid_map_ids_to_files'>map_ids_to_files</span><span class='lparen'>(</span><span class='id identifier rubyid_fileIds'>fileIds</span><span class='rparen'>)</span>
+ <span class='comment'>#puts "DEBUG #{fileIds} #{fileNames}"
+</span> <span class='kw'>return</span> <span class='id identifier rubyid_fileNames'>fileNames</span>
+ <span class='kw'>else</span>
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Warn no Wild!</span><span class='tstring_end'>"</span></span>
+ <span class='kw'>return</span> <span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='id identifier rubyid_term'>term</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
</div>
+ </div>
+
+</div>
+
<div id="footer">
- Generated on Mon Apr 9 16:40:13 2012 by
+ Generated on Wed May 16 17:14:54 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.7.5 (ruby-1.9.3).
+ 0.8.1 (ruby-1.9.3).
</div>
</body>
</html>
\ No newline at end of file