nexpose-functions 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/doc/Nexpose/Connection.html +866 -0
- data/doc/Nexpose/Site.html +264 -0
- data/doc/_index.html +120 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file_list.html +57 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +120 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +111 -0
- data/doc/top-level-namespace.html +244 -0
- data/lib/nexpose-functions.rb +124 -0
- metadata +60 -0
@@ -0,0 +1,866 @@
|
|
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: Nexpose::Connection
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" 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#!Nexpose/Connection.html";
|
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 (C)</a> »
|
35
|
+
<span class='title'>Nexpose</span>
|
36
|
+
»
|
37
|
+
<span class="title">Connection</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: Nexpose::Connection
|
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">Nexpose::Connection</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\nexpose-functions.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<h2>
|
111
|
+
Instance Method Summary
|
112
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
113
|
+
</h2>
|
114
|
+
|
115
|
+
<ul class="summary">
|
116
|
+
|
117
|
+
<li class="public ">
|
118
|
+
<span class="summary_signature">
|
119
|
+
|
120
|
+
<a href="#getAsset-instance_method" title="#getAsset (instance method)">- (Asset) <strong>getAsset</strong>(host) </a>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<span class="summary_desc"><div class='inline'>
|
135
|
+
<p>Get an Asset object for the specified host IP.</p>
|
136
|
+
</div></span>
|
137
|
+
|
138
|
+
</li>
|
139
|
+
|
140
|
+
|
141
|
+
<li class="public ">
|
142
|
+
<span class="summary_signature">
|
143
|
+
|
144
|
+
<a href="#getSitesInfobyId-instance_method" title="#getSitesInfobyId (instance method)">- (Hash) <strong>getSitesInfobyId</strong> </a>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
</span>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>Get a Hash object containing pairs of site ids/names where the Hash key is
|
160
|
+
the site id.</p>
|
161
|
+
</div></span>
|
162
|
+
|
163
|
+
</li>
|
164
|
+
|
165
|
+
|
166
|
+
<li class="public ">
|
167
|
+
<span class="summary_signature">
|
168
|
+
|
169
|
+
<a href="#getSitesInfobyName-instance_method" title="#getSitesInfobyName (instance method)">- (Hash) <strong>getSitesInfobyName</strong> </a>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
</span>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<span class="summary_desc"><div class='inline'>
|
184
|
+
<p>Get a Hash object containing pairs of site names/ids where the Hash key is
|
185
|
+
the site name.</p>
|
186
|
+
</div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
<li class="public ">
|
192
|
+
<span class="summary_signature">
|
193
|
+
|
194
|
+
<a href="#notScannedSince-instance_method" title="#notScannedSince (instance method)">- (Array[Asset]) <strong>notScannedSince</strong>(days) </a>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</span>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<span class="summary_desc"><div class='inline'>
|
209
|
+
<p>Get an array of Asset objects for hosts that have not been scanned in 'X'
|
210
|
+
days.</p>
|
211
|
+
</div></span>
|
212
|
+
|
213
|
+
</li>
|
214
|
+
|
215
|
+
|
216
|
+
<li class="public ">
|
217
|
+
<span class="summary_signature">
|
218
|
+
|
219
|
+
<a href="#siteid_to_name-instance_method" title="#siteid_to_name (instance method)">- (String) <strong>siteid_to_name</strong>(siteid) </a>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</span>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'>
|
234
|
+
<p>Get the name for a site ID.</p>
|
235
|
+
</div></span>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#sitename_to_id-instance_method" title="#sitename_to_id (instance method)">- (Fixnum) <strong>sitename_to_id</strong>(sitename) </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<span class="summary_desc"><div class='inline'>
|
258
|
+
<p>Get the ID for a site name.</p>
|
259
|
+
</div></span>
|
260
|
+
|
261
|
+
</li>
|
262
|
+
|
263
|
+
|
264
|
+
<li class="public ">
|
265
|
+
<span class="summary_signature">
|
266
|
+
|
267
|
+
<a href="#validate_engineid-instance_method" title="#validate_engineid (instance method)">- (Boolean) <strong>validate_engineid</strong>(engID) </a>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
</span>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
<span class="summary_desc"><div class='inline'>
|
282
|
+
<p>Check if an input is a valid engine id.</p>
|
283
|
+
</div></span>
|
284
|
+
|
285
|
+
</li>
|
286
|
+
|
287
|
+
|
288
|
+
</ul>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
<div id="instance_method_details" class="method_details_list">
|
294
|
+
<h2>Instance Method Details</h2>
|
295
|
+
|
296
|
+
|
297
|
+
<div class="method_details first">
|
298
|
+
<h3 class="signature first" id="getAsset-instance_method">
|
299
|
+
|
300
|
+
- (<tt>Asset</tt>) <strong>getAsset</strong>(host)
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
</h3><div class="docstring">
|
307
|
+
<div class="discussion">
|
308
|
+
|
309
|
+
<p>Get an Asset object for the specified host IP.</p>
|
310
|
+
|
311
|
+
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
<div class="tags">
|
315
|
+
<p class="tag_title">Parameters:</p>
|
316
|
+
<ul class="param">
|
317
|
+
|
318
|
+
<li>
|
319
|
+
|
320
|
+
<span class='name'>host</span>
|
321
|
+
|
322
|
+
|
323
|
+
<span class='type'>(<tt>String</tt>)</span>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
—
|
328
|
+
<div class='inline'>
|
329
|
+
<p>the hostname to get an Asset object for.</p>
|
330
|
+
</div>
|
331
|
+
|
332
|
+
</li>
|
333
|
+
|
334
|
+
</ul>
|
335
|
+
|
336
|
+
<p class="tag_title">Returns:</p>
|
337
|
+
<ul class="return">
|
338
|
+
|
339
|
+
<li>
|
340
|
+
|
341
|
+
|
342
|
+
<span class='type'>(<tt>Asset</tt>)</span>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
—
|
347
|
+
<div class='inline'>
|
348
|
+
<p>the Asset object for the host.</p>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
</li>
|
352
|
+
|
353
|
+
</ul>
|
354
|
+
|
355
|
+
</div><table class="source_code">
|
356
|
+
<tr>
|
357
|
+
<td>
|
358
|
+
<pre class="lines">
|
359
|
+
|
360
|
+
|
361
|
+
88
|
362
|
+
89
|
363
|
+
90</pre>
|
364
|
+
</td>
|
365
|
+
<td>
|
366
|
+
<pre class="code"><span class="info file"># File 'lib\nexpose-functions.rb', line 88</span>
|
367
|
+
|
368
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getAsset'>getAsset</span><span class='lparen'>(</span><span class='id identifier rubyid_host'>host</span><span class='rparen'>)</span>
|
369
|
+
<span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_filter'>filter</span><span class='lparen'>(</span><span class='const'>Nexpose</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>Field</span><span class='op'>::</span><span class='const'>ASSET</span><span class='comma'>,</span> <span class='const'>Nexpose</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>Operator</span><span class='op'>::</span><span class='const'>IS</span><span class='comma'>,</span> <span class='id identifier rubyid_host'>host</span><span class='rparen'>)</span>
|
370
|
+
<span class='kw'>end</span></pre>
|
371
|
+
</td>
|
372
|
+
</tr>
|
373
|
+
</table>
|
374
|
+
</div>
|
375
|
+
|
376
|
+
<div class="method_details ">
|
377
|
+
<h3 class="signature " id="getSitesInfobyId-instance_method">
|
378
|
+
|
379
|
+
- (<tt>Hash</tt>) <strong>getSitesInfobyId</strong>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
</h3><div class="docstring">
|
386
|
+
<div class="discussion">
|
387
|
+
|
388
|
+
<p>Get a Hash object containing pairs of site ids/names where the Hash key is
|
389
|
+
the site id.</p>
|
390
|
+
|
391
|
+
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
<div class="tags">
|
395
|
+
|
396
|
+
<p class="tag_title">Returns:</p>
|
397
|
+
<ul class="return">
|
398
|
+
|
399
|
+
<li>
|
400
|
+
|
401
|
+
|
402
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
—
|
407
|
+
<div class='inline'>
|
408
|
+
<p>object with site ids as the keys and site names as the values.</p>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
</li>
|
412
|
+
|
413
|
+
</ul>
|
414
|
+
|
415
|
+
</div><table class="source_code">
|
416
|
+
<tr>
|
417
|
+
<td>
|
418
|
+
<pre class="lines">
|
419
|
+
|
420
|
+
|
421
|
+
66
|
422
|
+
67
|
423
|
+
68
|
424
|
+
69
|
425
|
+
70
|
426
|
+
71
|
427
|
+
72</pre>
|
428
|
+
</td>
|
429
|
+
<td>
|
430
|
+
<pre class="code"><span class="info file"># File 'lib\nexpose-functions.rb', line 66</span>
|
431
|
+
|
432
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getSitesInfobyId'>getSitesInfobyId</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
433
|
+
<span class='id identifier rubyid_sitesinfo'>sitesinfo</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
434
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list_sites'>list_sites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_site'>site</span><span class='op'>|</span>
|
435
|
+
<span class='id identifier rubyid_sitesinfo'>sitesinfo</span><span class='lbracket'>[</span><span class='id identifier rubyid_site'>site</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_site'>site</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
436
|
+
<span class='rbrace'>}</span>
|
437
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_sitesinfo'>sitesinfo</span>
|
438
|
+
<span class='kw'>end</span></pre>
|
439
|
+
</td>
|
440
|
+
</tr>
|
441
|
+
</table>
|
442
|
+
</div>
|
443
|
+
|
444
|
+
<div class="method_details ">
|
445
|
+
<h3 class="signature " id="getSitesInfobyName-instance_method">
|
446
|
+
|
447
|
+
- (<tt>Hash</tt>) <strong>getSitesInfobyName</strong>
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
</h3><div class="docstring">
|
454
|
+
<div class="discussion">
|
455
|
+
|
456
|
+
<p>Get a Hash object containing pairs of site names/ids where the Hash key is
|
457
|
+
the site name.</p>
|
458
|
+
|
459
|
+
|
460
|
+
</div>
|
461
|
+
</div>
|
462
|
+
<div class="tags">
|
463
|
+
|
464
|
+
<p class="tag_title">Returns:</p>
|
465
|
+
<ul class="return">
|
466
|
+
|
467
|
+
<li>
|
468
|
+
|
469
|
+
|
470
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
—
|
475
|
+
<div class='inline'>
|
476
|
+
<p>object with site names as the keys and site ids as the values.</p>
|
477
|
+
</div>
|
478
|
+
|
479
|
+
</li>
|
480
|
+
|
481
|
+
</ul>
|
482
|
+
|
483
|
+
</div><table class="source_code">
|
484
|
+
<tr>
|
485
|
+
<td>
|
486
|
+
<pre class="lines">
|
487
|
+
|
488
|
+
|
489
|
+
77
|
490
|
+
78
|
491
|
+
79
|
492
|
+
80
|
493
|
+
81
|
494
|
+
82</pre>
|
495
|
+
</td>
|
496
|
+
<td>
|
497
|
+
<pre class="code"><span class="info file"># File 'lib\nexpose-functions.rb', line 77</span>
|
498
|
+
|
499
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getSitesInfobyName'>getSitesInfobyName</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
500
|
+
<span class='id identifier rubyid_sitesinfo'>sitesinfo</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
501
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list_sites'>list_sites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_site'>site</span><span class='op'>|</span>
|
502
|
+
<span class='id identifier rubyid_sitesinfo'>sitesinfo</span><span class='lbracket'>[</span><span class='id identifier rubyid_site'>site</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_sites'>sites</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
|
503
|
+
<span class='rbrace'>}</span>
|
504
|
+
<span class='kw'>end</span></pre>
|
505
|
+
</td>
|
506
|
+
</tr>
|
507
|
+
</table>
|
508
|
+
</div>
|
509
|
+
|
510
|
+
<div class="method_details ">
|
511
|
+
<h3 class="signature " id="notScannedSince-instance_method">
|
512
|
+
|
513
|
+
- (<tt>Array[Asset]</tt>) <strong>notScannedSince</strong>(days)
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
</h3><div class="docstring">
|
520
|
+
<div class="discussion">
|
521
|
+
|
522
|
+
<p>Get an array of Asset objects for hosts that have not been scanned in 'X'
|
523
|
+
days.</p>
|
524
|
+
|
525
|
+
|
526
|
+
</div>
|
527
|
+
</div>
|
528
|
+
<div class="tags">
|
529
|
+
<p class="tag_title">Parameters:</p>
|
530
|
+
<ul class="param">
|
531
|
+
|
532
|
+
<li>
|
533
|
+
|
534
|
+
<span class='name'>days</span>
|
535
|
+
|
536
|
+
|
537
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
—
|
542
|
+
<div class='inline'>
|
543
|
+
<p>the number of days back to check for unscanned hosts.</p>
|
544
|
+
</div>
|
545
|
+
|
546
|
+
</li>
|
547
|
+
|
548
|
+
</ul>
|
549
|
+
|
550
|
+
<p class="tag_title">Returns:</p>
|
551
|
+
<ul class="return">
|
552
|
+
|
553
|
+
<li>
|
554
|
+
|
555
|
+
|
556
|
+
<span class='type'>(<tt>Array[Asset]</tt>)</span>
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
—
|
561
|
+
<div class='inline'>
|
562
|
+
<p>array of Asset objects for the hosts.</p>
|
563
|
+
</div>
|
564
|
+
|
565
|
+
</li>
|
566
|
+
|
567
|
+
</ul>
|
568
|
+
|
569
|
+
</div><table class="source_code">
|
570
|
+
<tr>
|
571
|
+
<td>
|
572
|
+
<pre class="lines">
|
573
|
+
|
574
|
+
|
575
|
+
96
|
576
|
+
97
|
577
|
+
98</pre>
|
578
|
+
</td>
|
579
|
+
<td>
|
580
|
+
<pre class="code"><span class="info file"># File 'lib\nexpose-functions.rb', line 96</span>
|
581
|
+
|
582
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_notScannedSince'>notScannedSince</span><span class='lparen'>(</span><span class='id identifier rubyid_days'>days</span><span class='rparen'>)</span>
|
583
|
+
<span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_filter'>filter</span><span class='lparen'>(</span><span class='const'>Nexpose</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>Field</span><span class='op'>::</span><span class='const'>SCAN_DATE</span><span class='comma'>,</span> <span class='const'>Nexpose</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>Operator</span><span class='op'>::</span><span class='const'>EARLIER_THAN</span><span class='comma'>,</span> <span class='id identifier rubyid_days'>days</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span>
|
584
|
+
<span class='kw'>end</span></pre>
|
585
|
+
</td>
|
586
|
+
</tr>
|
587
|
+
</table>
|
588
|
+
</div>
|
589
|
+
|
590
|
+
<div class="method_details ">
|
591
|
+
<h3 class="signature " id="siteid_to_name-instance_method">
|
592
|
+
|
593
|
+
- (<tt>String</tt>) <strong>siteid_to_name</strong>(siteid)
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
</h3><div class="docstring">
|
600
|
+
<div class="discussion">
|
601
|
+
|
602
|
+
<p>Get the name for a site ID.</p>
|
603
|
+
|
604
|
+
|
605
|
+
</div>
|
606
|
+
</div>
|
607
|
+
<div class="tags">
|
608
|
+
<p class="tag_title">Parameters:</p>
|
609
|
+
<ul class="param">
|
610
|
+
|
611
|
+
<li>
|
612
|
+
|
613
|
+
<span class='name'>siteid</span>
|
614
|
+
|
615
|
+
|
616
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
—
|
621
|
+
<div class='inline'>
|
622
|
+
<p>a site id to look up.</p>
|
623
|
+
</div>
|
624
|
+
|
625
|
+
</li>
|
626
|
+
|
627
|
+
</ul>
|
628
|
+
|
629
|
+
<p class="tag_title">Returns:</p>
|
630
|
+
<ul class="return">
|
631
|
+
|
632
|
+
<li>
|
633
|
+
|
634
|
+
|
635
|
+
<span class='type'>(<tt>String</tt>)</span>
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
—
|
640
|
+
<div class='inline'>
|
641
|
+
<p>the name of the site.</p>
|
642
|
+
</div>
|
643
|
+
|
644
|
+
</li>
|
645
|
+
|
646
|
+
</ul>
|
647
|
+
|
648
|
+
</div><table class="source_code">
|
649
|
+
<tr>
|
650
|
+
<td>
|
651
|
+
<pre class="lines">
|
652
|
+
|
653
|
+
|
654
|
+
55
|
655
|
+
56
|
656
|
+
57
|
657
|
+
58
|
658
|
+
59
|
659
|
+
60
|
660
|
+
61</pre>
|
661
|
+
</td>
|
662
|
+
<td>
|
663
|
+
<pre class="code"><span class="info file"># File 'lib\nexpose-functions.rb', line 55</span>
|
664
|
+
|
665
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_siteid_to_name'>siteid_to_name</span><span class='lparen'>(</span><span class='id identifier rubyid_siteid'>siteid</span><span class='rparen'>)</span>
|
666
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list_sites'>list_sites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_site'>site</span><span class='op'>|</span>
|
667
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_site'>site</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>==</span> <span class='id identifier rubyid_siteid'>siteid</span>
|
668
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_site'>site</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
669
|
+
<span class='kw'>end</span>
|
670
|
+
<span class='rbrace'>}</span>
|
671
|
+
<span class='kw'>end</span></pre>
|
672
|
+
</td>
|
673
|
+
</tr>
|
674
|
+
</table>
|
675
|
+
</div>
|
676
|
+
|
677
|
+
<div class="method_details ">
|
678
|
+
<h3 class="signature " id="sitename_to_id-instance_method">
|
679
|
+
|
680
|
+
- (<tt>Fixnum</tt>) <strong>sitename_to_id</strong>(sitename)
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
|
685
|
+
|
686
|
+
</h3><div class="docstring">
|
687
|
+
<div class="discussion">
|
688
|
+
|
689
|
+
<p>Get the ID for a site name.</p>
|
690
|
+
|
691
|
+
|
692
|
+
</div>
|
693
|
+
</div>
|
694
|
+
<div class="tags">
|
695
|
+
<p class="tag_title">Parameters:</p>
|
696
|
+
<ul class="param">
|
697
|
+
|
698
|
+
<li>
|
699
|
+
|
700
|
+
<span class='name'>sitename</span>
|
701
|
+
|
702
|
+
|
703
|
+
<span class='type'>(<tt>String</tt>)</span>
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
—
|
708
|
+
<div class='inline'>
|
709
|
+
<p>the site name to look up.</p>
|
710
|
+
</div>
|
711
|
+
|
712
|
+
</li>
|
713
|
+
|
714
|
+
</ul>
|
715
|
+
|
716
|
+
<p class="tag_title">Returns:</p>
|
717
|
+
<ul class="return">
|
718
|
+
|
719
|
+
<li>
|
720
|
+
|
721
|
+
|
722
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
—
|
727
|
+
<div class='inline'>
|
728
|
+
<p>the id for the site name.</p>
|
729
|
+
</div>
|
730
|
+
|
731
|
+
</li>
|
732
|
+
|
733
|
+
</ul>
|
734
|
+
|
735
|
+
</div><table class="source_code">
|
736
|
+
<tr>
|
737
|
+
<td>
|
738
|
+
<pre class="lines">
|
739
|
+
|
740
|
+
|
741
|
+
43
|
742
|
+
44
|
743
|
+
45
|
744
|
+
46
|
745
|
+
47
|
746
|
+
48
|
747
|
+
49</pre>
|
748
|
+
</td>
|
749
|
+
<td>
|
750
|
+
<pre class="code"><span class="info file"># File 'lib\nexpose-functions.rb', line 43</span>
|
751
|
+
|
752
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_sitename_to_id'>sitename_to_id</span><span class='lparen'>(</span><span class='id identifier rubyid_sitename'>sitename</span><span class='rparen'>)</span>
|
753
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list_sites'>list_sites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_site'>site</span><span class='op'>|</span>
|
754
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_site'>site</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_sitename'>sitename</span>
|
755
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_site'>site</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
|
756
|
+
<span class='kw'>end</span>
|
757
|
+
<span class='rbrace'>}</span>
|
758
|
+
<span class='kw'>end</span></pre>
|
759
|
+
</td>
|
760
|
+
</tr>
|
761
|
+
</table>
|
762
|
+
</div>
|
763
|
+
|
764
|
+
<div class="method_details ">
|
765
|
+
<h3 class="signature " id="validate_engineid-instance_method">
|
766
|
+
|
767
|
+
- (<tt>Boolean</tt>) <strong>validate_engineid</strong>(engID)
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
</h3><div class="docstring">
|
774
|
+
<div class="discussion">
|
775
|
+
|
776
|
+
<p>Check if an input is a valid engine id.</p>
|
777
|
+
|
778
|
+
|
779
|
+
</div>
|
780
|
+
</div>
|
781
|
+
<div class="tags">
|
782
|
+
<p class="tag_title">Parameters:</p>
|
783
|
+
<ul class="param">
|
784
|
+
|
785
|
+
<li>
|
786
|
+
|
787
|
+
<span class='name'>engID</span>
|
788
|
+
|
789
|
+
|
790
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
—
|
795
|
+
<div class='inline'>
|
796
|
+
<p>an id to check against the list of valid engine ids.</p>
|
797
|
+
</div>
|
798
|
+
|
799
|
+
</li>
|
800
|
+
|
801
|
+
</ul>
|
802
|
+
|
803
|
+
<p class="tag_title">Returns:</p>
|
804
|
+
<ul class="return">
|
805
|
+
|
806
|
+
<li>
|
807
|
+
|
808
|
+
|
809
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
—
|
814
|
+
<div class='inline'>
|
815
|
+
<p>true if engID is valid.</p>
|
816
|
+
</div>
|
817
|
+
|
818
|
+
</li>
|
819
|
+
|
820
|
+
</ul>
|
821
|
+
|
822
|
+
</div><table class="source_code">
|
823
|
+
<tr>
|
824
|
+
<td>
|
825
|
+
<pre class="lines">
|
826
|
+
|
827
|
+
|
828
|
+
29
|
829
|
+
30
|
830
|
+
31
|
831
|
+
32
|
832
|
+
33
|
833
|
+
34
|
834
|
+
35
|
835
|
+
36
|
836
|
+
37</pre>
|
837
|
+
</td>
|
838
|
+
<td>
|
839
|
+
<pre class="code"><span class="info file"># File 'lib\nexpose-functions.rb', line 29</span>
|
840
|
+
|
841
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_engineid'>validate_engineid</span><span class='lparen'>(</span><span class='id identifier rubyid_engID'>engID</span><span class='rparen'>)</span>
|
842
|
+
<span class='comment'># Create array of engine ids for validation
|
843
|
+
</span> <span class='id identifier rubyid_engine_ids'>engine_ids</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
844
|
+
<span class='kw'>for</span> <span class='id identifier rubyid_eng'>eng</span> <span class='kw'>in</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list_engines'>list_engines</span> <span class='kw'>do</span>
|
845
|
+
<span class='id identifier rubyid_engine_ids'>engine_ids</span> <span class='op'><<</span> <span class='id identifier rubyid_eng'>eng</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
|
846
|
+
<span class='kw'>end</span>
|
847
|
+
|
848
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_engine_ids'>engine_ids</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_engID'>engID</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span>
|
849
|
+
<span class='kw'>end</span></pre>
|
850
|
+
</td>
|
851
|
+
</tr>
|
852
|
+
</table>
|
853
|
+
</div>
|
854
|
+
|
855
|
+
</div>
|
856
|
+
|
857
|
+
</div>
|
858
|
+
|
859
|
+
<div id="footer">
|
860
|
+
Generated on Tue Nov 18 10:25:54 2014 by
|
861
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
862
|
+
0.8.7.6 (ruby-1.9.3).
|
863
|
+
</div>
|
864
|
+
|
865
|
+
</body>
|
866
|
+
</html>
|