code_zauker 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/czindexer +12 -1
- data/bin/czsearch +31 -8
- data/bin/mczindexer +1 -1
- data/devel.org +10 -0
- data/doc/CodeZauker/CliUtil.html +451 -0
- data/doc/CodeZauker/FileScanner.html +357 -190
- data/doc/CodeZauker/IndexManager.html +331 -0
- data/doc/CodeZauker/Util.html +65 -46
- data/doc/CodeZauker.html +58 -25
- data/doc/Grep.html +29 -19
- data/doc/_index.html +49 -23
- data/doc/class_list.html +12 -6
- data/doc/css/full_list.css +4 -2
- data/doc/css/style.css +50 -44
- data/doc/file_list.html +12 -6
- data/doc/frames.html +20 -5
- data/doc/index.html +49 -23
- data/doc/js/app.js +29 -26
- data/doc/js/full_list.js +9 -9
- data/doc/js/jquery.js +4 -16
- data/doc/method_list.html +66 -12
- data/doc/top-level-namespace.html +40 -18
- data/etc/redis.conf +3 -3
- data/lib/code_zauker/cli.rb +16 -1
- data/lib/code_zauker/constants.rb +7 -1
- data/lib/code_zauker/version.rb +2 -1
- data/lib/code_zauker.rb +85 -3
- data/readme.org +19 -22
- data/test/fixture/wildtest.txt +1 -0
- data/test/test_wild_search.rb +39 -0
- metadata +20 -16
@@ -0,0 +1,331 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: CodeZauker::IndexManager
|
8
|
+
|
9
|
+
— Code Zauker 0.0.8 Documentation
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (I)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../CodeZauker.html" title="CodeZauker (module)">CodeZauker</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">IndexManager</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: CodeZauker::IndexManager
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">CodeZauker::IndexManager</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/code_zauker.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Manage the index and keep it well organized</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#check_repair-instance_method" title="#check_repair (instance method)">- (Object) <strong>check_repair</strong> </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (IndexManager) <strong>initialize</strong>(redisConnection = nil) </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
<span class="note title constructor">constructor</span>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'>
|
170
|
+
<p>A new instance of IndexManager.</p>
|
171
|
+
</div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
</ul>
|
177
|
+
|
178
|
+
|
179
|
+
<div id="constructor_details" class="method_details_list">
|
180
|
+
<h2>Constructor Details</h2>
|
181
|
+
|
182
|
+
<div class="method_details first">
|
183
|
+
<h3 class="signature first" id="initialize-instance_method">
|
184
|
+
|
185
|
+
- (<tt><span class='object_link'><a href="" title="CodeZauker::IndexManager (class)">IndexManager</a></span></tt>) <strong>initialize</strong>(redisConnection = nil)
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</h3><div class="docstring">
|
192
|
+
<div class="discussion">
|
193
|
+
|
194
|
+
<p>A new instance of IndexManager</p>
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="tags">
|
200
|
+
|
201
|
+
|
202
|
+
</div><table class="source_code">
|
203
|
+
<tr>
|
204
|
+
<td>
|
205
|
+
<pre class="lines">
|
206
|
+
|
207
|
+
|
208
|
+
112
|
209
|
+
113
|
210
|
+
114
|
211
|
+
115
|
212
|
+
116
|
213
|
+
117
|
214
|
+
118</pre>
|
215
|
+
</td>
|
216
|
+
<td>
|
217
|
+
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 112</span>
|
218
|
+
|
219
|
+
<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>
|
220
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_redisConnection'>redisConnection</span><span class='op'>==</span><span class='kw'>nil</span>
|
221
|
+
<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>
|
222
|
+
<span class='kw'>else</span>
|
223
|
+
<span class='ivar'>@redis</span><span class='op'>=</span><span class='id identifier rubyid_redisConnection'>redisConnection</span>
|
224
|
+
<span class='kw'>end</span>
|
225
|
+
<span class='kw'>end</span></pre>
|
226
|
+
</td>
|
227
|
+
</tr>
|
228
|
+
</table>
|
229
|
+
</div>
|
230
|
+
|
231
|
+
</div>
|
232
|
+
|
233
|
+
|
234
|
+
<div id="instance_method_details" class="method_details_list">
|
235
|
+
<h2>Instance Method Details</h2>
|
236
|
+
|
237
|
+
|
238
|
+
<div class="method_details first">
|
239
|
+
<h3 class="signature first" id="check_repair-instance_method">
|
240
|
+
|
241
|
+
- (<tt>Object</tt>) <strong>check_repair</strong>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</h3><table class="source_code">
|
248
|
+
<tr>
|
249
|
+
<td>
|
250
|
+
<pre class="lines">
|
251
|
+
|
252
|
+
|
253
|
+
120
|
254
|
+
121
|
255
|
+
122
|
256
|
+
123
|
257
|
+
124
|
258
|
+
125
|
259
|
+
126
|
260
|
+
127
|
261
|
+
128
|
262
|
+
129
|
263
|
+
130
|
264
|
+
131
|
265
|
+
132
|
266
|
+
133
|
267
|
+
134
|
268
|
+
135
|
269
|
+
136
|
270
|
+
137
|
271
|
+
138
|
272
|
+
139
|
273
|
+
140
|
274
|
+
141
|
275
|
+
142
|
276
|
+
143
|
277
|
+
144
|
278
|
+
145
|
279
|
+
146
|
280
|
+
147
|
281
|
+
148</pre>
|
282
|
+
</td>
|
283
|
+
<td>
|
284
|
+
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 120</span>
|
285
|
+
|
286
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_check_repair'>check_repair</span>
|
287
|
+
|
288
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Staring index check</span><span class='tstring_end'>"</span></span>
|
289
|
+
<span class='id identifier rubyid_dbversion'>dbversion</span><span class='op'>=</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hget'>hget</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>codezauker</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>db_version</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
290
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_dbversion'>dbversion</span><span class='op'>==</span><span class='kw'>nil</span>
|
291
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DB Version <=0.7</span><span class='tstring_end'>"</span></span>
|
292
|
+
<span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hset'>hset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>codezauker</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>db_version</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='const'>CodeZauker</span><span class='op'>::</span><span class='const'>DB_VERSION</span><span class='rparen'>)</span>
|
293
|
+
<span class='comment'># no other checks to do right now
|
294
|
+
</span> <span class='kw'>else</span>
|
295
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_dbversion'>dbversion</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>></span> <span class='const'>CodeZauker</span><span class='op'>::</span><span class='const'>DB_VERSION</span>
|
296
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DB Version </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dbversion'>dbversion</span><span class='rbrace'>}</span><span class='tstring_content'> is greater than my </span><span class='embexpr_beg'>#{</span><span class='const'>CodeZauker</span><span class='op'>::</span><span class='const'>DB_VERSION</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
297
|
+
<span class='kw'>else</span>
|
298
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Migrating from </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dbversion'>dbversion</span><span class='rbrace'>}</span><span class='tstring_content'> to </span><span class='embexpr_beg'>#{</span><span class='const'>CodeZauker</span><span class='op'>::</span><span class='const'>DB_VERSION</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
299
|
+
<span class='comment'># Nothing to do right now
|
300
|
+
</span> <span class='kw'>end</span>
|
301
|
+
<span class='kw'>end</span>
|
302
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Summary.....</span><span class='tstring_end'>"</span></span>
|
303
|
+
<span class='id identifier rubyid_dbversion'>dbversion</span><span class='op'>=</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hget'>hget</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>codezauker</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>db_version</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
304
|
+
<span class='id identifier rubyid_last_check'>last_check</span><span class='op'>=</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hget'>hget</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>codezauker</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>last_check</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
305
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DB Version: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dbversion'>dbversion</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
306
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Last Check: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_last_check'>last_check</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
307
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Checking....</span><span class='tstring_end'>"</span></span>
|
308
|
+
<span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hset'>hset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>codezauker</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>last_check</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
309
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Issuing save...</span><span class='tstring_end'>"</span></span>
|
310
|
+
<span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
311
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Save successful</span><span class='tstring_end'>"</span></span>
|
312
|
+
<span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_quit'>quit</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
313
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Disconnected from redis</span><span class='tstring_end'>"</span></span>
|
314
|
+
<span class='kw'>end</span></pre>
|
315
|
+
</td>
|
316
|
+
</tr>
|
317
|
+
</table>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
<div id="footer">
|
325
|
+
Generated on Wed May 16 17:14:54 2012 by
|
326
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
327
|
+
0.8.1 (ruby-1.9.3).
|
328
|
+
</div>
|
329
|
+
|
330
|
+
</body>
|
331
|
+
</html>
|
data/doc/CodeZauker/Util.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: CodeZauker::Util
|
8
8
|
|
9
|
-
— Code Zauker 0.0.
|
9
|
+
— Code Zauker 0.0.8 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,10 +15,12 @@
|
|
15
15
|
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../_index.html">Index (U)</a> »
|
34
|
+
<a href="../_index.html">Index (U)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../CodeZauker.html" title="CodeZauker (module)">CodeZauker</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Util</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Class: CodeZauker::Util
|
60
67
|
|
61
68
|
|
@@ -132,6 +139,7 @@
|
|
132
139
|
|
133
140
|
|
134
141
|
|
142
|
+
|
135
143
|
|
136
144
|
|
137
145
|
<span class="summary_desc"><div class='inline'>
|
@@ -160,6 +168,7 @@ UTF-8 is not valid.</p>
|
|
160
168
|
|
161
169
|
|
162
170
|
|
171
|
+
|
163
172
|
|
164
173
|
|
165
174
|
<span class="summary_desc"><div class='inline'>
|
@@ -183,6 +192,7 @@ UTF-8 is not valid.</p>
|
|
183
192
|
|
184
193
|
|
185
194
|
|
195
|
+
|
186
196
|
|
187
197
|
|
188
198
|
<span class="summary_desc"><div class='inline'></div></span>
|
@@ -204,6 +214,7 @@ UTF-8 is not valid.</p>
|
|
204
214
|
|
205
215
|
|
206
216
|
|
217
|
+
|
207
218
|
|
208
219
|
|
209
220
|
<span class="summary_desc"><div class='inline'>
|
@@ -221,16 +232,18 @@ TODO: Very bad implementation, need improvements.</p>
|
|
221
232
|
|
222
233
|
<div id="instance_method_details" class="method_details_list">
|
223
234
|
<h2>Instance Method Details</h2>
|
224
|
-
|
235
|
+
|
225
236
|
|
226
237
|
<div class="method_details first">
|
227
|
-
<
|
238
|
+
<h3 class="signature first" id="ensureUTF8-instance_method">
|
228
239
|
|
229
240
|
- (<tt>Object</tt>) <strong>ensureUTF8</strong>(untrusted_string)
|
230
241
|
|
231
242
|
|
232
243
|
|
233
|
-
|
244
|
+
|
245
|
+
|
246
|
+
</h3><div class="docstring">
|
234
247
|
<div class="discussion">
|
235
248
|
|
236
249
|
<h1>Ensure Data are correctly imported</h1>
|
@@ -253,9 +266,6 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
253
266
|
<pre class="lines">
|
254
267
|
|
255
268
|
|
256
|
-
57
|
257
|
-
58
|
258
|
-
59
|
259
269
|
60
|
260
270
|
61
|
261
271
|
62
|
@@ -270,10 +280,13 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
270
280
|
71
|
271
281
|
72
|
272
282
|
73
|
273
|
-
74
|
283
|
+
74
|
284
|
+
75
|
285
|
+
76
|
286
|
+
77</pre>
|
274
287
|
</td>
|
275
288
|
<td>
|
276
|
-
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line
|
289
|
+
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 60</span>
|
277
290
|
|
278
291
|
<span class='kw'>def</span> <span class='id identifier rubyid_ensureUTF8'>ensureUTF8</span><span class='lparen'>(</span><span class='id identifier rubyid_untrusted_string'>untrusted_string</span><span class='rparen'>)</span>
|
279
292
|
<span class='kw'>if</span> <span class='id identifier rubyid_untrusted_string'>untrusted_string</span><span class='period'>.</span><span class='id identifier rubyid_valid_encoding?'>valid_encoding?</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='op'>==</span><span class='kw'>false</span>
|
@@ -299,13 +312,15 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
299
312
|
</div>
|
300
313
|
|
301
314
|
<div class="method_details ">
|
302
|
-
<
|
315
|
+
<h3 class="signature " id="get_lines-instance_method">
|
303
316
|
|
304
317
|
- (<tt>Object</tt>) <strong>get_lines</strong>(filename)
|
305
318
|
|
306
319
|
|
307
320
|
|
308
|
-
|
321
|
+
|
322
|
+
|
323
|
+
</h3><div class="docstring">
|
309
324
|
<div class="discussion">
|
310
325
|
|
311
326
|
<p>Obtain lines from a filename It works even with pdf files</p>
|
@@ -322,9 +337,6 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
322
337
|
<pre class="lines">
|
323
338
|
|
324
339
|
|
325
|
-
82
|
326
|
-
83
|
327
|
-
84
|
328
340
|
85
|
329
341
|
86
|
330
342
|
87
|
@@ -344,10 +356,13 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
344
356
|
101
|
345
357
|
102
|
346
358
|
103
|
347
|
-
104
|
359
|
+
104
|
360
|
+
105
|
361
|
+
106
|
362
|
+
107</pre>
|
348
363
|
</td>
|
349
364
|
<td>
|
350
|
-
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line
|
365
|
+
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 85</span>
|
351
366
|
|
352
367
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_lines'>get_lines</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span>
|
353
368
|
<span class='id identifier rubyid_lines'>lines</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -378,13 +393,15 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
378
393
|
</div>
|
379
394
|
|
380
395
|
<div class="method_details ">
|
381
|
-
<
|
396
|
+
<h3 class="signature " id="is_pdf?-instance_method">
|
382
397
|
|
383
398
|
- (<tt>Boolean</tt>) <strong>is_pdf?</strong>(filename)
|
384
399
|
|
385
400
|
|
386
401
|
|
387
|
-
|
402
|
+
|
403
|
+
|
404
|
+
</h3><div class="docstring">
|
388
405
|
<div class="discussion">
|
389
406
|
|
390
407
|
|
@@ -392,7 +409,7 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
392
409
|
</div>
|
393
410
|
<div class="tags">
|
394
411
|
|
395
|
-
<
|
412
|
+
<p class="tag_title">Returns:</p>
|
396
413
|
<ul class="return">
|
397
414
|
|
398
415
|
<li>
|
@@ -412,12 +429,12 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
412
429
|
<pre class="lines">
|
413
430
|
|
414
431
|
|
415
|
-
|
416
|
-
|
417
|
-
|
432
|
+
79
|
433
|
+
80
|
434
|
+
81</pre>
|
418
435
|
</td>
|
419
436
|
<td>
|
420
|
-
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line
|
437
|
+
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 79</span>
|
421
438
|
|
422
439
|
<span class='kw'>def</span> <span class='id identifier rubyid_is_pdf?'>is_pdf?</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span>
|
423
440
|
<span class='kw'>return</span> <span class='id identifier rubyid_filename'>filename</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.pdf</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -428,13 +445,15 @@ interpreted as a UTF-8 whereas it is a ISO-8859 windows code.</p>
|
|
428
445
|
</div>
|
429
446
|
|
430
447
|
<div class="method_details ">
|
431
|
-
<
|
448
|
+
<h3 class="signature " id="mixCase-instance_method">
|
432
449
|
|
433
450
|
- (<tt>Object</tt>) <strong>mixCase</strong>(trigram)
|
434
451
|
|
435
452
|
|
436
453
|
|
437
|
-
|
454
|
+
|
455
|
+
|
456
|
+
</h3><div class="docstring">
|
438
457
|
<div class="discussion">
|
439
458
|
|
440
459
|
<p>Compute all the possible case-mixed trigrams It works for every string size
|
@@ -452,9 +471,6 @@ TODO: Very bad implementation, need improvements</p>
|
|
452
471
|
<pre class="lines">
|
453
472
|
|
454
473
|
|
455
|
-
20
|
456
|
-
21
|
457
|
-
22
|
458
474
|
23
|
459
475
|
24
|
460
476
|
25
|
@@ -481,10 +497,13 @@ TODO: Very bad implementation, need improvements</p>
|
|
481
497
|
46
|
482
498
|
47
|
483
499
|
48
|
484
|
-
49
|
500
|
+
49
|
501
|
+
50
|
502
|
+
51
|
503
|
+
52</pre>
|
485
504
|
</td>
|
486
505
|
<td>
|
487
|
-
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line
|
506
|
+
<pre class="code"><span class="info file"># File 'lib/code_zauker.rb', line 23</span>
|
488
507
|
|
489
508
|
<span class='kw'>def</span> <span class='id identifier rubyid_mixCase'>mixCase</span><span class='lparen'>(</span><span class='id identifier rubyid_trigram'>trigram</span><span class='rparen'>)</span>
|
490
509
|
<span class='id identifier rubyid_caseMixedElements'>caseMixedElements</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -524,11 +543,11 @@ TODO: Very bad implementation, need improvements</p>
|
|
524
543
|
</div>
|
525
544
|
|
526
545
|
</div>
|
527
|
-
|
546
|
+
|
528
547
|
<div id="footer">
|
529
|
-
Generated on
|
548
|
+
Generated on Wed May 16 17:14:54 2012 by
|
530
549
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
531
|
-
0.
|
550
|
+
0.8.1 (ruby-1.9.3).
|
532
551
|
</div>
|
533
552
|
|
534
553
|
</body>
|