zabby 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/Gemfile +4 -0
- data/LICENSE +49 -0
- data/README.rdoc +137 -0
- data/Rakefile +8 -0
- data/bin/zabbyrb +86 -0
- data/bin/zabbysh +68 -0
- data/doc/Zabby.html +208 -0
- data/doc/Zabby/AuthenticationError.html +116 -0
- data/doc/Zabby/Config.html +414 -0
- data/doc/Zabby/ConfigurationError.html +116 -0
- data/doc/Zabby/Connection.html +1617 -0
- data/doc/Zabby/ResponseCodeError.html +116 -0
- data/doc/Zabby/Runner.html +1116 -0
- data/doc/_index.html +175 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.LICENSE.html +132 -0
- data/doc/file.README.html +234 -0
- data/doc/file_list.html +52 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +234 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +167 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +358 -0
- data/doc/top-level-namespace.html +103 -0
- data/lib/zabby.rb +25 -0
- data/lib/zabby/config.rb +38 -0
- data/lib/zabby/connection.rb +131 -0
- data/lib/zabby/exceptions.rb +10 -0
- data/lib/zabby/runner.rb +152 -0
- data/lib/zabby/version.rb +8 -0
- data/lib/zabby/zobject.rb +27 -0
- data/spec/spec_helper.rb +5 -0
- data/zabby.gemspec +31 -0
- metadata +170 -0
@@ -0,0 +1,116 @@
|
|
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
|
+
— 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> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Zabby.html" title="Zabby (module)">Zabby</a></span></span>
|
38
|
+
»
|
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 Mon Dec 19 13:31:46 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>
|
@@ -0,0 +1,1116 @@
|
|
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
|
+
— 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> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Zabby.html" title="Zabby (module)">Zabby</a></span></span>
|
38
|
+
»
|
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
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
90
|
+
<dd class="r2 last">lib/zabby/runner.rb</dd>
|
91
|
+
|
92
|
+
</dl>
|
93
|
+
<div class="clear"></div>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
98
|
+
<ul class="summary">
|
99
|
+
|
100
|
+
<li class="public ">
|
101
|
+
<span class="summary_signature">
|
102
|
+
|
103
|
+
<a href="#config-instance_method" title="#config (instance method)">- (Object) <strong>config</strong> </a>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
</span>
|
108
|
+
|
109
|
+
|
110
|
+
<span class="note title readonly">readonly</span>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<span class="summary_desc"><div class='inline'><p>
|
120
|
+
Returns the value of attribute config.
|
121
|
+
</p>
|
122
|
+
</div></span>
|
123
|
+
|
124
|
+
</li>
|
125
|
+
|
126
|
+
|
127
|
+
<li class="public ">
|
128
|
+
<span class="summary_signature">
|
129
|
+
|
130
|
+
<a href="#connection-instance_method" title="#connection (instance method)">- (Object) <strong>connection</strong> </a>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</span>
|
135
|
+
|
136
|
+
|
137
|
+
<span class="note title readonly">readonly</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'><p>
|
147
|
+
Returns the value of attribute connection.
|
148
|
+
</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
</ul>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<h2>
|
161
|
+
Instance Method Summary
|
162
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
163
|
+
</h2>
|
164
|
+
|
165
|
+
<ul class="summary">
|
166
|
+
|
167
|
+
<li class="public ">
|
168
|
+
<span class="summary_signature">
|
169
|
+
|
170
|
+
<a href="#get-instance_method" title="#get (instance method)">- (Object) <strong>get</strong>(args) </a>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
184
|
+
|
185
|
+
</li>
|
186
|
+
|
187
|
+
|
188
|
+
<li class="public ">
|
189
|
+
<span class="summary_signature">
|
190
|
+
|
191
|
+
<a href="#host-instance_method" title="#host (instance method)">- (Object) <strong>host</strong>(args) </a>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
</span>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
205
|
+
|
206
|
+
</li>
|
207
|
+
|
208
|
+
|
209
|
+
<li class="public ">
|
210
|
+
<span class="summary_signature">
|
211
|
+
|
212
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Runner) <strong>initialize</strong>(&block) </a>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
</span>
|
217
|
+
|
218
|
+
<span class="note title constructor">constructor</span>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
<span class="summary_desc"><div class='inline'><p>
|
228
|
+
A new instance of Runner.
|
229
|
+
</p>
|
230
|
+
</div></span>
|
231
|
+
|
232
|
+
</li>
|
233
|
+
|
234
|
+
|
235
|
+
<li class="public ">
|
236
|
+
<span class="summary_signature">
|
237
|
+
|
238
|
+
<a href="#logged_in%3F-instance_method" title="#logged_in? (instance method)">- (Boolean) <strong>logged_in?</strong> </a>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
</span>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
|
256
|
+
<li class="public ">
|
257
|
+
<span class="summary_signature">
|
258
|
+
|
259
|
+
<a href="#login-instance_method" title="#login (instance method)">- (Object) <strong>login</strong> </a>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
</span>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
273
|
+
|
274
|
+
</li>
|
275
|
+
|
276
|
+
|
277
|
+
<li class="public ">
|
278
|
+
<span class="summary_signature">
|
279
|
+
|
280
|
+
<a href="#logout-instance_method" title="#logout (instance method)">- (Object) <strong>logout</strong> </a>
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
</span>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
294
|
+
|
295
|
+
</li>
|
296
|
+
|
297
|
+
|
298
|
+
<li class="public ">
|
299
|
+
<span class="summary_signature">
|
300
|
+
|
301
|
+
<a href="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</strong>(command_file = nil, &block) </a>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
</span>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
315
|
+
|
316
|
+
</li>
|
317
|
+
|
318
|
+
|
319
|
+
<li class="public ">
|
320
|
+
<span class="summary_signature">
|
321
|
+
|
322
|
+
<a href="#set-instance_method" title="#set (instance method)">- (Object) <strong>set</strong>(key_value = nil) </a>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
</span>
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
336
|
+
|
337
|
+
</li>
|
338
|
+
|
339
|
+
|
340
|
+
<li class="public ">
|
341
|
+
<span class="summary_signature">
|
342
|
+
|
343
|
+
<a href="#setup-instance_method" title="#setup (instance method)">- (Object) <strong>setup</strong>(&block) </a>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
</span>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
357
|
+
|
358
|
+
</li>
|
359
|
+
|
360
|
+
|
361
|
+
<li class="public ">
|
362
|
+
<span class="summary_signature">
|
363
|
+
|
364
|
+
<a href="#shell-instance_method" title="#shell (instance method)">- (Object) <strong>shell</strong> </a>
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
</span>
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
<span class="summary_desc"><div class='inline'><p>
|
378
|
+
Execute an irb like shell in which we can type Zabby commands.
|
379
|
+
</p>
|
380
|
+
</div></span>
|
381
|
+
|
382
|
+
</li>
|
383
|
+
|
384
|
+
|
385
|
+
<li class="public ">
|
386
|
+
<span class="summary_signature">
|
387
|
+
|
388
|
+
<a href="#version-instance_method" title="#version (instance method)">- (Object) <strong>version</strong> </a>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
</span>
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
402
|
+
|
403
|
+
</li>
|
404
|
+
|
405
|
+
|
406
|
+
</ul>
|
407
|
+
|
408
|
+
|
409
|
+
<div id="constructor_details" class="method_details_list">
|
410
|
+
<h2>Constructor Details</h2>
|
411
|
+
|
412
|
+
<div class="method_details first">
|
413
|
+
<p class="signature first" id="initialize-instance_method">
|
414
|
+
|
415
|
+
- (<tt><span class='object_link'><a href="" title="Zabby::Runner (class)">Runner</a></span></tt>) <strong>initialize</strong>(&block)
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
</p><div class="docstring">
|
420
|
+
<div class="discussion">
|
421
|
+
<p>
|
422
|
+
A new instance of Runner
|
423
|
+
</p>
|
424
|
+
|
425
|
+
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
<div class="tags">
|
429
|
+
|
430
|
+
|
431
|
+
</div><table class="source_code">
|
432
|
+
<tr>
|
433
|
+
<td>
|
434
|
+
<pre class="lines">
|
435
|
+
|
436
|
+
|
437
|
+
37
|
438
|
+
38
|
439
|
+
39
|
440
|
+
40
|
441
|
+
41
|
442
|
+
42
|
443
|
+
43
|
444
|
+
44
|
445
|
+
45
|
446
|
+
46
|
447
|
+
47
|
448
|
+
48
|
449
|
+
49
|
450
|
+
50
|
451
|
+
51
|
452
|
+
52</pre>
|
453
|
+
</td>
|
454
|
+
<td>
|
455
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 37</span>
|
456
|
+
|
457
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span>
|
458
|
+
<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'>&</span><span class='rubyid_block identifier id'>block</span>
|
459
|
+
<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>
|
460
|
+
<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'>"binding"</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'>""</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
|
+
15
|
513
|
+
16
|
514
|
+
17</pre>
|
515
|
+
</td>
|
516
|
+
<td>
|
517
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 15</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
|
+
15
|
557
|
+
16
|
558
|
+
17</pre>
|
559
|
+
</td>
|
560
|
+
<td>
|
561
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 15</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="instance_method_details" class="method_details_list">
|
576
|
+
<h2>Instance Method Details</h2>
|
577
|
+
|
578
|
+
|
579
|
+
<div class="method_details first">
|
580
|
+
<p class="signature first" id="get-instance_method">
|
581
|
+
|
582
|
+
- (<tt>Object</tt>) <strong>get</strong>(args)
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
</p><div class="docstring">
|
587
|
+
<div class="discussion">
|
588
|
+
|
589
|
+
|
590
|
+
</div>
|
591
|
+
</div>
|
592
|
+
<div class="tags">
|
593
|
+
<h3>Parameters:</h3>
|
594
|
+
<ul class="param">
|
595
|
+
|
596
|
+
<li>
|
597
|
+
|
598
|
+
<span class='name'>args</span>
|
599
|
+
|
600
|
+
|
601
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
—
|
606
|
+
<div class='inline'><p>
|
607
|
+
Argument list for the Zabbix API.
|
608
|
+
</p>
|
609
|
+
</div>
|
610
|
+
|
611
|
+
</li>
|
612
|
+
|
613
|
+
</ul>
|
614
|
+
|
615
|
+
<h3>Raises:</h3>
|
616
|
+
<ul class="raise">
|
617
|
+
|
618
|
+
<li>
|
619
|
+
|
620
|
+
|
621
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
</li>
|
626
|
+
|
627
|
+
</ul>
|
628
|
+
|
629
|
+
</div><table class="source_code">
|
630
|
+
<tr>
|
631
|
+
<td>
|
632
|
+
<pre class="lines">
|
633
|
+
|
634
|
+
|
635
|
+
87
|
636
|
+
88
|
637
|
+
89
|
638
|
+
90</pre>
|
639
|
+
</td>
|
640
|
+
<td>
|
641
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 87</span>
|
642
|
+
|
643
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_get identifier id'>get</span><span class='lparen token'>(</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
644
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_ArgumentError constant id'>ArgumentError</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"Expected a hash"</span><span class='rparen token'>)</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_kind_of? fid id'>kind_of?</span> <span class='rubyid_Hash constant id'>Hash</span>
|
645
|
+
<span class='lbrace token'>{</span> <span class='symbol val'>:get</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_args identifier id'>args</span> <span class='rbrace token'>}</span>
|
646
|
+
<span class='rubyid_end end kw'>end</span>
|
647
|
+
</pre>
|
648
|
+
</td>
|
649
|
+
</tr>
|
650
|
+
</table>
|
651
|
+
</div>
|
652
|
+
|
653
|
+
<div class="method_details ">
|
654
|
+
<p class="signature " id="host-instance_method">
|
655
|
+
|
656
|
+
- (<tt>Object</tt>) <strong>host</strong>(args)
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
</p><div class="docstring">
|
661
|
+
<div class="discussion">
|
662
|
+
|
663
|
+
|
664
|
+
</div>
|
665
|
+
</div>
|
666
|
+
<div class="tags">
|
667
|
+
<h3>Parameters:</h3>
|
668
|
+
<ul class="param">
|
669
|
+
|
670
|
+
<li>
|
671
|
+
|
672
|
+
<span class='name'>args</span>
|
673
|
+
|
674
|
+
|
675
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
—
|
680
|
+
<div class='inline'><p>
|
681
|
+
Function name and parameters for the Zabbix "host" type.
|
682
|
+
</p>
|
683
|
+
</div>
|
684
|
+
|
685
|
+
</li>
|
686
|
+
|
687
|
+
</ul>
|
688
|
+
|
689
|
+
<h3>Raises:</h3>
|
690
|
+
<ul class="raise">
|
691
|
+
|
692
|
+
<li>
|
693
|
+
|
694
|
+
|
695
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
</li>
|
700
|
+
|
701
|
+
</ul>
|
702
|
+
|
703
|
+
</div><table class="source_code">
|
704
|
+
<tr>
|
705
|
+
<td>
|
706
|
+
<pre class="lines">
|
707
|
+
|
708
|
+
|
709
|
+
93
|
710
|
+
94
|
711
|
+
95
|
712
|
+
96
|
713
|
+
97
|
714
|
+
98</pre>
|
715
|
+
</td>
|
716
|
+
<td>
|
717
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 93</span>
|
718
|
+
|
719
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_host identifier id'>host</span><span class='lparen token'>(</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
720
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_ArgumentError constant id'>ArgumentError</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"Expected a hash"</span><span class='rparen token'>)</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_kind_of? fid id'>kind_of?</span> <span class='rubyid_Hash constant id'>Hash</span>
|
721
|
+
<span class='rubyid_meth identifier id'>meth</span> <span class='assign token'>=</span> <span class='rubyid_args identifier id'>args</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>
|
722
|
+
<span class='rubyid_params identifier id'>params</span> <span class='assign token'>=</span> <span class='rubyid_args identifier id'>args</span><span class='lbrack token'>[</span><span class='rubyid_meth identifier id'>meth</span><span class='rbrack token'>]</span>
|
723
|
+
<span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>"Calling method 'host.#{meth}' with arguments #{params.to_json}"</span>
|
724
|
+
<span class='rubyid_end end kw'>end</span>
|
725
|
+
</pre>
|
726
|
+
</td>
|
727
|
+
</tr>
|
728
|
+
</table>
|
729
|
+
</div>
|
730
|
+
|
731
|
+
<div class="method_details ">
|
732
|
+
<p class="signature " id="logged_in?-instance_method">
|
733
|
+
|
734
|
+
- (<tt>Boolean</tt>) <strong>logged_in?</strong>
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
</p><div class="docstring">
|
739
|
+
<div class="discussion">
|
740
|
+
|
741
|
+
|
742
|
+
</div>
|
743
|
+
</div>
|
744
|
+
<div class="tags">
|
745
|
+
|
746
|
+
<h3>Returns:</h3>
|
747
|
+
<ul class="return">
|
748
|
+
|
749
|
+
<li>
|
750
|
+
|
751
|
+
|
752
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
</li>
|
757
|
+
|
758
|
+
</ul>
|
759
|
+
|
760
|
+
</div><table class="source_code">
|
761
|
+
<tr>
|
762
|
+
<td>
|
763
|
+
<pre class="lines">
|
764
|
+
|
765
|
+
|
766
|
+
78
|
767
|
+
79
|
768
|
+
80</pre>
|
769
|
+
</td>
|
770
|
+
<td>
|
771
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 78</span>
|
772
|
+
|
773
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_logged_in? fid id'>logged_in?</span>
|
774
|
+
<span class='rubyid_@connection ivar id'>@connection</span><span class='dot token'>.</span><span class='rubyid_logged_in? fid id'>logged_in?</span>
|
775
|
+
<span class='rubyid_end end kw'>end</span>
|
776
|
+
</pre>
|
777
|
+
</td>
|
778
|
+
</tr>
|
779
|
+
</table>
|
780
|
+
</div>
|
781
|
+
|
782
|
+
<div class="method_details ">
|
783
|
+
<p class="signature " id="login-instance_method">
|
784
|
+
|
785
|
+
- (<tt>Object</tt>) <strong>login</strong>
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
</p><table class="source_code">
|
790
|
+
<tr>
|
791
|
+
<td>
|
792
|
+
<pre class="lines">
|
793
|
+
|
794
|
+
|
795
|
+
70
|
796
|
+
71
|
797
|
+
72</pre>
|
798
|
+
</td>
|
799
|
+
<td>
|
800
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 70</span>
|
801
|
+
|
802
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_login identifier id'>login</span>
|
803
|
+
<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>
|
804
|
+
<span class='rubyid_end end kw'>end</span>
|
805
|
+
</pre>
|
806
|
+
</td>
|
807
|
+
</tr>
|
808
|
+
</table>
|
809
|
+
</div>
|
810
|
+
|
811
|
+
<div class="method_details ">
|
812
|
+
<p class="signature " id="logout-instance_method">
|
813
|
+
|
814
|
+
- (<tt>Object</tt>) <strong>logout</strong>
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
</p><table class="source_code">
|
819
|
+
<tr>
|
820
|
+
<td>
|
821
|
+
<pre class="lines">
|
822
|
+
|
823
|
+
|
824
|
+
74
|
825
|
+
75
|
826
|
+
76</pre>
|
827
|
+
</td>
|
828
|
+
<td>
|
829
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 74</span>
|
830
|
+
|
831
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_logout identifier id'>logout</span>
|
832
|
+
<span class='rubyid_@connection ivar id'>@connection</span><span class='dot token'>.</span><span class='rubyid_logout identifier id'>logout</span>
|
833
|
+
<span class='rubyid_end end kw'>end</span>
|
834
|
+
</pre>
|
835
|
+
</td>
|
836
|
+
</tr>
|
837
|
+
</table>
|
838
|
+
</div>
|
839
|
+
|
840
|
+
<div class="method_details ">
|
841
|
+
<p class="signature " id="run-instance_method">
|
842
|
+
|
843
|
+
- (<tt>Object</tt>) <strong>run</strong>(command_file = nil, &block)
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
</p><div class="docstring">
|
848
|
+
<div class="discussion">
|
849
|
+
|
850
|
+
|
851
|
+
</div>
|
852
|
+
</div>
|
853
|
+
<div class="tags">
|
854
|
+
<h3>Parameters:</h3>
|
855
|
+
<ul class="param">
|
856
|
+
|
857
|
+
<li>
|
858
|
+
|
859
|
+
<span class='name'>command_file</span>
|
860
|
+
|
861
|
+
|
862
|
+
<span class='type'>(<tt>String</tt>)</span>
|
863
|
+
|
864
|
+
|
865
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
866
|
+
|
867
|
+
|
868
|
+
—
|
869
|
+
<div class='inline'><p>
|
870
|
+
Filename containing commands to execute.
|
871
|
+
</p>
|
872
|
+
</div>
|
873
|
+
|
874
|
+
</li>
|
875
|
+
|
876
|
+
<li>
|
877
|
+
|
878
|
+
<span class='name'>block</span>
|
879
|
+
|
880
|
+
|
881
|
+
<span class='type'>(<tt>Proc</tt>)</span>
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
—
|
886
|
+
<div class='inline'><p>
|
887
|
+
A block containing commands to execute.
|
888
|
+
</p>
|
889
|
+
</div>
|
890
|
+
|
891
|
+
</li>
|
892
|
+
|
893
|
+
</ul>
|
894
|
+
|
895
|
+
|
896
|
+
</div><table class="source_code">
|
897
|
+
<tr>
|
898
|
+
<td>
|
899
|
+
<pre class="lines">
|
900
|
+
|
901
|
+
|
902
|
+
102
|
903
|
+
103
|
904
|
+
104
|
905
|
+
105
|
906
|
+
106
|
907
|
+
107
|
908
|
+
108</pre>
|
909
|
+
</td>
|
910
|
+
<td>
|
911
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 102</span>
|
912
|
+
|
913
|
+
<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'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
914
|
+
<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>
|
915
|
+
<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>
|
916
|
+
<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>
|
917
|
+
<span class='rubyid_end end kw'>end</span>
|
918
|
+
<span class='rubyid_instance_eval identifier id'>instance_eval</span><span class='lparen token'>(</span><span class='bitand op'>&</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>
|
919
|
+
<span class='rubyid_end end kw'>end</span>
|
920
|
+
</pre>
|
921
|
+
</td>
|
922
|
+
</tr>
|
923
|
+
</table>
|
924
|
+
</div>
|
925
|
+
|
926
|
+
<div class="method_details ">
|
927
|
+
<p class="signature " id="set-instance_method">
|
928
|
+
|
929
|
+
- (<tt>Object</tt>) <strong>set</strong>(key_value = nil)
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
</p><table class="source_code">
|
934
|
+
<tr>
|
935
|
+
<td>
|
936
|
+
<pre class="lines">
|
937
|
+
|
938
|
+
|
939
|
+
58
|
940
|
+
59
|
941
|
+
60
|
942
|
+
61
|
943
|
+
62
|
944
|
+
63
|
945
|
+
64
|
946
|
+
65
|
947
|
+
66
|
948
|
+
67
|
949
|
+
68</pre>
|
950
|
+
</td>
|
951
|
+
<td>
|
952
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 58</span>
|
953
|
+
|
954
|
+
<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>
|
955
|
+
<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>
|
956
|
+
<span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_list identifier id'>list</span>
|
957
|
+
<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>
|
958
|
+
<span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>"#{key_value} = #{@config.send(key_value)}"</span>
|
959
|
+
<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>
|
960
|
+
<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>
|
961
|
+
<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>
|
962
|
+
<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>
|
963
|
+
<span class='rubyid_end end kw'>end</span>
|
964
|
+
<span class='rubyid_end end kw'>end</span>
|
965
|
+
</pre>
|
966
|
+
</td>
|
967
|
+
</tr>
|
968
|
+
</table>
|
969
|
+
</div>
|
970
|
+
|
971
|
+
<div class="method_details ">
|
972
|
+
<p class="signature " id="setup-instance_method">
|
973
|
+
|
974
|
+
- (<tt>Object</tt>) <strong>setup</strong>(&block)
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
</p><table class="source_code">
|
979
|
+
<tr>
|
980
|
+
<td>
|
981
|
+
<pre class="lines">
|
982
|
+
|
983
|
+
|
984
|
+
54
|
985
|
+
55
|
986
|
+
56</pre>
|
987
|
+
</td>
|
988
|
+
<td>
|
989
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 54</span>
|
990
|
+
|
991
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_setup identifier id'>setup</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span>
|
992
|
+
<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'>&</span><span class='rubyid_block identifier id'>block</span>
|
993
|
+
<span class='rubyid_end end kw'>end</span>
|
994
|
+
</pre>
|
995
|
+
</td>
|
996
|
+
</tr>
|
997
|
+
</table>
|
998
|
+
</div>
|
999
|
+
|
1000
|
+
<div class="method_details ">
|
1001
|
+
<p class="signature " id="shell-instance_method">
|
1002
|
+
|
1003
|
+
- (<tt>Object</tt>) <strong>shell</strong>
|
1004
|
+
|
1005
|
+
|
1006
|
+
|
1007
|
+
</p><div class="docstring">
|
1008
|
+
<div class="discussion">
|
1009
|
+
<p>
|
1010
|
+
Execute an irb like shell in which we can type Zabby commands.
|
1011
|
+
</p>
|
1012
|
+
|
1013
|
+
|
1014
|
+
</div>
|
1015
|
+
</div>
|
1016
|
+
<div class="tags">
|
1017
|
+
|
1018
|
+
<h3>Raises:</h3>
|
1019
|
+
<ul class="raise">
|
1020
|
+
|
1021
|
+
<li>
|
1022
|
+
|
1023
|
+
|
1024
|
+
<span class='type'>(<tt>RuntimeError</tt>)</span>
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
</li>
|
1029
|
+
|
1030
|
+
</ul>
|
1031
|
+
|
1032
|
+
</div><table class="source_code">
|
1033
|
+
<tr>
|
1034
|
+
<td>
|
1035
|
+
<pre class="lines">
|
1036
|
+
|
1037
|
+
|
1038
|
+
111
|
1039
|
+
112
|
1040
|
+
113
|
1041
|
+
114
|
1042
|
+
115
|
1043
|
+
116
|
1044
|
+
117
|
1045
|
+
118
|
1046
|
+
119
|
1047
|
+
120
|
1048
|
+
121
|
1049
|
+
122
|
1050
|
+
123
|
1051
|
+
124</pre>
|
1052
|
+
</td>
|
1053
|
+
<td>
|
1054
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 111</span>
|
1055
|
+
|
1056
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_shell identifier id'>shell</span>
|
1057
|
+
<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'>"Shell cannot run because 'readline' is missing."</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>
|
1058
|
+
|
1059
|
+
<span class='rubyid_puts identifier id'>puts</span> <span class='string val'>"** This is an experimental Zabbix Shell. Multiline commands do not work for e.g. **"</span>
|
1060
|
+
<span class='rubyid_loop identifier id'>loop</span> <span class='rubyid_do do kw'>do</span>
|
1061
|
+
<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> '</span><span class='rparen token'>)</span>
|
1062
|
+
|
1063
|
+
<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>
|
1064
|
+
<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'>""</span>
|
1065
|
+
<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>
|
1066
|
+
|
1067
|
+
<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>
|
1068
|
+
<span class='rubyid_end end kw'>end</span>
|
1069
|
+
<span class='rubyid_end end kw'>end</span>
|
1070
|
+
</pre>
|
1071
|
+
</td>
|
1072
|
+
</tr>
|
1073
|
+
</table>
|
1074
|
+
</div>
|
1075
|
+
|
1076
|
+
<div class="method_details ">
|
1077
|
+
<p class="signature " id="version-instance_method">
|
1078
|
+
|
1079
|
+
- (<tt>Object</tt>) <strong>version</strong>
|
1080
|
+
|
1081
|
+
|
1082
|
+
|
1083
|
+
</p><table class="source_code">
|
1084
|
+
<tr>
|
1085
|
+
<td>
|
1086
|
+
<pre class="lines">
|
1087
|
+
|
1088
|
+
|
1089
|
+
82
|
1090
|
+
83
|
1091
|
+
84</pre>
|
1092
|
+
</td>
|
1093
|
+
<td>
|
1094
|
+
<pre class="code"><span class="info file"># File 'lib/zabby/runner.rb', line 82</span>
|
1095
|
+
|
1096
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_version identifier id'>version</span>
|
1097
|
+
<span class='rubyid_Zabby constant id'>Zabby</span><span class='colon2 op'>::</span><span class='rubyid_VERSION constant id'>VERSION</span>
|
1098
|
+
<span class='rubyid_end end kw'>end</span>
|
1099
|
+
</pre>
|
1100
|
+
</td>
|
1101
|
+
</tr>
|
1102
|
+
</table>
|
1103
|
+
</div>
|
1104
|
+
|
1105
|
+
</div>
|
1106
|
+
|
1107
|
+
</div>
|
1108
|
+
|
1109
|
+
<div id="footer">
|
1110
|
+
Generated on Mon Dec 19 13:31:47 2011 by
|
1111
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1112
|
+
0.7.4 (ruby-1.8.7).
|
1113
|
+
</div>
|
1114
|
+
|
1115
|
+
</body>
|
1116
|
+
</html>
|