zabby 0.0.4 → 0.0.5

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.
@@ -1,116 +0,0 @@
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=fr_fr" />
6
- <title>
7
- Exception: Zabby::ResponseCodeError
8
-
9
- &mdash; Documentation by YARD 0.7.4
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
- relpath = '..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../_index.html">Index (R)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../Zabby.html" title="Zabby (module)">Zabby</a></span></span>
38
- &raquo;
39
- <span class="title">ResponseCodeError</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Exception: Zabby::ResponseCodeError
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName">StandardError</span>
70
-
71
- <ul class="fullTree">
72
- <li>Object</li>
73
-
74
- <li class="next">StandardError</li>
75
-
76
- <li class="next">Zabby::ResponseCodeError</li>
77
-
78
- </ul>
79
- <a href="#" class="inheritanceTree">show all</a>
80
-
81
- </dd>
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
- <dt class="r2 last">Defined in:</dt>
92
- <dd class="r2 last">lib/zabby/exceptions.rb</dd>
93
-
94
- </dl>
95
- <div class="clear"></div>
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- </div>
108
-
109
- <div id="footer">
110
- Generated on Wed Dec 21 12:25:12 2011 by
111
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
- 0.7.4 (ruby-1.8.7).
113
- </div>
114
-
115
- </body>
116
- </html>
@@ -1,1057 +0,0 @@
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=fr_fr" />
6
- <title>
7
- Class: Zabby::Runner
8
-
9
- &mdash; Documentation by YARD 0.7.4
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
- relpath = '..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../_index.html">Index (R)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../Zabby.html" title="Zabby (module)">Zabby</a></span></span>
38
- &raquo;
39
- <span class="title">Runner</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: Zabby::Runner
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName">Object</span>
70
-
71
- <ul class="fullTree">
72
- <li>Object</li>
73
-
74
- <li class="next">Zabby::Runner</li>
75
-
76
- </ul>
77
- <a href="#" class="inheritanceTree">show all</a>
78
-
79
- </dd>
80
-
81
-
82
-
83
-
84
-
85
-
86
- <dt class="r2">Includes:</dt>
87
- <dd class="r2">Singleton</dd>
88
-
89
-
90
-
91
-
92
-
93
- <dt class="r1 last">Defined in:</dt>
94
- <dd class="r1 last">lib/zabby/runner.rb</dd>
95
-
96
- </dl>
97
- <div class="clear"></div>
98
-
99
-
100
-
101
-
102
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
103
- <ul class="summary">
104
-
105
- <li class="public ">
106
- <span class="summary_signature">
107
-
108
- <a href="#config-instance_method" title="#config (instance method)">- (Object) <strong>config</strong> </a>
109
-
110
-
111
-
112
- </span>
113
-
114
-
115
- <span class="note title readonly">readonly</span>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
- <span class="summary_desc"><div class='inline'><p>
125
- Returns the value of attribute config.
126
- </p>
127
- </div></span>
128
-
129
- </li>
130
-
131
-
132
- <li class="public ">
133
- <span class="summary_signature">
134
-
135
- <a href="#connection-instance_method" title="#connection (instance method)">- (Object) <strong>connection</strong> </a>
136
-
137
-
138
-
139
- </span>
140
-
141
-
142
- <span class="note title readonly">readonly</span>
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
- <span class="summary_desc"><div class='inline'><p>
152
- Returns the value of attribute connection.
153
- </p>
154
- </div></span>
155
-
156
- </li>
157
-
158
-
159
- </ul>
160
-
161
-
162
-
163
-
164
-
165
-
166
- <h2>
167
- Class Method Summary
168
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
169
- </h2>
170
-
171
- <ul class="summary">
172
-
173
- <li class="public ">
174
- <span class="summary_signature">
175
-
176
- <a href="#create_zobject-class_method" title="create_zobject (class method)">+ (Object) <strong>create_zobject</strong>(name, zmethods) </a>
177
-
178
-
179
-
180
- </span>
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
- <span class="summary_desc"><div class='inline'><p>
190
- Create a method mapping a Zabbix object.
191
- </p>
192
- </div></span>
193
-
194
- </li>
195
-
196
-
197
- </ul>
198
-
199
- <h2>
200
- Instance Method Summary
201
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
202
- </h2>
203
-
204
- <ul class="summary">
205
-
206
- <li class="public ">
207
- <span class="summary_signature">
208
-
209
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Runner) <strong>initialize</strong>(&amp;block) </a>
210
-
211
-
212
-
213
- </span>
214
-
215
- <span class="note title constructor">constructor</span>
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
- <span class="summary_desc"><div class='inline'><p>
225
- A new instance of Runner.
226
- </p>
227
- </div></span>
228
-
229
- </li>
230
-
231
-
232
- <li class="public ">
233
- <span class="summary_signature">
234
-
235
- <a href="#logged_in%3F-instance_method" title="#logged_in? (instance method)">- (Boolean) <strong>logged_in?</strong> </a>
236
-
237
-
238
-
239
- </span>
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
- <span class="summary_desc"><div class='inline'></div></span>
249
-
250
- </li>
251
-
252
-
253
- <li class="public ">
254
- <span class="summary_signature">
255
-
256
- <a href="#login-instance_method" title="#login (instance method)">- (Object) <strong>login</strong> </a>
257
-
258
-
259
-
260
- </span>
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
- <span class="summary_desc"><div class='inline'></div></span>
270
-
271
- </li>
272
-
273
-
274
- <li class="public ">
275
- <span class="summary_signature">
276
-
277
- <a href="#logout-instance_method" title="#logout (instance method)">- (Object) <strong>logout</strong> </a>
278
-
279
-
280
-
281
- </span>
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
- <span class="summary_desc"><div class='inline'></div></span>
291
-
292
- </li>
293
-
294
-
295
- <li class="public ">
296
- <span class="summary_signature">
297
-
298
- <a href="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</strong>(command_file = nil, &amp;block) </a>
299
-
300
-
301
-
302
- </span>
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
- <span class="summary_desc"><div class='inline'></div></span>
312
-
313
- </li>
314
-
315
-
316
- <li class="public ">
317
- <span class="summary_signature">
318
-
319
- <a href="#set-instance_method" title="#set (instance method)">- (Object) <strong>set</strong>(key_value = nil) </a>
320
-
321
-
322
-
323
- </span>
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
- <span class="summary_desc"><div class='inline'></div></span>
333
-
334
- </li>
335
-
336
-
337
- <li class="public ">
338
- <span class="summary_signature">
339
-
340
- <a href="#setup-instance_method" title="#setup (instance method)">- (Object) <strong>setup</strong>(&amp;block) </a>
341
-
342
-
343
-
344
- </span>
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
- <span class="summary_desc"><div class='inline'></div></span>
354
-
355
- </li>
356
-
357
-
358
- <li class="public ">
359
- <span class="summary_signature">
360
-
361
- <a href="#shell-instance_method" title="#shell (instance method)">- (Object) <strong>shell</strong> </a>
362
-
363
-
364
-
365
- </span>
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
- <span class="summary_desc"><div class='inline'><p>
375
- Execute an irb like shell in which we can type Zabby commands.
376
- </p>
377
- </div></span>
378
-
379
- </li>
380
-
381
-
382
- <li class="public ">
383
- <span class="summary_signature">
384
-
385
- <a href="#version-instance_method" title="#version (instance method)">- (Object) <strong>version</strong> </a>
386
-
387
-
388
-
389
- </span>
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
-
398
- <span class="summary_desc"><div class='inline'></div></span>
399
-
400
- </li>
401
-
402
-
403
- </ul>
404
-
405
-
406
-
407
- <div id="constructor_details" class="method_details_list">
408
- <h2>Constructor Details</h2>
409
-
410
- <div class="method_details first">
411
- <p class="signature first" id="initialize-instance_method">
412
-
413
- - (<tt><span class='object_link'><a href="" title="Zabby::Runner (class)">Runner</a></span></tt>) <strong>initialize</strong>(&amp;block)
414
-
415
-
416
-
417
- </p><div class="docstring">
418
- <div class="discussion">
419
- <p>
420
- A new instance of Runner
421
- </p>
422
-
423
-
424
- </div>
425
- </div>
426
- <div class="tags">
427
-
428
-
429
- </div><table class="source_code">
430
- <tr>
431
- <td>
432
- <pre class="lines">
433
-
434
-
435
- 75
436
- 76
437
- 77
438
- 78
439
- 79
440
- 80
441
- 81
442
- 82
443
- 83
444
- 84
445
- 85
446
- 86
447
- 87
448
- 88
449
- 89
450
- 90
451
- 91</pre>
452
- </td>
453
- <td>
454
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 75</span>
455
-
456
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span>
457
- <span class='rubyid_@config ivar id'>@config</span> <span class='assign token'>=</span> <span class='rubyid_Zabby constant id'>Zabby</span><span class='colon2 op'>::</span><span class='rubyid_Config constant id'>Config</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span>
458
- <span class='rubyid_@connection ivar id'>@connection</span> <span class='assign token'>=</span> <span class='rubyid_Zabby constant id'>Zabby</span><span class='colon2 op'>::</span><span class='rubyid_Connection constant id'>Connection</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
459
- <span class='rubyid_@pure_binding ivar id'>@pure_binding</span> <span class='assign token'>=</span> <span class='rubyid_instance_eval identifier id'>instance_eval</span> <span class='string val'>&quot;binding&quot;</span>
460
- <span class='rubyid_@zobject ivar id'>@zobject</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span> <span class='comment val'># List of Zabbix Object</span>
461
-
462
- <span class='rubyid_if if kw'>if</span> <span class='rubyid_Object constant id'>Object</span><span class='dot token'>.</span><span class='rubyid_const_defined? fid id'>const_defined?</span><span class='lparen token'>(</span><span class='symbol val'>:Readline</span><span class='rparen token'>)</span>
463
- <span class='rubyid_@readline ivar id'>@readline</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span>
464
- <span class='rubyid_Readline constant id'>Readline</span><span class='dot token'>.</span><span class='rubyid_basic_word_break_characters identifier id'>basic_word_break_characters</span> <span class='assign token'>=</span> <span class='string val'>&quot;&quot;</span>
465
- <span class='rubyid_Readline constant id'>Readline</span><span class='dot token'>.</span><span class='rubyid_completion_append_character identifier id'>completion_append_character</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
466
- <span class='comment val'>#Readline.completion_proc = completion_proc</span>
467
-
468
- <span class='rubyid_$last_res gvar id'>$last_res</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
469
- <span class='rubyid_else else kw'>else</span>
470
- <span class='rubyid_@readline ivar id'>@readline</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span>
471
- <span class='rubyid_end end kw'>end</span>
472
- <span class='rubyid_end end kw'>end</span>
473
- </pre>
474
- </td>
475
- </tr>
476
- </table>
477
- </div>
478
-
479
- </div>
480
-
481
- <div id="instance_attr_details" class="attr_details">
482
- <h2>Instance Attribute Details</h2>
483
-
484
-
485
- <span id=""></span>
486
- <span id="config-instance_method"></span>
487
- <div class="method_details first">
488
- <p class="signature first" id="config-instance_method">
489
-
490
- - (<tt>Object</tt>) <strong>config</strong> <span class="extras">(readonly)</span>
491
-
492
-
493
-
494
- </p><div class="docstring">
495
- <div class="discussion">
496
- <p>
497
- Returns the value of attribute config
498
- </p>
499
-
500
-
501
- </div>
502
- </div>
503
- <div class="tags">
504
-
505
-
506
- </div><table class="source_code">
507
- <tr>
508
- <td>
509
- <pre class="lines">
510
-
511
-
512
- 18
513
- 19
514
- 20</pre>
515
- </td>
516
- <td>
517
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 18</span>
518
-
519
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_config identifier id'>config</span>
520
- <span class='rubyid_@config ivar id'>@config</span>
521
- <span class='rubyid_end end kw'>end</span>
522
- </pre>
523
- </td>
524
- </tr>
525
- </table>
526
- </div>
527
-
528
-
529
- <span id=""></span>
530
- <span id="connection-instance_method"></span>
531
- <div class="method_details ">
532
- <p class="signature " id="connection-instance_method">
533
-
534
- - (<tt>Object</tt>) <strong>connection</strong> <span class="extras">(readonly)</span>
535
-
536
-
537
-
538
- </p><div class="docstring">
539
- <div class="discussion">
540
- <p>
541
- Returns the value of attribute connection
542
- </p>
543
-
544
-
545
- </div>
546
- </div>
547
- <div class="tags">
548
-
549
-
550
- </div><table class="source_code">
551
- <tr>
552
- <td>
553
- <pre class="lines">
554
-
555
-
556
- 18
557
- 19
558
- 20</pre>
559
- </td>
560
- <td>
561
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 18</span>
562
-
563
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_connection identifier id'>connection</span>
564
- <span class='rubyid_@connection ivar id'>@connection</span>
565
- <span class='rubyid_end end kw'>end</span>
566
- </pre>
567
- </td>
568
- </tr>
569
- </table>
570
- </div>
571
-
572
- </div>
573
-
574
-
575
- <div id="class_method_details" class="method_details_list">
576
- <h2>Class Method Details</h2>
577
-
578
-
579
- <div class="method_details first">
580
- <p class="signature first" id="create_zobject-class_method">
581
-
582
- + (<tt>Object</tt>) <strong>create_zobject</strong>(name, zmethods)
583
-
584
-
585
-
586
- </p><div class="docstring">
587
- <div class="discussion">
588
- <p>
589
- Create a method mapping a Zabbix object.
590
- </p>
591
-
592
-
593
- </div>
594
- </div>
595
- <div class="tags">
596
- <h3>Parameters:</h3>
597
- <ul class="param">
598
-
599
- <li>
600
-
601
- <span class='name'>name</span>
602
-
603
-
604
- <span class='type'>(<tt>Symbol</tt>)</span>
605
-
606
-
607
-
608
- &mdash;
609
- <div class='inline'><p>
610
- Zabbix Object name (:item, :host, etc.)
611
- </p>
612
- </div>
613
-
614
- </li>
615
-
616
- <li>
617
-
618
- <span class='name'>zmethods</span>
619
-
620
-
621
- <span class='type'>(<tt>Array</tt>)</span>
622
-
623
-
624
-
625
- &mdash;
626
- <div class='inline'><p>
627
- The list of supported verbs
628
- </p>
629
- </div>
630
-
631
- </li>
632
-
633
- </ul>
634
-
635
-
636
- </div><table class="source_code">
637
- <tr>
638
- <td>
639
- <pre class="lines">
640
-
641
-
642
- 43
643
- 44
644
- 45
645
- 46
646
- 47</pre>
647
- </td>
648
- <td>
649
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 43</span>
650
-
651
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_create_zobject identifier id'>create_zobject</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='rubyid_zmethods identifier id'>zmethods</span><span class='rparen token'>)</span>
652
- <span class='rubyid_define_method identifier id'>define_method</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
653
- <span class='rubyid_@zobject ivar id'>@zobject</span><span class='lbrack token'>[</span><span class='rubyid_name identifier id'>name</span><span class='rbrack token'>]</span> <span class='opasgn op'>||=</span> <span class='rubyid_Zabby constant id'>Zabby</span><span class='colon2 op'>::</span><span class='rubyid_ZObject constant id'>ZObject</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='rubyid_zmethods identifier id'>zmethods</span><span class='rparen token'>)</span>
654
- <span class='rubyid_end end kw'>end</span>
655
- <span class='rubyid_end end kw'>end</span>
656
- </pre>
657
- </td>
658
- </tr>
659
- </table>
660
- </div>
661
-
662
- </div>
663
-
664
- <div id="instance_method_details" class="method_details_list">
665
- <h2>Instance Method Details</h2>
666
-
667
-
668
- <div class="method_details first">
669
- <p class="signature first" id="logged_in?-instance_method">
670
-
671
- - (<tt>Boolean</tt>) <strong>logged_in?</strong>
672
-
673
-
674
-
675
- </p><div class="docstring">
676
- <div class="discussion">
677
-
678
-
679
- </div>
680
- </div>
681
- <div class="tags">
682
-
683
- <h3>Returns:</h3>
684
- <ul class="return">
685
-
686
- <li>
687
-
688
-
689
- <span class='type'>(<tt>Boolean</tt>)</span>
690
-
691
-
692
-
693
- </li>
694
-
695
- </ul>
696
-
697
- </div><table class="source_code">
698
- <tr>
699
- <td>
700
- <pre class="lines">
701
-
702
-
703
- 117
704
- 118
705
- 119</pre>
706
- </td>
707
- <td>
708
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 117</span>
709
-
710
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_logged_in? fid id'>logged_in?</span>
711
- <span class='rubyid_@connection ivar id'>@connection</span><span class='dot token'>.</span><span class='rubyid_logged_in? fid id'>logged_in?</span>
712
- <span class='rubyid_end end kw'>end</span>
713
- </pre>
714
- </td>
715
- </tr>
716
- </table>
717
- </div>
718
-
719
- <div class="method_details ">
720
- <p class="signature " id="login-instance_method">
721
-
722
- - (<tt>Object</tt>) <strong>login</strong>
723
-
724
-
725
-
726
- </p><table class="source_code">
727
- <tr>
728
- <td>
729
- <pre class="lines">
730
-
731
-
732
- 109
733
- 110
734
- 111</pre>
735
- </td>
736
- <td>
737
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 109</span>
738
-
739
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_login identifier id'>login</span>
740
- <span class='rubyid_@connection ivar id'>@connection</span><span class='dot token'>.</span><span class='rubyid_login identifier id'>login</span><span class='lparen token'>(</span><span class='rubyid_@config ivar id'>@config</span><span class='rparen token'>)</span>
741
- <span class='rubyid_end end kw'>end</span>
742
- </pre>
743
- </td>
744
- </tr>
745
- </table>
746
- </div>
747
-
748
- <div class="method_details ">
749
- <p class="signature " id="logout-instance_method">
750
-
751
- - (<tt>Object</tt>) <strong>logout</strong>
752
-
753
-
754
-
755
- </p><table class="source_code">
756
- <tr>
757
- <td>
758
- <pre class="lines">
759
-
760
-
761
- 113
762
- 114
763
- 115</pre>
764
- </td>
765
- <td>
766
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 113</span>
767
-
768
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_logout identifier id'>logout</span>
769
- <span class='rubyid_@connection ivar id'>@connection</span><span class='dot token'>.</span><span class='rubyid_logout identifier id'>logout</span>
770
- <span class='rubyid_end end kw'>end</span>
771
- </pre>
772
- </td>
773
- </tr>
774
- </table>
775
- </div>
776
-
777
- <div class="method_details ">
778
- <p class="signature " id="run-instance_method">
779
-
780
- - (<tt>Object</tt>) <strong>run</strong>(command_file = nil, &amp;block)
781
-
782
-
783
-
784
- </p><div class="docstring">
785
- <div class="discussion">
786
-
787
-
788
- </div>
789
- </div>
790
- <div class="tags">
791
- <h3>Parameters:</h3>
792
- <ul class="param">
793
-
794
- <li>
795
-
796
- <span class='name'>command_file</span>
797
-
798
-
799
- <span class='type'>(<tt>String</tt>)</span>
800
-
801
-
802
- <em class="default">(defaults to: <tt>nil</tt>)</em>
803
-
804
-
805
- &mdash;
806
- <div class='inline'><p>
807
- Filename containing commands to execute.
808
- </p>
809
- </div>
810
-
811
- </li>
812
-
813
- <li>
814
-
815
- <span class='name'>block</span>
816
-
817
-
818
- <span class='type'>(<tt>Proc</tt>)</span>
819
-
820
-
821
-
822
- &mdash;
823
- <div class='inline'><p>
824
- A block containing commands to execute.
825
- </p>
826
- </div>
827
-
828
- </li>
829
-
830
- </ul>
831
-
832
-
833
- </div><table class="source_code">
834
- <tr>
835
- <td>
836
- <pre class="lines">
837
-
838
-
839
- 127
840
- 128
841
- 129
842
- 130
843
- 131
844
- 132
845
- 133</pre>
846
- </td>
847
- <td>
848
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 127</span>
849
-
850
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_run identifier id'>run</span><span class='lparen token'>(</span><span class='rubyid_command_file identifier id'>command_file</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
851
- <span class='rubyid_unless unless kw'>unless</span> <span class='rubyid_command_file identifier id'>command_file</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
852
- <span class='rubyid_commands identifier id'>commands</span> <span class='assign token'>=</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_read identifier id'>read</span><span class='lparen token'>(</span><span class='rubyid_command_file identifier id'>command_file</span><span class='rparen token'>)</span>
853
- <span class='rubyid_instance_eval identifier id'>instance_eval</span><span class='lparen token'>(</span><span class='rubyid_commands identifier id'>commands</span><span class='rparen token'>)</span>
854
- <span class='rubyid_end end kw'>end</span>
855
- <span class='rubyid_instance_eval identifier id'>instance_eval</span><span class='lparen token'>(</span><span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span>
856
- <span class='rubyid_end end kw'>end</span>
857
- </pre>
858
- </td>
859
- </tr>
860
- </table>
861
- </div>
862
-
863
- <div class="method_details ">
864
- <p class="signature " id="set-instance_method">
865
-
866
- - (<tt>Object</tt>) <strong>set</strong>(key_value = nil)
867
-
868
-
869
-
870
- </p><table class="source_code">
871
- <tr>
872
- <td>
873
- <pre class="lines">
874
-
875
-
876
- 97
877
- 98
878
- 99
879
- 100
880
- 101
881
- 102
882
- 103
883
- 104
884
- 105
885
- 106
886
- 107</pre>
887
- </td>
888
- <td>
889
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 97</span>
890
-
891
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_set identifier id'>set</span><span class='lparen token'>(</span><span class='rubyid_key_value identifier id'>key_value</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
892
- <span class='rubyid_if if kw'>if</span> <span class='rubyid_key_value identifier id'>key_value</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
893
- <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_list identifier id'>list</span>
894
- <span class='rubyid_elsif elsif kw'>elsif</span> <span class='lbrack token'>[</span> <span class='rubyid_String constant id'>String</span><span class='comma token'>,</span> <span class='rubyid_Symbol constant id'>Symbol</span> <span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_key_value identifier id'>key_value</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='rparen token'>)</span>
895
- <span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>&quot;#{key_value} = #{@config.send(key_value)}&quot;</span>
896
- <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_key_value identifier id'>key_value</span><span class='dot token'>.</span><span class='rubyid_instance_of? fid id'>instance_of?</span> <span class='rubyid_Hash constant id'>Hash</span>
897
- <span class='rubyid_key identifier id'>key</span> <span class='assign token'>=</span> <span class='rubyid_key_value identifier id'>key_value</span><span class='dot token'>.</span><span class='rubyid_keys identifier id'>keys</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span>
898
- <span class='rubyid_value identifier id'>value</span> <span class='assign token'>=</span> <span class='rubyid_key_value identifier id'>key_value</span><span class='lbrack token'>[</span><span class='rubyid_key identifier id'>key</span><span class='rbrack token'>]</span>
899
- <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='rubyid_key identifier id'>key</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
900
- <span class='rubyid_end end kw'>end</span>
901
- <span class='rubyid_end end kw'>end</span>
902
- </pre>
903
- </td>
904
- </tr>
905
- </table>
906
- </div>
907
-
908
- <div class="method_details ">
909
- <p class="signature " id="setup-instance_method">
910
-
911
- - (<tt>Object</tt>) <strong>setup</strong>(&amp;block)
912
-
913
-
914
-
915
- </p><table class="source_code">
916
- <tr>
917
- <td>
918
- <pre class="lines">
919
-
920
-
921
- 93
922
- 94
923
- 95</pre>
924
- </td>
925
- <td>
926
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 93</span>
927
-
928
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_setup identifier id'>setup</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span>
929
- <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_setup identifier id'>setup</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span>
930
- <span class='rubyid_end end kw'>end</span>
931
- </pre>
932
- </td>
933
- </tr>
934
- </table>
935
- </div>
936
-
937
- <div class="method_details ">
938
- <p class="signature " id="shell-instance_method">
939
-
940
- - (<tt>Object</tt>) <strong>shell</strong>
941
-
942
-
943
-
944
- </p><div class="docstring">
945
- <div class="discussion">
946
- <p>
947
- Execute an irb like shell in which we can type Zabby commands.
948
- </p>
949
-
950
-
951
- </div>
952
- </div>
953
- <div class="tags">
954
-
955
- <h3>Raises:</h3>
956
- <ul class="raise">
957
-
958
- <li>
959
-
960
-
961
- <span class='type'>(<tt>RuntimeError</tt>)</span>
962
-
963
-
964
-
965
- </li>
966
-
967
- </ul>
968
-
969
- </div><table class="source_code">
970
- <tr>
971
- <td>
972
- <pre class="lines">
973
-
974
-
975
- 136
976
- 137
977
- 138
978
- 139
979
- 140
980
- 141
981
- 142
982
- 143
983
- 144
984
- 145
985
- 146
986
- 147
987
- 148
988
- 149
989
- 150
990
- 151</pre>
991
- </td>
992
- <td>
993
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 136</span>
994
-
995
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_shell identifier id'>shell</span>
996
- <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_RuntimeError constant id'>RuntimeError</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>&quot;Shell cannot run because 'readline' is missing.&quot;</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_@readline ivar id'>@readline</span>
997
-
998
- <span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>&quot;Zabby Shell #{Zabby::VERSION}&quot;</span>
999
- <span class='rubyid_puts identifier id'>puts</span>
1000
- <span class='rubyid_puts identifier id'>puts</span> <span class='string val'>&quot;** This is a simple irb like Zabbix Shell. Multiline commands do not work for e.g. **&quot;</span>
1001
- <span class='rubyid_loop identifier id'>loop</span> <span class='rubyid_do do kw'>do</span>
1002
- <span class='rubyid_cmd identifier id'>cmd</span> <span class='assign token'>=</span> <span class='rubyid_Readline constant id'>Readline</span><span class='dot token'>.</span><span class='rubyid_readline identifier id'>readline</span><span class='lparen token'>(</span><span class='string val'>'zabby&gt; '</span><span class='rparen token'>)</span>
1003
-
1004
- <span class='rubyid_exit identifier id'>exit</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='rubyid_or or kw'>or</span> <span class='rubyid_cmd identifier id'>cmd</span> <span class='eq op'>==</span> <span class='string val'>'exit'</span>
1005
- <span class='rubyid_next next kw'>next</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_cmd identifier id'>cmd</span> <span class='eq op'>==</span> <span class='string val'>&quot;&quot;</span>
1006
- <span class='rubyid_Readline constant id'>Readline</span><span class='colon2 op'>::</span><span class='rubyid_HISTORY constant id'>HISTORY</span><span class='dot token'>.</span><span class='rubyid_push identifier id'>push</span><span class='lparen token'>(</span><span class='rubyid_cmd identifier id'>cmd</span><span class='rparen token'>)</span>
1007
-
1008
- <span class='rubyid_execute identifier id'>execute</span><span class='lparen token'>(</span><span class='rubyid_cmd identifier id'>cmd</span><span class='rparen token'>)</span>
1009
- <span class='rubyid_end end kw'>end</span>
1010
- <span class='rubyid_end end kw'>end</span>
1011
- </pre>
1012
- </td>
1013
- </tr>
1014
- </table>
1015
- </div>
1016
-
1017
- <div class="method_details ">
1018
- <p class="signature " id="version-instance_method">
1019
-
1020
- - (<tt>Object</tt>) <strong>version</strong>
1021
-
1022
-
1023
-
1024
- </p><table class="source_code">
1025
- <tr>
1026
- <td>
1027
- <pre class="lines">
1028
-
1029
-
1030
- 121
1031
- 122
1032
- 123</pre>
1033
- </td>
1034
- <td>
1035
- <pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 121</span>
1036
-
1037
- <span class='rubyid_def def kw'>def</span> <span class='rubyid_version identifier id'>version</span>
1038
- <span class='rubyid_Zabby constant id'>Zabby</span><span class='colon2 op'>::</span><span class='rubyid_VERSION constant id'>VERSION</span>
1039
- <span class='rubyid_end end kw'>end</span>
1040
- </pre>
1041
- </td>
1042
- </tr>
1043
- </table>
1044
- </div>
1045
-
1046
- </div>
1047
-
1048
- </div>
1049
-
1050
- <div id="footer">
1051
- Generated on Wed Dec 21 12:25:13 2011 by
1052
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1053
- 0.7.4 (ruby-1.8.7).
1054
- </div>
1055
-
1056
- </body>
1057
- </html>