action_command 0.1.0
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 +7 -0
- data/.codeclimate.yml +26 -0
- data/.gitignore +36 -0
- data/.rspec +2 -0
- data/.rubocop.yml +11 -0
- data/.travis.yml +21 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +112 -0
- data/Guardfile +75 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +18 -0
- data/action_command.gemspec +36 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/ActionCommand/Executable.html +625 -0
- data/doc/ActionCommand/InputOutput.html +876 -0
- data/doc/ActionCommand/Result.html +589 -0
- data/doc/ActionCommand.html +982 -0
- data/doc/_index.html +155 -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.README.html +137 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +137 -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 +219 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/action_command/version.rb +4 -0
- data/lib/action_command.rb +277 -0
- metadata +264 -0
@@ -0,0 +1,589 @@
|
|
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: ActionCommand::Result
|
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#!ActionCommand/Result.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 (R)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../ActionCommand.html" title="ActionCommand (module)">ActionCommand</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Result</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: ActionCommand::Result
|
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">ActionCommand::Result</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/action_command.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>The result of one or more commands being executed.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#%5B%5D-instance_method" title="#[] (instance method)">- (Object) <strong>[]</strong>(key) </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
146
|
+
<p>Return a value return by the command.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#%5B%5D%3D-instance_method" title="#[]= (instance method)">- (Object) <strong>[]=</strong>(key, val) </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'>
|
170
|
+
<p>Assign some kind of a return value for use by the caller.</p>
|
171
|
+
</div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#failed-instance_method" title="#failed (instance method)">- (Object) <strong>failed</strong>(msg) </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<span class="summary_desc"><div class='inline'>
|
194
|
+
<p>Call this if your command implementation fails.</p>
|
195
|
+
</div></span>
|
196
|
+
|
197
|
+
</li>
|
198
|
+
|
199
|
+
|
200
|
+
<li class="public ">
|
201
|
+
<span class="summary_signature">
|
202
|
+
|
203
|
+
<a href="#info-instance_method" title="#info (instance method)">- (Object) <strong>info</strong>(msg) </a>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="summary_desc"><div class='inline'>
|
218
|
+
<p>display an informational message to the logger, if there is one.</p>
|
219
|
+
</div></span>
|
220
|
+
|
221
|
+
</li>
|
222
|
+
|
223
|
+
|
224
|
+
<li class="public ">
|
225
|
+
<span class="summary_signature">
|
226
|
+
|
227
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Result) <strong>initialize</strong>(logger) </a>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</span>
|
232
|
+
|
233
|
+
|
234
|
+
<span class="note title constructor">constructor</span>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'>
|
244
|
+
<p>By default, a command is ok?.</p>
|
245
|
+
</div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
<li class="public ">
|
251
|
+
<span class="summary_signature">
|
252
|
+
|
253
|
+
<a href="#ok%3F-instance_method" title="#ok? (instance method)">- (Boolean) <strong>ok?</strong> </a>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</span>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<span class="summary_desc"><div class='inline'>
|
268
|
+
<p>True, up until failed has been called at least once.</p>
|
269
|
+
</div></span>
|
270
|
+
|
271
|
+
</li>
|
272
|
+
|
273
|
+
|
274
|
+
</ul>
|
275
|
+
|
276
|
+
|
277
|
+
<div id="constructor_details" class="method_details_list">
|
278
|
+
<h2>Constructor Details</h2>
|
279
|
+
|
280
|
+
<div class="method_details first">
|
281
|
+
<h3 class="signature first" id="initialize-instance_method">
|
282
|
+
|
283
|
+
- (<tt><span class='object_link'><a href="" title="ActionCommand::Result (class)">Result</a></span></tt>) <strong>initialize</strong>(logger)
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</h3><div class="docstring">
|
290
|
+
<div class="discussion">
|
291
|
+
|
292
|
+
<p>By default, a command is ok?</p>
|
293
|
+
|
294
|
+
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
<div class="tags">
|
298
|
+
|
299
|
+
|
300
|
+
</div><table class="source_code">
|
301
|
+
<tr>
|
302
|
+
<td>
|
303
|
+
<pre class="lines">
|
304
|
+
|
305
|
+
|
306
|
+
101
|
307
|
+
102
|
308
|
+
103
|
309
|
+
104
|
310
|
+
105</pre>
|
311
|
+
</td>
|
312
|
+
<td>
|
313
|
+
<pre class="code"><span class="info file"># File 'lib/action_command.rb', line 101</span>
|
314
|
+
|
315
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_logger'>logger</span><span class='rparen'>)</span>
|
316
|
+
<span class='ivar'>@ok</span> <span class='op'>=</span> <span class='kw'>true</span>
|
317
|
+
<span class='ivar'>@values</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
318
|
+
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='id identifier rubyid_logger'>logger</span>
|
319
|
+
<span class='kw'>end</span></pre>
|
320
|
+
</td>
|
321
|
+
</tr>
|
322
|
+
</table>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
</div>
|
326
|
+
|
327
|
+
|
328
|
+
<div id="instance_method_details" class="method_details_list">
|
329
|
+
<h2>Instance Method Details</h2>
|
330
|
+
|
331
|
+
|
332
|
+
<div class="method_details first">
|
333
|
+
<h3 class="signature first" id="[]-instance_method">
|
334
|
+
|
335
|
+
- (<tt>Object</tt>) <strong>[]</strong>(key)
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
</h3><div class="docstring">
|
342
|
+
<div class="discussion">
|
343
|
+
|
344
|
+
<p>Return a value return by the command</p>
|
345
|
+
|
346
|
+
|
347
|
+
</div>
|
348
|
+
</div>
|
349
|
+
<div class="tags">
|
350
|
+
|
351
|
+
|
352
|
+
</div><table class="source_code">
|
353
|
+
<tr>
|
354
|
+
<td>
|
355
|
+
<pre class="lines">
|
356
|
+
|
357
|
+
|
358
|
+
126
|
359
|
+
127
|
360
|
+
128</pre>
|
361
|
+
</td>
|
362
|
+
<td>
|
363
|
+
<pre class="code"><span class="info file"># File 'lib/action_command.rb', line 126</span>
|
364
|
+
|
365
|
+
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
366
|
+
<span class='kw'>return</span> <span class='ivar'>@values</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
|
367
|
+
<span class='kw'>end</span></pre>
|
368
|
+
</td>
|
369
|
+
</tr>
|
370
|
+
</table>
|
371
|
+
</div>
|
372
|
+
|
373
|
+
<div class="method_details ">
|
374
|
+
<h3 class="signature " id="[]=-instance_method">
|
375
|
+
|
376
|
+
- (<tt>Object</tt>) <strong>[]=</strong>(key, val)
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
</h3><div class="docstring">
|
383
|
+
<div class="discussion">
|
384
|
+
|
385
|
+
<p>Assign some kind of a return value for use by the caller.</p>
|
386
|
+
|
387
|
+
|
388
|
+
</div>
|
389
|
+
</div>
|
390
|
+
<div class="tags">
|
391
|
+
|
392
|
+
|
393
|
+
</div><table class="source_code">
|
394
|
+
<tr>
|
395
|
+
<td>
|
396
|
+
<pre class="lines">
|
397
|
+
|
398
|
+
|
399
|
+
121
|
400
|
+
122
|
401
|
+
123</pre>
|
402
|
+
</td>
|
403
|
+
<td>
|
404
|
+
<pre class="code"><span class="info file"># File 'lib/action_command.rb', line 121</span>
|
405
|
+
|
406
|
+
<span class='kw'>def</span> <span class='op'>[]=</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
|
407
|
+
<span class='ivar'>@values</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_val'>val</span>
|
408
|
+
<span class='kw'>end</span></pre>
|
409
|
+
</td>
|
410
|
+
</tr>
|
411
|
+
</table>
|
412
|
+
</div>
|
413
|
+
|
414
|
+
<div class="method_details ">
|
415
|
+
<h3 class="signature " id="failed-instance_method">
|
416
|
+
|
417
|
+
- (<tt>Object</tt>) <strong>failed</strong>(msg)
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
</h3><div class="docstring">
|
424
|
+
<div class="discussion">
|
425
|
+
|
426
|
+
<p>Call this if your command implementation fails. Sets ok? to false on the
|
427
|
+
result.</p>
|
428
|
+
|
429
|
+
|
430
|
+
</div>
|
431
|
+
</div>
|
432
|
+
<div class="tags">
|
433
|
+
<p class="tag_title">Parameters:</p>
|
434
|
+
<ul class="param">
|
435
|
+
|
436
|
+
<li>
|
437
|
+
|
438
|
+
<span class='name'>msg</span>
|
439
|
+
|
440
|
+
|
441
|
+
<span class='type'>(<tt>String</tt>)</span>
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
—
|
446
|
+
<div class='inline'>
|
447
|
+
<p>message describing the failure.</p>
|
448
|
+
</div>
|
449
|
+
|
450
|
+
</li>
|
451
|
+
|
452
|
+
</ul>
|
453
|
+
|
454
|
+
|
455
|
+
</div><table class="source_code">
|
456
|
+
<tr>
|
457
|
+
<td>
|
458
|
+
<pre class="lines">
|
459
|
+
|
460
|
+
|
461
|
+
110
|
462
|
+
111
|
463
|
+
112
|
464
|
+
113</pre>
|
465
|
+
</td>
|
466
|
+
<td>
|
467
|
+
<pre class="code"><span class="info file"># File 'lib/action_command.rb', line 110</span>
|
468
|
+
|
469
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failed'>failed</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
|
470
|
+
<span class='ivar'>@ok</span> <span class='op'>=</span> <span class='kw'>false</span>
|
471
|
+
<span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
|
472
|
+
<span class='kw'>end</span></pre>
|
473
|
+
</td>
|
474
|
+
</tr>
|
475
|
+
</table>
|
476
|
+
</div>
|
477
|
+
|
478
|
+
<div class="method_details ">
|
479
|
+
<h3 class="signature " id="info-instance_method">
|
480
|
+
|
481
|
+
- (<tt>Object</tt>) <strong>info</strong>(msg)
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
</h3><div class="docstring">
|
488
|
+
<div class="discussion">
|
489
|
+
|
490
|
+
<p>display an informational message to the logger, if there is one.</p>
|
491
|
+
|
492
|
+
|
493
|
+
</div>
|
494
|
+
</div>
|
495
|
+
<div class="tags">
|
496
|
+
|
497
|
+
|
498
|
+
</div><table class="source_code">
|
499
|
+
<tr>
|
500
|
+
<td>
|
501
|
+
<pre class="lines">
|
502
|
+
|
503
|
+
|
504
|
+
131
|
505
|
+
132
|
506
|
+
133</pre>
|
507
|
+
</td>
|
508
|
+
<td>
|
509
|
+
<pre class="code"><span class="info file"># File 'lib/action_command.rb', line 131</span>
|
510
|
+
|
511
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
|
512
|
+
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@logger</span>
|
513
|
+
<span class='kw'>end</span></pre>
|
514
|
+
</td>
|
515
|
+
</tr>
|
516
|
+
</table>
|
517
|
+
</div>
|
518
|
+
|
519
|
+
<div class="method_details ">
|
520
|
+
<h3 class="signature " id="ok?-instance_method">
|
521
|
+
|
522
|
+
- (<tt>Boolean</tt>) <strong>ok?</strong>
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
</h3><div class="docstring">
|
529
|
+
<div class="discussion">
|
530
|
+
|
531
|
+
<p>Returns true, up until failed has been called at least once.</p>
|
532
|
+
|
533
|
+
|
534
|
+
</div>
|
535
|
+
</div>
|
536
|
+
<div class="tags">
|
537
|
+
|
538
|
+
<p class="tag_title">Returns:</p>
|
539
|
+
<ul class="return">
|
540
|
+
|
541
|
+
<li>
|
542
|
+
|
543
|
+
|
544
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
—
|
549
|
+
<div class='inline'>
|
550
|
+
<p>true, up until failed has been called at least once.</p>
|
551
|
+
</div>
|
552
|
+
|
553
|
+
</li>
|
554
|
+
|
555
|
+
</ul>
|
556
|
+
|
557
|
+
</div><table class="source_code">
|
558
|
+
<tr>
|
559
|
+
<td>
|
560
|
+
<pre class="lines">
|
561
|
+
|
562
|
+
|
563
|
+
116
|
564
|
+
117
|
565
|
+
118</pre>
|
566
|
+
</td>
|
567
|
+
<td>
|
568
|
+
<pre class="code"><span class="info file"># File 'lib/action_command.rb', line 116</span>
|
569
|
+
|
570
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ok?'>ok?</span>
|
571
|
+
<span class='kw'>return</span> <span class='ivar'>@ok</span>
|
572
|
+
<span class='kw'>end</span></pre>
|
573
|
+
</td>
|
574
|
+
</tr>
|
575
|
+
</table>
|
576
|
+
</div>
|
577
|
+
|
578
|
+
</div>
|
579
|
+
|
580
|
+
</div>
|
581
|
+
|
582
|
+
<div id="footer">
|
583
|
+
Generated on Sat Feb 13 10:16:47 2016 by
|
584
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
585
|
+
0.8.7.6 (ruby-2.2.3).
|
586
|
+
</div>
|
587
|
+
|
588
|
+
</body>
|
589
|
+
</html>
|