vizi_translator 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +56 -54
- data/README.rdoc.old +56 -0
- data/doc/classes/Vizi/Translator.html +200 -0
- data/doc/classes/Vizi/Translator.src/M000002.html +18 -0
- data/doc/classes/Vizi/Translator.src/M000003.html +18 -0
- data/doc/classes/Vizi/Translator.src/M000004.html +40 -0
- data/doc/classes/Vizi/UnSupportedLanguage.html +150 -0
- data/doc/classes/Vizi/UnSupportedLanguage.src/M000001.html +18 -0
- data/doc/classes/Vizi.html +122 -0
- data/doc/created.rid +1 -4
- data/doc/files/lib/vizi/vizi_translator_rb.html +126 -0
- data/doc/files/lib/vizi_translator_rb.html +114 -0
- data/doc/files/testit_rb.html +127 -0
- data/doc/fr_class_index.html +29 -0
- data/doc/fr_file_index.html +29 -0
- data/doc/fr_method_index.html +30 -0
- data/doc/index.html +24 -68
- data/doc/rdoc-style.css +208 -0
- data/testit.rb +2 -2
- data/vizi_translator-0.2.0.gem +0 -0
- data/vizi_translator.gemspec +1 -1
- metadata +20 -60
- data/doc/Object.html +0 -200
- data/doc/ParserTest.html +0 -268
- data/doc/README_rdoc.html +0 -128
- data/doc/Rakefile.html +0 -148
- data/doc/Visit.html +0 -487
- data/doc/VisitList.html +0 -385
- data/doc/Vizi/LogFormat.html +0 -377
- data/doc/Vizi/LogParser.html +0 -551
- data/doc/Vizi/Translator.html +0 -302
- data/doc/Vizi/UnSupportedLanguage.html +0 -212
- data/doc/Vizi/Visit.html +0 -487
- data/doc/Vizi/VisitList.html +0 -386
- data/doc/Vizi.html +0 -159
- data/doc/ViziLogFormat.html +0 -382
- data/doc/ViziLogParser.html +0 -551
- data/doc/docs/Whois_Documentation.doc +0 -0
- data/doc/formats/apache-custom-log.pdf +0 -0
- data/doc/formats/apache.rtf +0 -238
- data/doc/formats/format-descriptions.xls +0 -0
- data/doc/formats/w3c-extended.pdf +0 -0
- data/doc/formats/w3c-extended.rtf +0 -135
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/js/darkfish.js +0 -116
- data/doc/js/jquery.js +0 -32
- data/doc/js/quicksearch.js +0 -114
- data/doc/js/thickbox-compressed.js +0 -10
- data/doc/lib/vizi/parser_rb.html +0 -63
- data/doc/lib/vizi/vizi_tracker_rb.html +0 -63
- data/doc/lib/vizi/vizi_translator.html +0 -104
- data/doc/lib/vizi/vizi_translator_rb.html +0 -69
- data/doc/lib/vizi_log_parser_rb.html +0 -56
- data/doc/lib/vizi_tracker_rb.html +0 -56
- data/doc/lib/vizi_translator_rb.html +0 -54
- data/doc/rdoc.css +0 -759
- data/doc/test/parser_test_rb.html +0 -54
- data/doc/test/test_helper_rb.html +0 -56
- data/doc/testit_rb.html +0 -63
data/doc/Visit.html
DELETED
@@ -1,487 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="IBM437"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<meta content="text/html; charset=IBM437" http-equiv="Content-Type" />
|
7
|
-
|
8
|
-
<title>Class: Visit</title>
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
11
|
-
|
12
|
-
<script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
-
<script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
-
<script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
-
<script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body id="top" class="class">
|
19
|
-
|
20
|
-
<div id="metadata">
|
21
|
-
<div id="home-metadata">
|
22
|
-
<div id="home-section" class="section">
|
23
|
-
<h3 class="section-header">
|
24
|
-
<a href="./index.html">Home</a>
|
25
|
-
<a href="./index.html#classes">Classes</a>
|
26
|
-
<a href="./index.html#methods">Methods</a>
|
27
|
-
</h3>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<div id="file-metadata">
|
32
|
-
<div id="file-list-section" class="section">
|
33
|
-
<h3 class="section-header">In Files</h3>
|
34
|
-
<div class="section-body">
|
35
|
-
<ul>
|
36
|
-
|
37
|
-
<li><a href="./lib/vizi/parser_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
-
class="thickbox" title="lib/vizi/parser.rb">lib/vizi/parser.rb</a></li>
|
39
|
-
|
40
|
-
</ul>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div id="class-metadata">
|
48
|
-
|
49
|
-
<!-- Parent Class -->
|
50
|
-
<div id="parent-class-section" class="section">
|
51
|
-
<h3 class="section-header">Parent</h3>
|
52
|
-
|
53
|
-
<p class="link"><a href="Object.html">Object</a></p>
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
<!-- Method Quickref -->
|
64
|
-
<div id="method-list-section" class="section">
|
65
|
-
<h3 class="section-header">Methods</h3>
|
66
|
-
<ul class="link-list">
|
67
|
-
|
68
|
-
<li><a href="#method-c-new">::new</a></li>
|
69
|
-
|
70
|
-
<li><a href="#method-i-sendoutput">#sendoutput</a></li>
|
71
|
-
|
72
|
-
<li><a href="#method-i-update">#update</a></li>
|
73
|
-
|
74
|
-
</ul>
|
75
|
-
</div>
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
</div>
|
80
|
-
|
81
|
-
<div id="project-metadata">
|
82
|
-
|
83
|
-
|
84
|
-
<div id="fileindex-section" class="section project-section">
|
85
|
-
<h3 class="section-header">Files</h3>
|
86
|
-
<ul>
|
87
|
-
|
88
|
-
<li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
|
89
|
-
|
90
|
-
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
91
|
-
|
92
|
-
</ul>
|
93
|
-
</div>
|
94
|
-
|
95
|
-
|
96
|
-
<div id="classindex-section" class="section project-section">
|
97
|
-
<h3 class="section-header">Class/Module Index
|
98
|
-
<span class="search-toggle"><img src="./images/find.png"
|
99
|
-
height="16" width="16" alt="[+]"
|
100
|
-
title="show/hide quicksearch" /></span></h3>
|
101
|
-
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
102
|
-
<fieldset>
|
103
|
-
<legend>Quicksearch</legend>
|
104
|
-
<input type="text" name="quicksearch" value=""
|
105
|
-
class="quicksearch-field" />
|
106
|
-
</fieldset>
|
107
|
-
</form>
|
108
|
-
|
109
|
-
<ul class="link-list">
|
110
|
-
|
111
|
-
<li><a href="./Object.html">Object</a></li>
|
112
|
-
|
113
|
-
<li><a href="./ParserTest.html">ParserTest</a></li>
|
114
|
-
|
115
|
-
<li><a href="./Visit.html">Visit</a></li>
|
116
|
-
|
117
|
-
<li><a href="./VisitList.html">VisitList</a></li>
|
118
|
-
|
119
|
-
<li><a href="./ViziLogFormat.html">ViziLogFormat</a></li>
|
120
|
-
|
121
|
-
<li><a href="./ViziLogParser.html">ViziLogParser</a></li>
|
122
|
-
|
123
|
-
</ul>
|
124
|
-
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
125
|
-
</div>
|
126
|
-
|
127
|
-
|
128
|
-
</div>
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div id="documentation">
|
132
|
-
<h1 class="class">Visit</h1>
|
133
|
-
|
134
|
-
<div id="description" class="description">
|
135
|
-
|
136
|
-
<h2>This class creates and stores information related to each visit</h2>
|
137
|
-
|
138
|
-
<p>Visits are determined on the basis of the IP Address hits during a timed
|
139
|
-
interval Created by ...</p>
|
140
|
-
|
141
|
-
</div><!-- description -->
|
142
|
-
|
143
|
-
|
144
|
-
<div id="5Buntitled-5D" class="documentation-section">
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
<!-- Attributes -->
|
153
|
-
<div id="attribute-method-details" class="method-section section">
|
154
|
-
<h3 class="section-header">Attributes</h3>
|
155
|
-
|
156
|
-
|
157
|
-
<div id="duration-attribute-method" class="method-detail">
|
158
|
-
<a name="duration"></a>
|
159
|
-
|
160
|
-
<a name="duration="></a>
|
161
|
-
|
162
|
-
<div class="method-heading attribute-method-heading">
|
163
|
-
<span class="method-name">duration</span><span
|
164
|
-
class="attribute-access-type">[RW]</span>
|
165
|
-
</div>
|
166
|
-
|
167
|
-
<div class="method-description">
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
</div>
|
172
|
-
</div>
|
173
|
-
|
174
|
-
<div id="end_dt-attribute-method" class="method-detail">
|
175
|
-
<a name="end_dt"></a>
|
176
|
-
|
177
|
-
<a name="end_dt="></a>
|
178
|
-
|
179
|
-
<div class="method-heading attribute-method-heading">
|
180
|
-
<span class="method-name">end_dt</span><span
|
181
|
-
class="attribute-access-type">[RW]</span>
|
182
|
-
</div>
|
183
|
-
|
184
|
-
<div class="method-description">
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
</div>
|
189
|
-
</div>
|
190
|
-
|
191
|
-
<div id="expire_dt-attribute-method" class="method-detail">
|
192
|
-
<a name="expire_dt"></a>
|
193
|
-
|
194
|
-
<a name="expire_dt="></a>
|
195
|
-
|
196
|
-
<div class="method-heading attribute-method-heading">
|
197
|
-
<span class="method-name">expire_dt</span><span
|
198
|
-
class="attribute-access-type">[RW]</span>
|
199
|
-
</div>
|
200
|
-
|
201
|
-
<div class="method-description">
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
</div>
|
206
|
-
</div>
|
207
|
-
|
208
|
-
<div id="hits-attribute-method" class="method-detail">
|
209
|
-
<a name="hits"></a>
|
210
|
-
|
211
|
-
<a name="hits="></a>
|
212
|
-
|
213
|
-
<div class="method-heading attribute-method-heading">
|
214
|
-
<span class="method-name">hits</span><span
|
215
|
-
class="attribute-access-type">[RW]</span>
|
216
|
-
</div>
|
217
|
-
|
218
|
-
<div class="method-description">
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
</div>
|
223
|
-
</div>
|
224
|
-
|
225
|
-
<div id="ip-attribute-method" class="method-detail">
|
226
|
-
<a name="ip"></a>
|
227
|
-
|
228
|
-
<a name="ip="></a>
|
229
|
-
|
230
|
-
<div class="method-heading attribute-method-heading">
|
231
|
-
<span class="method-name">ip</span><span
|
232
|
-
class="attribute-access-type">[RW]</span>
|
233
|
-
</div>
|
234
|
-
|
235
|
-
<div class="method-description">
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
|
242
|
-
<div id="pages-attribute-method" class="method-detail">
|
243
|
-
<a name="pages"></a>
|
244
|
-
|
245
|
-
<a name="pages="></a>
|
246
|
-
|
247
|
-
<div class="method-heading attribute-method-heading">
|
248
|
-
<span class="method-name">pages</span><span
|
249
|
-
class="attribute-access-type">[RW]</span>
|
250
|
-
</div>
|
251
|
-
|
252
|
-
<div class="method-description">
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
</div>
|
257
|
-
</div>
|
258
|
-
|
259
|
-
<div id="robots-attribute-method" class="method-detail">
|
260
|
-
<a name="robots"></a>
|
261
|
-
|
262
|
-
<a name="robots="></a>
|
263
|
-
|
264
|
-
<div class="method-heading attribute-method-heading">
|
265
|
-
<span class="method-name">robots</span><span
|
266
|
-
class="attribute-access-type">[RW]</span>
|
267
|
-
</div>
|
268
|
-
|
269
|
-
<div class="method-description">
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
</div>
|
274
|
-
</div>
|
275
|
-
|
276
|
-
<div id="searchphrase-attribute-method" class="method-detail">
|
277
|
-
<a name="searchphrase"></a>
|
278
|
-
|
279
|
-
<a name="searchphrase="></a>
|
280
|
-
|
281
|
-
<div class="method-heading attribute-method-heading">
|
282
|
-
<span class="method-name">searchphrase</span><span
|
283
|
-
class="attribute-access-type">[RW]</span>
|
284
|
-
</div>
|
285
|
-
|
286
|
-
<div class="method-description">
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
</div>
|
291
|
-
</div>
|
292
|
-
|
293
|
-
<div id="start_dt-attribute-method" class="method-detail">
|
294
|
-
<a name="start_dt"></a>
|
295
|
-
|
296
|
-
<a name="start_dt="></a>
|
297
|
-
|
298
|
-
<div class="method-heading attribute-method-heading">
|
299
|
-
<span class="method-name">start_dt</span><span
|
300
|
-
class="attribute-access-type">[RW]</span>
|
301
|
-
</div>
|
302
|
-
|
303
|
-
<div class="method-description">
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
</div>
|
308
|
-
</div>
|
309
|
-
|
310
|
-
<div id="visitortype-attribute-method" class="method-detail">
|
311
|
-
<a name="visitortype"></a>
|
312
|
-
|
313
|
-
<a name="visitortype="></a>
|
314
|
-
|
315
|
-
<div class="method-heading attribute-method-heading">
|
316
|
-
<span class="method-name">visitortype</span><span
|
317
|
-
class="attribute-access-type">[RW]</span>
|
318
|
-
</div>
|
319
|
-
|
320
|
-
<div class="method-description">
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
</div>
|
325
|
-
</div>
|
326
|
-
|
327
|
-
</div><!-- attribute-method-details -->
|
328
|
-
|
329
|
-
|
330
|
-
<!-- Methods -->
|
331
|
-
|
332
|
-
<div id="public-class-method-details" class="method-section section">
|
333
|
-
<h3 class="section-header">Public Class Methods</h3>
|
334
|
-
|
335
|
-
|
336
|
-
<div id="new-method" class="method-detail ">
|
337
|
-
<a name="method-c-new"></a>
|
338
|
-
|
339
|
-
|
340
|
-
<div class="method-heading">
|
341
|
-
<span class="method-name">new</span><span
|
342
|
-
class="method-args">(ip, logdt, csuristem, csuriquery, p_visitortype, p_pageflag, p_searchphrase, visit_timeout)</span>
|
343
|
-
<span class="method-click-advice">click to toggle source</span>
|
344
|
-
</div>
|
345
|
-
|
346
|
-
|
347
|
-
<div class="method-description">
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
<div class="method-source-code" id="new-source">
|
354
|
-
<pre>
|
355
|
-
<span class="ruby-comment"># File lib/vizi/parser.rb, line 277</span>
|
356
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ip</span>, <span class="ruby-identifier">logdt</span>, <span class="ruby-identifier">csuristem</span>, <span class="ruby-identifier">csuriquery</span>, <span class="ruby-identifier">p_visitortype</span>, <span class="ruby-identifier">p_pageflag</span>, <span class="ruby-identifier">p_searchphrase</span>, <span class="ruby-identifier">visit_timeout</span>)
|
357
|
-
<span class="ruby-ivar">@ip</span> = <span class="ruby-identifier">ip</span>
|
358
|
-
<span class="ruby-ivar">@start_dt</span> = <span class="ruby-identifier">logdt</span>
|
359
|
-
<span class="ruby-ivar">@expire_dt</span> = <span class="ruby-ivar">@start_dt</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">visit_timeout</span>
|
360
|
-
<span class="ruby-ivar">@end_dt</span> = <span class="ruby-ivar">@start_dt</span>
|
361
|
-
<span class="ruby-ivar">@duration</span> = <span class="ruby-value">0</span>
|
362
|
-
<span class="ruby-ivar">@hits</span> = <span class="ruby-value">1</span>
|
363
|
-
<span class="ruby-ivar">@pages</span> = <span class="ruby-value">0</span>
|
364
|
-
<span class="ruby-ivar">@pages</span> = <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">p_pageflag</span>
|
365
|
-
<span class="ruby-ivar">@visitortype</span> = <span class="ruby-identifier">p_visitortype</span>
|
366
|
-
<span class="ruby-ivar">@robots</span> = <span class="ruby-keyword">false</span>
|
367
|
-
<span class="ruby-ivar">@robots</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">csuristem</span> <span class="ruby-operator">==</span> <span class="ruby-string">"/robots.txt"</span>
|
368
|
-
<span class="ruby-ivar">@visitortype</span> = <span class="ruby-string">"S"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">robots</span>
|
369
|
-
<span class="ruby-ivar">@searchphrase</span> = <span class="ruby-string">""</span>
|
370
|
-
<span class="ruby-ivar">@searchphrase</span> = <span class="ruby-identifier">p_searchphrase</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">p_searchphrase</span>.<span class="ruby-identifier">nil?</span>
|
371
|
-
<span class="ruby-ivar">@pageids</span> = []
|
372
|
-
<span class="ruby-identifier">z</span>=(<span class="ruby-regexp">/(PageID)=(\d+)/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">csuriquery</span>)
|
373
|
-
<span class="ruby-ivar">@pageids</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">z</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">nil?</span>
|
374
|
-
<span class="ruby-comment"># p csuriquery
|
375
|
-
<span class="ruby-comment"># p @pageids
|
376
|
-
<span class="ruby-keyword">end</span></pre>
|
377
|
-
</div><!-- new-source -->
|
378
|
-
|
379
|
-
</div>
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
</div><!-- new-method -->
|
385
|
-
|
386
|
-
|
387
|
-
</div><!-- public-class-method-details -->
|
388
|
-
|
389
|
-
<div id="public-instance-method-details" class="method-section section">
|
390
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
391
|
-
|
392
|
-
|
393
|
-
<div id="sendoutput-method" class="method-detail ">
|
394
|
-
<a name="method-i-sendoutput"></a>
|
395
|
-
|
396
|
-
|
397
|
-
<div class="method-heading">
|
398
|
-
<span class="method-name">sendoutput</span><span
|
399
|
-
class="method-args">()</span>
|
400
|
-
<span class="method-click-advice">click to toggle source</span>
|
401
|
-
</div>
|
402
|
-
|
403
|
-
|
404
|
-
<div class="method-description">
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
<div class="method-source-code" id="sendoutput-source">
|
411
|
-
<pre>
|
412
|
-
<span class="ruby-comment"># File lib/vizi/parser.rb, line 312</span>
|
413
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sendoutput</span>
|
414
|
-
<span class="ruby-comment">#if @pages > 0
|
415
|
-
<span class="ruby-identifier">iplong</span> = <span class="ruby-ivar">@ip</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">" "</span>
|
416
|
-
<span class="ruby-identifier">p</span> <span class="ruby-string">"> "</span><span class="ruby-operator">+</span><span class="ruby-identifier">iplong</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">14</span>]<span class="ruby-operator">+</span><span class="ruby-string">" "</span><span class="ruby-operator">+</span><span class="ruby-ivar">@start_dt</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">18</span>]<span class="ruby-operator">+</span><span class="ruby-string">" "</span><span class="ruby-operator">+</span><span class="ruby-ivar">@visitortype</span><span class="ruby-operator">+</span><span class="ruby-string">" Hits> "</span><span class="ruby-operator">+</span><span class="ruby-ivar">@hits</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">" Pgs> "</span><span class="ruby-operator">+</span><span class="ruby-ivar">@pages</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">" Dur> "</span><span class="ruby-operator">+</span><span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">" Phrase> "</span><span class="ruby-operator">+</span><span class="ruby-ivar">@searchphrase</span>
|
417
|
-
<span class="ruby-identifier">p</span> <span class="ruby-ivar">@pageids</span>
|
418
|
-
<span class="ruby-comment">#end
|
419
|
-
<span class="ruby-keyword">end</span></pre>
|
420
|
-
</div><!-- sendoutput-source -->
|
421
|
-
|
422
|
-
</div>
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
</div><!-- sendoutput-method -->
|
428
|
-
|
429
|
-
|
430
|
-
<div id="update-method" class="method-detail ">
|
431
|
-
<a name="method-i-update"></a>
|
432
|
-
|
433
|
-
|
434
|
-
<div class="method-heading">
|
435
|
-
<span class="method-name">update</span><span
|
436
|
-
class="method-args">(logdt, csuriquery, p_visitortype, p_pageflag, p_searchphrase)</span>
|
437
|
-
<span class="method-click-advice">click to toggle source</span>
|
438
|
-
</div>
|
439
|
-
|
440
|
-
|
441
|
-
<div class="method-description">
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
<div class="method-source-code" id="update-source">
|
448
|
-
<pre>
|
449
|
-
<span class="ruby-comment"># File lib/vizi/parser.rb, line 299</span>
|
450
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">logdt</span>, <span class="ruby-identifier">csuriquery</span>, <span class="ruby-identifier">p_visitortype</span>, <span class="ruby-identifier">p_pageflag</span>, <span class="ruby-identifier">p_searchphrase</span>)
|
451
|
-
<span class="ruby-ivar">@end_dt</span> = <span class="ruby-identifier">logdt</span>
|
452
|
-
<span class="ruby-ivar">@hits</span> = <span class="ruby-ivar">@hits</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
453
|
-
<span class="ruby-ivar">@pages</span> = <span class="ruby-ivar">@pages</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">p_pageflag</span>
|
454
|
-
<span class="ruby-ivar">@duration</span> = (<span class="ruby-ivar">@end_dt</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start_dt</span>).<span class="ruby-identifier">to_i</span>
|
455
|
-
<span class="ruby-ivar">@visitortype</span> = <span class="ruby-identifier">p_visitortype</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@visitortype</span> <span class="ruby-operator">==</span> <span class="ruby-string">"H"</span>
|
456
|
-
<span class="ruby-ivar">@searchphrase</span> = <span class="ruby-identifier">p_searchphrase</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">p_searchphrase</span>.<span class="ruby-identifier">nil?</span>
|
457
|
-
<span class="ruby-identifier">z</span>=(<span class="ruby-regexp">/(PageID)=(\d+)/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">csuriquery</span>)
|
458
|
-
<span class="ruby-ivar">@pageids</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">z</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">nil?</span>
|
459
|
-
<span class="ruby-comment"># p csuriquery
|
460
|
-
<span class="ruby-comment"># p @pageids
|
461
|
-
<span class="ruby-keyword">end</span></pre>
|
462
|
-
</div><!-- update-source -->
|
463
|
-
|
464
|
-
</div>
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
</div><!-- update-method -->
|
470
|
-
|
471
|
-
|
472
|
-
</div><!-- public-instance-method-details -->
|
473
|
-
|
474
|
-
</div><!-- 5Buntitled-5D -->
|
475
|
-
|
476
|
-
|
477
|
-
</div><!-- documentation -->
|
478
|
-
|
479
|
-
<div id="validator-badges">
|
480
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
481
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
482
|
-
Rdoc Generator</a> 2</small>.</p>
|
483
|
-
</div>
|
484
|
-
|
485
|
-
</body>
|
486
|
-
</html>
|
487
|
-
|