ballast 1.9.3 → 2.0.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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +35 -0
  3. data/.travis-gemfile +4 -5
  4. data/.travis.yml +3 -2
  5. data/CHANGELOG.md +62 -6
  6. data/Gemfile +7 -8
  7. data/README.md +2 -2
  8. data/ballast.gemspec +9 -12
  9. data/doc/Ballast/AjaxResponse.html +1380 -0
  10. data/doc/Ballast/Concerns/AjaxHandling.html +662 -0
  11. data/doc/Ballast/Concerns/Common.html +81 -361
  12. data/doc/Ballast/Concerns/ErrorsHandling.html +18 -36
  13. data/doc/Ballast/Concerns/View.html +181 -157
  14. data/doc/Ballast/Concerns.html +6 -6
  15. data/doc/Ballast/Configuration.html +204 -31
  16. data/doc/Ballast/Emoji/Character.html +411 -0
  17. data/doc/Ballast/Emoji/Utils.html +794 -0
  18. data/doc/Ballast/Emoji.html +125 -0
  19. data/doc/Ballast/Errors/{BaseError.html → Base.html} +61 -34
  20. data/doc/Ballast/Errors/{PerformError.html → Failure.html} +21 -17
  21. data/doc/Ballast/Errors/InvalidDomain.html +11 -11
  22. data/doc/Ballast/Errors/{ValidationError.html → ValidationFailure.html} +24 -16
  23. data/doc/Ballast/Errors.html +5 -5
  24. data/doc/Ballast/Middlewares/DefaultHost.html +6 -6
  25. data/doc/Ballast/Middlewares.html +4 -4
  26. data/doc/Ballast/RequestDomainMatcher.html +28 -28
  27. data/doc/Ballast/Service/Response.html +1243 -0
  28. data/doc/Ballast/Service.html +1314 -0
  29. data/doc/Ballast/Version.html +7 -7
  30. data/doc/Ballast.html +15 -15
  31. data/doc/_index.html +59 -30
  32. data/doc/class_list.html +6 -2
  33. data/doc/css/style.css +1 -0
  34. data/doc/file.README.html +6 -6
  35. data/doc/file_list.html +5 -1
  36. data/doc/frames.html +1 -1
  37. data/doc/index.html +6 -6
  38. data/doc/js/full_list.js +4 -1
  39. data/doc/method_list.html +167 -79
  40. data/doc/top-level-namespace.html +41 -4
  41. data/lib/ballast/ajax_response.rb +76 -0
  42. data/lib/ballast/concerns/ajax_handling.rb +73 -0
  43. data/lib/ballast/concerns/common.rb +25 -47
  44. data/lib/ballast/concerns/errors_handling.rb +21 -30
  45. data/lib/ballast/concerns/view.rb +24 -22
  46. data/lib/ballast/configuration.rb +30 -10
  47. data/lib/ballast/emoji.rb +114 -0
  48. data/lib/ballast/errors.rb +16 -13
  49. data/lib/ballast/middlewares/default_host.rb +3 -3
  50. data/lib/ballast/request_domain_matcher.rb +7 -7
  51. data/lib/ballast/service.rb +147 -0
  52. data/lib/ballast/version.rb +3 -3
  53. data/lib/ballast.rb +22 -22
  54. data/spec/ballast/ajax_response_spec.rb +61 -0
  55. data/spec/ballast/concerns/ajax_handling_spec.rb +86 -0
  56. data/spec/ballast/concerns/common_spec.rb +17 -52
  57. data/spec/ballast/concerns/errors_handling_spec.rb +35 -29
  58. data/spec/ballast/concerns/view_spec.rb +21 -32
  59. data/spec/ballast/configuration_spec.rb +66 -16
  60. data/spec/ballast/emoji_spec.rb +103 -0
  61. data/spec/ballast/errors_spec.rb +5 -5
  62. data/spec/ballast/middlewares/default_host_spec.rb +3 -5
  63. data/spec/ballast/request_domain_matcher_spec.rb +4 -4
  64. data/spec/ballast/service_spec.rb +137 -0
  65. data/spec/spec_helper.rb +1 -13
  66. metadata +42 -80
  67. data/doc/Ballast/Concerns/Ajax.html +0 -945
  68. data/doc/Ballast/Context.html +0 -417
  69. data/doc/Ballast/Operation.html +0 -1304
  70. data/doc/Ballast/OperationsChain.html +0 -597
  71. data/lib/ballast/concerns/ajax.rb +0 -134
  72. data/lib/ballast/context.rb +0 -38
  73. data/lib/ballast/operation.rb +0 -136
  74. data/lib/ballast/operations_chain.rb +0 -45
  75. data/spec/ballast/concerns/ajax_spec.rb +0 -141
  76. data/spec/ballast/context_spec.rb +0 -23
  77. data/spec/ballast/operation_spec.rb +0 -177
  78. data/spec/ballast/operations_chain_spec.rb +0 -61
@@ -1,597 +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=utf-8" />
6
- <title>
7
- Class: Ballast::OperationsChain
8
-
9
- &mdash; Documentation by YARD 0.8.7.3
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#!" + escape(window.location.href);
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 (O)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../Ballast.html" title="Ballast (module)">Ballast</a></span></span>
36
- &raquo;
37
- <span class="title">OperationsChain</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: Ballast::OperationsChain
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"><span class='object_link'><a href="Operation.html" title="Ballast::Operation (class)">Operation</a></span></span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next"><span class='object_link'><a href="Operation.html" title="Ballast::Operation (class)">Operation</a></span></li>
82
-
83
- <li class="next">Ballast::OperationsChain</li>
84
-
85
- </ul>
86
- <a href="#" class="inheritanceTree">show all</a>
87
-
88
- </dd>
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dt class="r2">Includes:</dt>
96
- <dd class="r2">Interactor::Organizer</dd>
97
-
98
-
99
-
100
-
101
-
102
- <dt class="r1 last">Defined in:</dt>
103
- <dd class="r1 last">lib/ballast/operations_chain.rb</dd>
104
-
105
- </dl>
106
- <div class="clear"></div>
107
-
108
- <h2>Overview</h2><div class="docstring">
109
- <div class="discussion">
110
- <p>A operation made of several operation run sequentially passing the common context. The chain will stop on the first failure.</p>
111
-
112
-
113
- </div>
114
- </div>
115
- <div class="tags">
116
-
117
-
118
- </div>
119
-
120
-
121
-
122
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
123
- <ul class="summary">
124
-
125
- <li class="public ">
126
- <span class="summary_signature">
127
-
128
- <a href="#operations-instance_method" title="#operations (instance method)">- (Array) <strong>operations</strong> </a>
129
-
130
-
131
-
132
- </span>
133
-
134
-
135
-
136
-
137
- <span class="note title readonly">readonly</span>
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
- <span class="summary_desc"><div class='inline'><p>The list of operations performed.</p>
148
- </div></span>
149
-
150
- </li>
151
-
152
-
153
- </ul>
154
-
155
-
156
-
157
-
158
-
159
- <h2>
160
- Class Method Summary
161
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
162
- </h2>
163
-
164
- <ul class="summary">
165
-
166
- <li class="public ">
167
- <span class="summary_signature">
168
-
169
- <a href="#perform-class_method" title="perform (class method)">+ (Operation) <strong>perform</strong>(argument, operations, context: nil, params: {}) </a>
170
-
171
-
172
-
173
- </span>
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
- <span class="summary_desc"><div class='inline'><p>Performs the chain.</p>
184
- </div></span>
185
-
186
- </li>
187
-
188
-
189
- </ul>
190
-
191
- <h2>
192
- Instance Method Summary
193
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
194
- </h2>
195
-
196
- <ul class="summary">
197
-
198
- <li class="public ">
199
- <span class="summary_signature">
200
-
201
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (OperationsChain) <strong>initialize</strong>(operations, context) </a>
202
-
203
-
204
-
205
- </span>
206
-
207
-
208
- <span class="note title constructor">constructor</span>
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
- <span class="summary_desc"><div class='inline'><p>Creates a new chain.</p>
218
- </div></span>
219
-
220
- </li>
221
-
222
-
223
- </ul>
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Operation.html" title="Ballast::Operation (class)">Operation</a></span></h3>
237
- <p class="inherited"><span class='object_link'><a href="Operation.html#fail%21-instance_method" title="Ballast::Operation#fail! (method)">#fail!</a></span>, <span class='object_link'><a href="Operation.html#import_error-instance_method" title="Ballast::Operation#import_error (method)">#import_error</a></span>, <span class='object_link'><a href="Operation.html#import_response-instance_method" title="Ballast::Operation#import_response (method)">#import_response</a></span>, <span class='object_link'><a href="Operation.html#in_em_thread-instance_method" title="Ballast::Operation#in_em_thread (method)">#in_em_thread</a></span>, <span class='object_link'><a href="Operation.html#method_missing-instance_method" title="Ballast::Operation#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Operation.html#perform_with_handling-instance_method" title="Ballast::Operation#perform_with_handling (method)">#perform_with_handling</a></span>, <span class='object_link'><a href="Operation.html#resolve_error-instance_method" title="Ballast::Operation#resolve_error (method)">#resolve_error</a></span>, <span class='object_link'><a href="Operation.html#setup_response-instance_method" title="Ballast::Operation#setup_response (method)">#setup_response</a></span></p>
238
-
239
-
240
- <div id="constructor_details" class="method_details_list">
241
- <h2>Constructor Details</h2>
242
-
243
- <div class="method_details first">
244
- <h3 class="signature first" id="initialize-instance_method">
245
-
246
- - (<tt><span class='object_link'><a href="" title="Ballast::OperationsChain (class)">OperationsChain</a></span></tt>) <strong>initialize</strong>(operations, context)
247
-
248
-
249
-
250
-
251
-
252
- </h3><div class="docstring">
253
- <div class="discussion">
254
- <p>Creates a new chain.</p>
255
-
256
-
257
- </div>
258
- </div>
259
- <div class="tags">
260
- <p class="tag_title">Parameters:</p>
261
- <ul class="param">
262
-
263
- <li>
264
-
265
- <span class='name'>operations</span>
266
-
267
-
268
- <span class='type'>(<tt>Array</tt>)</span>
269
-
270
-
271
-
272
- &mdash;
273
- <div class='inline'><p>The list of operations to perform.</p>
274
- </div>
275
-
276
- </li>
277
-
278
- <li>
279
-
280
- <span class='name'>context</span>
281
-
282
-
283
- <span class='type'>(<tt><span class='object_link'><a href="Context.html" title="Ballast::Context (class)">Context</a></span></tt>)</span>
284
-
285
-
286
-
287
- &mdash;
288
- <div class='inline'><p>The context for the chain.</p>
289
- </div>
290
-
291
- </li>
292
-
293
- </ul>
294
-
295
-
296
- </div><table class="source_code">
297
- <tr>
298
- <td>
299
- <pre class="lines">
300
-
301
-
302
- 32
303
- 33
304
- 34
305
- 35</pre>
306
- </td>
307
- <td>
308
- <pre class="code"><span class="info file"># File 'lib/ballast/operations_chain.rb', line 32</span>
309
-
310
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_operations'>operations</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
311
- <span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_context'>context</span>
312
- <span class='ivar'>@operations</span> <span class='op'>=</span> <span class='id identifier rubyid_operations'>operations</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
313
- <span class='kw'>end</span></pre>
314
- </td>
315
- </tr>
316
- </table>
317
- </div>
318
-
319
- </div>
320
- <div id="method_missing_details" class="method_details_list">
321
- <h2>Dynamic Method Handling</h2>
322
- <p class="notice super">
323
- This class handles dynamic methods through the <tt>method_missing</tt> method
324
-
325
- in the class <span class='object_link'><a href="Operation.html#method_missing-instance_method" title="Ballast::Operation#method_missing (method)">Ballast::Operation</a></span>
326
-
327
- </p>
328
-
329
- </div>
330
-
331
- <div id="instance_attr_details" class="attr_details">
332
- <h2>Instance Attribute Details</h2>
333
-
334
-
335
- <span id=""></span>
336
- <div class="method_details first">
337
- <h3 class="signature first" id="operations-instance_method">
338
-
339
- - (<tt>Array</tt>) <strong>operations</strong> <span class="extras">(readonly)</span>
340
-
341
-
342
-
343
-
344
-
345
- </h3><div class="docstring">
346
- <div class="discussion">
347
- <p>Returns The list of operations performed.</p>
348
-
349
-
350
- </div>
351
- </div>
352
- <div class="tags">
353
-
354
- <p class="tag_title">Returns:</p>
355
- <ul class="return">
356
-
357
- <li>
358
-
359
-
360
- <span class='type'>(<tt>Array</tt>)</span>
361
-
362
-
363
-
364
- &mdash;
365
- <div class='inline'><p>The list of operations performed.</p>
366
- </div>
367
-
368
- </li>
369
-
370
- </ul>
371
-
372
- </div><table class="source_code">
373
- <tr>
374
- <td>
375
- <pre class="lines">
376
-
377
-
378
- 11
379
- 12
380
- 13
381
- 14
382
- 15
383
- 16
384
- 17
385
- 18
386
- 19
387
- 20
388
- 21
389
- 22
390
- 23
391
- 24
392
- 25
393
- 26
394
- 27
395
- 28
396
- 29
397
- 30
398
- 31
399
- 32
400
- 33
401
- 34
402
- 35
403
- 36
404
- 37
405
- 38
406
- 39
407
- 40
408
- 41
409
- 42
410
- 43
411
- 44</pre>
412
- </td>
413
- <td>
414
- <pre class="code"><span class="info file"># File 'lib/ballast/operations_chain.rb', line 11</span>
415
-
416
- <span class='kw'>class</span> <span class='const'>OperationsChain</span> <span class='op'>&lt;</span> <span class='const'>Operation</span>
417
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Interactor</span><span class='op'>::</span><span class='const'>Organizer</span>
418
- <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:operations</span>
419
-
420
- <span class='comment'># Performs the chain.
421
- </span> <span class='comment'>#
422
- </span> <span class='comment'># @param argument [Object|Context] If is a context, then it will be the context of the operation, unless a blank a context with the object
423
- </span> <span class='comment'># as owner will be created.
424
- </span> <span class='comment'># @param operations [Array] The list of operations to perform.
425
- </span> <span class='comment'># @param context [NilClass] The context for the operation. *Ignored if `owner_or_context` is a context.*
426
- </span> <span class='comment'># @param params [Hash] The additional parameters for the new context. *Ignored if `owner_or_context` is a context.*
427
- </span> <span class='comment'># @return [Operation] The performed chain.
428
- </span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='id identifier rubyid_argument'>argument</span><span class='comma'>,</span> <span class='id identifier rubyid_operations'>operations</span><span class='comma'>,</span> <span class='label'>context:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
429
- <span class='id identifier rubyid_argument'>argument</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span> <span class='op'>||</span> <span class='op'>::</span><span class='const'>Ballast</span><span class='op'>::</span><span class='const'>Context</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='id identifier rubyid_argument'>argument</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_argument'>argument</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Ballast</span><span class='op'>::</span><span class='const'>Context</span><span class='rparen'>)</span>
430
- <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_operations'>operations</span><span class='comma'>,</span> <span class='id identifier rubyid_argument'>argument</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:perform</span><span class='rparen'>)</span>
431
- <span class='kw'>end</span>
432
-
433
- <span class='comment'># Creates a new chain.
434
- </span> <span class='comment'>#
435
- </span> <span class='comment'># @param operations [Array] The list of operations to perform.
436
- </span> <span class='comment'># @param context [Context] The context for the chain.
437
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_operations'>operations</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
438
- <span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_context'>context</span>
439
- <span class='ivar'>@operations</span> <span class='op'>=</span> <span class='id identifier rubyid_operations'>operations</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
440
- <span class='kw'>end</span>
441
-
442
- <span class='id identifier rubyid_private'>private</span>
443
- <span class='comment'># Returns the operations to perform.
444
- </span> <span class='comment'>#
445
- </span> <span class='comment'># @return [Array] An array of operations to perform.
446
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_interactors'>interactors</span>
447
- <span class='ivar'>@operations</span>
448
- <span class='kw'>end</span>
449
- <span class='kw'>end</span></pre>
450
- </td>
451
- </tr>
452
- </table>
453
- </div>
454
-
455
- </div>
456
-
457
-
458
- <div id="class_method_details" class="method_details_list">
459
- <h2>Class Method Details</h2>
460
-
461
-
462
- <div class="method_details first">
463
- <h3 class="signature first" id="perform-class_method">
464
-
465
- + (<tt><span class='object_link'><a href="Operation.html" title="Ballast::Operation (class)">Operation</a></span></tt>) <strong>perform</strong>(argument, operations, context: nil, params: {})
466
-
467
-
468
-
469
-
470
-
471
- </h3><div class="docstring">
472
- <div class="discussion">
473
- <p>Performs the chain.</p>
474
-
475
-
476
- </div>
477
- </div>
478
- <div class="tags">
479
- <p class="tag_title">Parameters:</p>
480
- <ul class="param">
481
-
482
- <li>
483
-
484
- <span class='name'>argument</span>
485
-
486
-
487
- <span class='type'>(<tt>Object|<span class='object_link'><a href="Context.html" title="Ballast::Context (class)">Context</a></span></tt>)</span>
488
-
489
-
490
-
491
- &mdash;
492
- <div class='inline'><p>If is a context, then it will be the context of the operation, unless a blank a context with the object
493
- as owner will be created.</p>
494
- </div>
495
-
496
- </li>
497
-
498
- <li>
499
-
500
- <span class='name'>operations</span>
501
-
502
-
503
- <span class='type'>(<tt>Array</tt>)</span>
504
-
505
-
506
-
507
- &mdash;
508
- <div class='inline'><p>The list of operations to perform.</p>
509
- </div>
510
-
511
- </li>
512
-
513
- <li>
514
-
515
- <span class='name'>context</span>
516
-
517
-
518
- <span class='type'>(<tt>NilClass</tt>)</span>
519
-
520
-
521
-
522
- &mdash;
523
- <div class='inline'><p>The context for the operation. <em>Ignored if <code>owner_or_context</code> is a context.</em></p>
524
- </div>
525
-
526
- </li>
527
-
528
- <li>
529
-
530
- <span class='name'>params</span>
531
-
532
-
533
- <span class='type'>(<tt>Hash</tt>)</span>
534
-
535
-
536
-
537
- &mdash;
538
- <div class='inline'><p>The additional parameters for the new context. <em>Ignored if <code>owner_or_context</code> is a context.</em></p>
539
- </div>
540
-
541
- </li>
542
-
543
- </ul>
544
-
545
- <p class="tag_title">Returns:</p>
546
- <ul class="return">
547
-
548
- <li>
549
-
550
-
551
- <span class='type'>(<tt><span class='object_link'><a href="Operation.html" title="Ballast::Operation (class)">Operation</a></span></tt>)</span>
552
-
553
-
554
-
555
- &mdash;
556
- <div class='inline'><p>The performed chain.</p>
557
- </div>
558
-
559
- </li>
560
-
561
- </ul>
562
-
563
- </div><table class="source_code">
564
- <tr>
565
- <td>
566
- <pre class="lines">
567
-
568
-
569
- 23
570
- 24
571
- 25
572
- 26</pre>
573
- </td>
574
- <td>
575
- <pre class="code"><span class="info file"># File 'lib/ballast/operations_chain.rb', line 23</span>
576
-
577
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='id identifier rubyid_argument'>argument</span><span class='comma'>,</span> <span class='id identifier rubyid_operations'>operations</span><span class='comma'>,</span> <span class='label'>context:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
578
- <span class='id identifier rubyid_argument'>argument</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span> <span class='op'>||</span> <span class='op'>::</span><span class='const'>Ballast</span><span class='op'>::</span><span class='const'>Context</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='id identifier rubyid_argument'>argument</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_argument'>argument</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Ballast</span><span class='op'>::</span><span class='const'>Context</span><span class='rparen'>)</span>
579
- <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_operations'>operations</span><span class='comma'>,</span> <span class='id identifier rubyid_argument'>argument</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:perform</span><span class='rparen'>)</span>
580
- <span class='kw'>end</span></pre>
581
- </td>
582
- </tr>
583
- </table>
584
- </div>
585
-
586
- </div>
587
-
588
- </div>
589
-
590
- <div id="footer">
591
- Generated on Sat Mar 15 14:04:13 2014 by
592
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
593
- 0.8.7.3 (ruby-2.1.0).
594
- </div>
595
-
596
- </body>
597
- </html>