simple-service 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rubocop.yml +100 -0
  4. data/.tm_properties +1 -0
  5. data/Gemfile +14 -0
  6. data/Makefile +9 -0
  7. data/README.md +68 -0
  8. data/Rakefile +6 -0
  9. data/VERSION +1 -0
  10. data/bin/bundle +105 -0
  11. data/bin/console +15 -0
  12. data/bin/rake +29 -0
  13. data/bin/rspec +29 -0
  14. data/doc/Simple.html +117 -0
  15. data/doc/Simple/Service.html +863 -0
  16. data/doc/Simple/Service/Action.html +1014 -0
  17. data/doc/Simple/Service/Action/Comment.html +451 -0
  18. data/doc/Simple/Service/Action/Comment/Extractor.html +347 -0
  19. data/doc/Simple/Service/Action/IndieHash.html +506 -0
  20. data/doc/Simple/Service/Action/MethodReflection.html +285 -0
  21. data/doc/Simple/Service/Action/Parameter.html +816 -0
  22. data/doc/Simple/Service/ArgumentError.html +128 -0
  23. data/doc/Simple/Service/ClassMethods.html +187 -0
  24. data/doc/Simple/Service/Context.html +379 -0
  25. data/doc/Simple/Service/ContextMissingError.html +124 -0
  26. data/doc/Simple/Service/ContextReadOnlyError.html +206 -0
  27. data/doc/Simple/Service/ExtraArguments.html +428 -0
  28. data/doc/Simple/Service/GemHelper.html +190 -0
  29. data/doc/Simple/Service/MissingArguments.html +426 -0
  30. data/doc/Simple/Service/NoSuchAction.html +433 -0
  31. data/doc/_index.html +286 -0
  32. data/doc/class_list.html +51 -0
  33. data/doc/css/common.css +1 -0
  34. data/doc/css/full_list.css +58 -0
  35. data/doc/css/style.css +496 -0
  36. data/doc/file.README.html +146 -0
  37. data/doc/file_list.html +56 -0
  38. data/doc/frames.html +17 -0
  39. data/doc/index.html +146 -0
  40. data/doc/js/app.js +303 -0
  41. data/doc/js/full_list.js +216 -0
  42. data/doc/js/jquery.js +4 -0
  43. data/doc/method_list.html +539 -0
  44. data/doc/top-level-namespace.html +110 -0
  45. data/lib/simple-service.rb +3 -0
  46. data/lib/simple/service.rb +143 -0
  47. data/lib/simple/service/action.rb +203 -0
  48. data/lib/simple/service/action/comment.rb +57 -0
  49. data/lib/simple/service/action/indie_hash.rb +37 -0
  50. data/lib/simple/service/action/method_reflection.rb +70 -0
  51. data/lib/simple/service/action/parameter.rb +42 -0
  52. data/lib/simple/service/context.rb +94 -0
  53. data/lib/simple/service/errors.rb +54 -0
  54. data/lib/simple/service/version.rb +29 -0
  55. data/log/.gitkeep +0 -0
  56. data/scripts/release +2 -0
  57. data/scripts/release.rb +91 -0
  58. data/scripts/stats +5 -0
  59. data/scripts/watch +2 -0
  60. data/simple-service.gemspec +25 -0
  61. data/spec/simple/service/action_invoke2_spec.rb +166 -0
  62. data/spec/simple/service/action_invoke_spec.rb +266 -0
  63. data/spec/simple/service/action_spec.rb +51 -0
  64. data/spec/simple/service/context_spec.rb +69 -0
  65. data/spec/simple/service/service_spec.rb +105 -0
  66. data/spec/simple/service/version_spec.rb +7 -0
  67. data/spec/spec_helper.rb +38 -0
  68. data/spec/support/spec_services.rb +50 -0
  69. metadata +130 -0
@@ -0,0 +1,506 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Simple::Service::Action::IndieHash
8
+
9
+ &mdash; Documentation by YARD 0.9.20
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
+ pathId = "Simple::Service::Action::IndieHash";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (I)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../Simple.html" title="Simple (module)">Simple</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Service.html" title="Simple::Service (module)">Service</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Action.html" title="Simple::Service::Action (class)">Action</a></span></span>
41
+ &raquo;
42
+ <span class="title">IndieHash</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Simple::Service::Action::IndieHash
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Simple::Service::Action::IndieHash</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/simple/service/action/indie_hash.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>The IndieHash class defines as much of the Hash interface as necessary for simple-service to successfully run.</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="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(sym) &#x21d2; Object </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'></div></span>
146
+
147
+ </li>
148
+
149
+
150
+ <li class="public ">
151
+ <span class="summary_signature">
152
+
153
+ <a href="#fetch_values-instance_method" title="#fetch_values (instance method)">#<strong>fetch_values</strong>(*keys) &#x21d2; Object </a>
154
+
155
+
156
+
157
+ </span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'></div></span>
168
+
169
+ </li>
170
+
171
+
172
+ <li class="public ">
173
+ <span class="summary_signature">
174
+
175
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(hsh) &#x21d2; IndieHash </a>
176
+
177
+
178
+
179
+ </span>
180
+
181
+
182
+ <span class="note title constructor">constructor</span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+ <span class="summary_desc"><div class='inline'>
192
+ <p>A new instance of IndieHash.</p>
193
+ </div></span>
194
+
195
+ </li>
196
+
197
+
198
+ <li class="public ">
199
+ <span class="summary_signature">
200
+
201
+ <a href="#key%3F-instance_method" title="#key? (instance method)">#<strong>key?</strong>(sym) &#x21d2; Boolean </a>
202
+
203
+
204
+
205
+ </span>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ <span class="summary_desc"><div class='inline'></div></span>
216
+
217
+ </li>
218
+
219
+
220
+ <li class="public ">
221
+ <span class="summary_signature">
222
+
223
+ <a href="#keys-instance_method" title="#keys (instance method)">#<strong>keys</strong> &#x21d2; Object </a>
224
+
225
+
226
+
227
+ </span>
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ <span class="summary_desc"><div class='inline'></div></span>
238
+
239
+ </li>
240
+
241
+
242
+ <li class="public ">
243
+ <span class="summary_signature">
244
+
245
+ <a href="#merge-instance_method" title="#merge (instance method)">#<strong>merge</strong>(other_hsh) &#x21d2; Object </a>
246
+
247
+
248
+
249
+ </span>
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+ <span class="summary_desc"><div class='inline'></div></span>
260
+
261
+ </li>
262
+
263
+
264
+ </ul>
265
+
266
+
267
+ <div id="constructor_details" class="method_details_list">
268
+ <h2>Constructor Details</h2>
269
+
270
+ <div class="method_details first">
271
+ <h3 class="signature first" id="initialize-instance_method">
272
+
273
+ #<strong>initialize</strong>(hsh) &#x21d2; <tt><span class='object_link'><a href="" title="Simple::Service::Action::IndieHash (class)">IndieHash</a></span></tt>
274
+
275
+
276
+
277
+
278
+
279
+ </h3><div class="docstring">
280
+ <div class="discussion">
281
+
282
+ <p>Returns a new instance of IndieHash</p>
283
+
284
+
285
+ </div>
286
+ </div>
287
+ <div class="tags">
288
+
289
+
290
+ </div><table class="source_code">
291
+ <tr>
292
+ <td>
293
+ <pre class="lines">
294
+
295
+
296
+ 5
297
+ 6
298
+ 7</pre>
299
+ </td>
300
+ <td>
301
+ <pre class="code"><span class="info file"># File 'lib/simple/service/action/indie_hash.rb', line 5</span>
302
+
303
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_hsh'>hsh</span><span class='rparen'>)</span>
304
+ <span class='ivar'>@hsh</span> <span class='op'>=</span> <span class='id identifier rubyid_hsh'>hsh</span><span class='period'>.</span><span class='id identifier rubyid_each_with_object'>each_with_object</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='op'>|</span> <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='rbrace'>}</span>
305
+ <span class='kw'>end</span></pre>
306
+ </td>
307
+ </tr>
308
+ </table>
309
+ </div>
310
+
311
+ </div>
312
+
313
+
314
+ <div id="instance_method_details" class="method_details_list">
315
+ <h2>Instance Method Details</h2>
316
+
317
+
318
+ <div class="method_details first">
319
+ <h3 class="signature first" id="[]-instance_method">
320
+
321
+ #<strong>[]</strong>(sym) &#x21d2; <tt>Object</tt>
322
+
323
+
324
+
325
+
326
+
327
+ </h3><table class="source_code">
328
+ <tr>
329
+ <td>
330
+ <pre class="lines">
331
+
332
+
333
+ 22
334
+ 23
335
+ 24</pre>
336
+ </td>
337
+ <td>
338
+ <pre class="code"><span class="info file"># File 'lib/simple/service/action/indie_hash.rb', line 22</span>
339
+
340
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span>
341
+ <span class='ivar'>@hsh</span><span class='lbracket'>[</span><span class='id identifier rubyid_sym'>sym</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span>
342
+ <span class='kw'>end</span></pre>
343
+ </td>
344
+ </tr>
345
+ </table>
346
+ </div>
347
+
348
+ <div class="method_details ">
349
+ <h3 class="signature " id="fetch_values-instance_method">
350
+
351
+ #<strong>fetch_values</strong>(*keys) &#x21d2; <tt>Object</tt>
352
+
353
+
354
+
355
+
356
+
357
+ </h3><table class="source_code">
358
+ <tr>
359
+ <td>
360
+ <pre class="lines">
361
+
362
+
363
+ 13
364
+ 14
365
+ 15
366
+ 16</pre>
367
+ </td>
368
+ <td>
369
+ <pre class="code"><span class="info file"># File 'lib/simple/service/action/indie_hash.rb', line 13</span>
370
+
371
+ <span class='kw'>def</span> <span class='id identifier rubyid_fetch_values'>fetch_values</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span>
372
+ <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_s</span><span class='rparen'>)</span>
373
+ <span class='ivar'>@hsh</span><span class='period'>.</span><span class='id identifier rubyid_fetch_values'>fetch_values</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span>
374
+ <span class='kw'>end</span></pre>
375
+ </td>
376
+ </tr>
377
+ </table>
378
+ </div>
379
+
380
+ <div class="method_details ">
381
+ <h3 class="signature " id="key?-instance_method">
382
+
383
+ #<strong>key?</strong>(sym) &#x21d2; <tt>Boolean</tt>
384
+
385
+
386
+
387
+
388
+
389
+ </h3><div class="docstring">
390
+ <div class="discussion">
391
+
392
+
393
+ </div>
394
+ </div>
395
+ <div class="tags">
396
+
397
+ <p class="tag_title">Returns:</p>
398
+ <ul class="return">
399
+
400
+ <li>
401
+
402
+
403
+ <span class='type'>(<tt>Boolean</tt>)</span>
404
+
405
+
406
+
407
+ </li>
408
+
409
+ </ul>
410
+
411
+ </div><table class="source_code">
412
+ <tr>
413
+ <td>
414
+ <pre class="lines">
415
+
416
+
417
+ 18
418
+ 19
419
+ 20</pre>
420
+ </td>
421
+ <td>
422
+ <pre class="code"><span class="info file"># File 'lib/simple/service/action/indie_hash.rb', line 18</span>
423
+
424
+ <span class='kw'>def</span> <span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span>
425
+ <span class='ivar'>@hsh</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_sym'>sym</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
426
+ <span class='kw'>end</span></pre>
427
+ </td>
428
+ </tr>
429
+ </table>
430
+ </div>
431
+
432
+ <div class="method_details ">
433
+ <h3 class="signature " id="keys-instance_method">
434
+
435
+ #<strong>keys</strong> &#x21d2; <tt>Object</tt>
436
+
437
+
438
+
439
+
440
+
441
+ </h3><table class="source_code">
442
+ <tr>
443
+ <td>
444
+ <pre class="lines">
445
+
446
+
447
+ 9
448
+ 10
449
+ 11</pre>
450
+ </td>
451
+ <td>
452
+ <pre class="code"><span class="info file"># File 'lib/simple/service/action/indie_hash.rb', line 9</span>
453
+
454
+ <span class='kw'>def</span> <span class='id identifier rubyid_keys'>keys</span>
455
+ <span class='ivar'>@hsh</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
456
+ <span class='kw'>end</span></pre>
457
+ </td>
458
+ </tr>
459
+ </table>
460
+ </div>
461
+
462
+ <div class="method_details ">
463
+ <h3 class="signature " id="merge-instance_method">
464
+
465
+ #<strong>merge</strong>(other_hsh) &#x21d2; <tt>Object</tt>
466
+
467
+
468
+
469
+
470
+
471
+ </h3><table class="source_code">
472
+ <tr>
473
+ <td>
474
+ <pre class="lines">
475
+
476
+
477
+ 26
478
+ 27
479
+ 28
480
+ 29</pre>
481
+ </td>
482
+ <td>
483
+ <pre class="code"><span class="info file"># File 'lib/simple/service/action/indie_hash.rb', line 26</span>
484
+
485
+ <span class='kw'>def</span> <span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_other_hsh'>other_hsh</span><span class='rparen'>)</span>
486
+ <span class='ivar'>@hsh</span> <span class='op'>=</span> <span class='ivar'>@hsh</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_other_hsh'>other_hsh</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:__hsh__</span><span class='rparen'>)</span><span class='rparen'>)</span>
487
+ <span class='kw'>self</span>
488
+ <span class='kw'>end</span></pre>
489
+ </td>
490
+ </tr>
491
+ </table>
492
+ </div>
493
+
494
+ </div>
495
+
496
+ </div>
497
+
498
+ <div id="footer">
499
+ Generated on Tue Dec 3 13:46:26 2019 by
500
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
501
+ 0.9.20 (ruby-2.5.1).
502
+ </div>
503
+
504
+ </div>
505
+ </body>
506
+ </html>