simple-service 0.1.1 → 0.1.6
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 +4 -4
- data/.gitignore +2 -2
- data/.rubocop.yml +7 -0
- data/.tm_properties +1 -1
- data/Makefile +8 -0
- data/README.md +68 -1
- data/TODO.txt +3 -0
- data/VERSION +1 -1
- data/doc/Simple.html +117 -0
- data/doc/Simple/Service.html +865 -0
- data/doc/Simple/Service/Action.html +923 -0
- data/doc/Simple/Service/Action/Comment.html +451 -0
- data/doc/Simple/Service/Action/Comment/Extractor.html +347 -0
- data/doc/Simple/Service/Action/MethodReflection.html +285 -0
- data/doc/Simple/Service/Action/Parameter.html +816 -0
- data/doc/Simple/Service/ArgumentError.html +128 -0
- data/doc/Simple/Service/ClassMethods.html +187 -0
- data/doc/Simple/Service/Context.html +379 -0
- data/doc/Simple/Service/ContextMissingError.html +124 -0
- data/doc/Simple/Service/ContextReadOnlyError.html +206 -0
- data/doc/Simple/Service/ExtraArguments.html +428 -0
- data/doc/Simple/Service/GemHelper.html +190 -0
- data/doc/Simple/Service/MissingArguments.html +426 -0
- data/doc/Simple/Service/NoSuchAction.html +433 -0
- data/doc/_index.html +274 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +146 -0
- data/doc/file.TODO.html +70 -0
- data/doc/file_list.html +61 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +146 -0
- data/doc/js/app.js +303 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +483 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/simple/service.rb +161 -56
- data/lib/simple/service/action.rb +104 -107
- data/lib/simple/service/action/comment.rb +3 -1
- data/lib/simple/service/action/method_reflection.rb +3 -3
- data/lib/simple/service/action/parameter.rb +3 -7
- data/lib/simple/service/context.rb +69 -27
- data/lib/simple/service/errors.rb +54 -0
- data/lib/simple/service/version.rb +7 -2
- data/scripts/stats +2 -1
- data/spec/simple/service/action_invoke3_spec.rb +266 -0
- data/spec/simple/service/action_invoke_spec.rb +237 -0
- data/spec/simple/service/action_spec.rb +51 -0
- data/spec/simple/service/context_spec.rb +39 -7
- data/spec/simple/service/service_spec.rb +158 -0
- data/spec/simple/service/version_spec.rb +7 -0
- data/spec/spec_helper.rb +15 -2
- data/spec/support/spec_services.rb +58 -0
- metadata +48 -6
- data/lib/simple.rb +0 -2
- data/spec/support/004_simplecov.rb +0 -13
@@ -0,0 +1,923 @@
|
|
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
|
8
|
+
|
9
|
+
— 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";
|
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 (A)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Simple.html" title="Simple (module)">Simple</a></span></span> » <span class='title'><span class='object_link'><a href="../Service.html" title="Simple::Service (module)">Service</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Action</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
|
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</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.rb<span class="defines">,<br />
|
98
|
+
lib/simple/service/action.rb</span>
|
99
|
+
</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>rubocop:disable Metrics/AbcSize rubocop:disable Metrics/PerceivedComplexity rubocop:disable Metrics/CyclomaticComplexity rubocop:disable Metrics/ClassLength</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div><h2>Defined Under Namespace</h2>
|
116
|
+
<p class="children">
|
117
|
+
|
118
|
+
|
119
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Action/MethodReflection.html" title="Simple::Service::Action::MethodReflection (module)">MethodReflection</a></span>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Action/Comment.html" title="Simple::Service::Action::Comment (class)">Comment</a></span>, <span class='object_link'><a href="Action/Parameter.html" title="Simple::Service::Action::Parameter (class)">Parameter</a></span>
|
124
|
+
|
125
|
+
|
126
|
+
</p>
|
127
|
+
|
128
|
+
|
129
|
+
<h2>
|
130
|
+
Constant Summary
|
131
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
132
|
+
</h2>
|
133
|
+
|
134
|
+
<dl class="constants">
|
135
|
+
|
136
|
+
<dt id="IDENTIFIER_PATTERN-constant" class="">IDENTIFIER_PATTERN =
|
137
|
+
|
138
|
+
</dt>
|
139
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>[a-z][a-z0-9_]*</span><span class='tstring_end'>"</span></span></pre></dd>
|
140
|
+
|
141
|
+
<dt id="IDENTIFIER_REGEXP-constant" class="">IDENTIFIER_REGEXP =
|
142
|
+
|
143
|
+
</dt>
|
144
|
+
<dd><pre class="code"><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\A</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="#IDENTIFIER_PATTERN-constant" title="Simple::Service::Action::IDENTIFIER_PATTERN (constant)">IDENTIFIER_PATTERN</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>\\z</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span></pre></dd>
|
145
|
+
|
146
|
+
</dl>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
153
|
+
<ul class="summary">
|
154
|
+
|
155
|
+
<li class="public ">
|
156
|
+
<span class="summary_signature">
|
157
|
+
|
158
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ Object </a>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
</span>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="note title readonly">readonly</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<span class="summary_desc"><div class='inline'>
|
178
|
+
<p>Returns the value of attribute name.</p>
|
179
|
+
</div></span>
|
180
|
+
|
181
|
+
</li>
|
182
|
+
|
183
|
+
|
184
|
+
<li class="public ">
|
185
|
+
<span class="summary_signature">
|
186
|
+
|
187
|
+
<a href="#service-instance_method" title="#service (instance method)">#<strong>service</strong> ⇒ Object </a>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</span>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<span class="note title readonly">readonly</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<span class="summary_desc"><div class='inline'>
|
207
|
+
<p>Returns the value of attribute service.</p>
|
208
|
+
</div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
</ul>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<h2>
|
220
|
+
Class Method Summary
|
221
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
222
|
+
</h2>
|
223
|
+
|
224
|
+
<ul class="summary">
|
225
|
+
|
226
|
+
<li class="public ">
|
227
|
+
<span class="summary_signature">
|
228
|
+
|
229
|
+
<a href="#enumerate-class_method" title="enumerate (class method)">.<strong>enumerate</strong>(service:) ⇒ Object </a>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</span>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'>
|
244
|
+
<p>determines all services provided by the <code>service</code> service module.</p>
|
245
|
+
</div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
</ul>
|
251
|
+
|
252
|
+
<h2>
|
253
|
+
Instance Method Summary
|
254
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
255
|
+
</h2>
|
256
|
+
|
257
|
+
<ul class="summary">
|
258
|
+
|
259
|
+
<li class="public ">
|
260
|
+
<span class="summary_signature">
|
261
|
+
|
262
|
+
<a href="#full_description-instance_method" title="#full_description (instance method)">#<strong>full_description</strong> ⇒ Object </a>
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
</span>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
277
|
+
|
278
|
+
</li>
|
279
|
+
|
280
|
+
|
281
|
+
<li class="public ">
|
282
|
+
<span class="summary_signature">
|
283
|
+
|
284
|
+
<a href="#full_name-instance_method" title="#full_name (instance method)">#<strong>full_name</strong> ⇒ Object </a>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
</span>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
299
|
+
|
300
|
+
</li>
|
301
|
+
|
302
|
+
|
303
|
+
<li class="public ">
|
304
|
+
<span class="summary_signature">
|
305
|
+
|
306
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(service, name) ⇒ Action </a>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
</span>
|
311
|
+
|
312
|
+
|
313
|
+
<span class="note title constructor">constructor</span>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
<span class="summary_desc"><div class='inline'>
|
323
|
+
<p>A new instance of Action.</p>
|
324
|
+
</div></span>
|
325
|
+
|
326
|
+
</li>
|
327
|
+
|
328
|
+
|
329
|
+
<li class="public ">
|
330
|
+
<span class="summary_signature">
|
331
|
+
|
332
|
+
<a href="#invoke-instance_method" title="#invoke (instance method)">#<strong>invoke</strong>(args:, flags:) ⇒ Object </a>
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
</span>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
<span class="summary_desc"><div class='inline'>
|
347
|
+
<p>invokes an action with a given <code>name</code> in a service with a Hash of arguments.</p>
|
348
|
+
</div></span>
|
349
|
+
|
350
|
+
</li>
|
351
|
+
|
352
|
+
|
353
|
+
<li class="public ">
|
354
|
+
<span class="summary_signature">
|
355
|
+
|
356
|
+
<a href="#parameters-instance_method" title="#parameters (instance method)">#<strong>parameters</strong> ⇒ Object </a>
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
</span>
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
<span class="summary_desc"><div class='inline'>
|
371
|
+
<p>returns an Array of Parameter structures.</p>
|
372
|
+
</div></span>
|
373
|
+
|
374
|
+
</li>
|
375
|
+
|
376
|
+
|
377
|
+
<li class="public ">
|
378
|
+
<span class="summary_signature">
|
379
|
+
|
380
|
+
<a href="#short_description-instance_method" title="#short_description (instance method)">#<strong>short_description</strong> ⇒ Object </a>
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
</span>
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
395
|
+
|
396
|
+
</li>
|
397
|
+
|
398
|
+
|
399
|
+
<li class="public ">
|
400
|
+
<span class="summary_signature">
|
401
|
+
|
402
|
+
<a href="#source_location-instance_method" title="#source_location (instance method)">#<strong>source_location</strong> ⇒ Object </a>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
</span>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
417
|
+
|
418
|
+
</li>
|
419
|
+
|
420
|
+
|
421
|
+
<li class="public ">
|
422
|
+
<span class="summary_signature">
|
423
|
+
|
424
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ Object </a>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
</span>
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
439
|
+
|
440
|
+
</li>
|
441
|
+
|
442
|
+
|
443
|
+
</ul>
|
444
|
+
|
445
|
+
|
446
|
+
<div id="constructor_details" class="method_details_list">
|
447
|
+
<h2>Constructor Details</h2>
|
448
|
+
|
449
|
+
<div class="method_details first">
|
450
|
+
<h3 class="signature first" id="initialize-instance_method">
|
451
|
+
|
452
|
+
#<strong>initialize</strong>(service, name) ⇒ <tt><span class='object_link'><a href="" title="Simple::Service::Action (class)">Action</a></span></tt>
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
</h3><div class="docstring">
|
459
|
+
<div class="discussion">
|
460
|
+
|
461
|
+
<p>Returns a new instance of Action</p>
|
462
|
+
|
463
|
+
|
464
|
+
</div>
|
465
|
+
</div>
|
466
|
+
<div class="tags">
|
467
|
+
|
468
|
+
|
469
|
+
</div><table class="source_code">
|
470
|
+
<tr>
|
471
|
+
<td>
|
472
|
+
<pre class="lines">
|
473
|
+
|
474
|
+
|
475
|
+
42
|
476
|
+
43
|
477
|
+
44
|
478
|
+
45
|
479
|
+
46
|
480
|
+
47</pre>
|
481
|
+
</td>
|
482
|
+
<td>
|
483
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 42</span>
|
484
|
+
|
485
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_service'>service</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='comment'># @private
|
486
|
+
</span> <span class='ivar'>@service</span> <span class='op'>=</span> <span class='id identifier rubyid_service'>service</span>
|
487
|
+
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
488
|
+
|
489
|
+
<span class='id identifier rubyid_parameters'>parameters</span>
|
490
|
+
<span class='kw'>end</span></pre>
|
491
|
+
</td>
|
492
|
+
</tr>
|
493
|
+
</table>
|
494
|
+
</div>
|
495
|
+
|
496
|
+
</div>
|
497
|
+
|
498
|
+
<div id="instance_attr_details" class="attr_details">
|
499
|
+
<h2>Instance Attribute Details</h2>
|
500
|
+
|
501
|
+
|
502
|
+
<span id=""></span>
|
503
|
+
<div class="method_details first">
|
504
|
+
<h3 class="signature first" id="name-instance_method">
|
505
|
+
|
506
|
+
#<strong>name</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
</h3><div class="docstring">
|
513
|
+
<div class="discussion">
|
514
|
+
|
515
|
+
<p>Returns the value of attribute name</p>
|
516
|
+
|
517
|
+
|
518
|
+
</div>
|
519
|
+
</div>
|
520
|
+
<div class="tags">
|
521
|
+
|
522
|
+
|
523
|
+
</div><table class="source_code">
|
524
|
+
<tr>
|
525
|
+
<td>
|
526
|
+
<pre class="lines">
|
527
|
+
|
528
|
+
|
529
|
+
27
|
530
|
+
28
|
531
|
+
29</pre>
|
532
|
+
</td>
|
533
|
+
<td>
|
534
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 27</span>
|
535
|
+
|
536
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
537
|
+
<span class='ivar'>@name</span>
|
538
|
+
<span class='kw'>end</span></pre>
|
539
|
+
</td>
|
540
|
+
</tr>
|
541
|
+
</table>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
|
545
|
+
<span id=""></span>
|
546
|
+
<div class="method_details ">
|
547
|
+
<h3 class="signature " id="service-instance_method">
|
548
|
+
|
549
|
+
#<strong>service</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
</h3><div class="docstring">
|
556
|
+
<div class="discussion">
|
557
|
+
|
558
|
+
<p>Returns the value of attribute service</p>
|
559
|
+
|
560
|
+
|
561
|
+
</div>
|
562
|
+
</div>
|
563
|
+
<div class="tags">
|
564
|
+
|
565
|
+
|
566
|
+
</div><table class="source_code">
|
567
|
+
<tr>
|
568
|
+
<td>
|
569
|
+
<pre class="lines">
|
570
|
+
|
571
|
+
|
572
|
+
26
|
573
|
+
27
|
574
|
+
28</pre>
|
575
|
+
</td>
|
576
|
+
<td>
|
577
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 26</span>
|
578
|
+
|
579
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_service'>service</span>
|
580
|
+
<span class='ivar'>@service</span>
|
581
|
+
<span class='kw'>end</span></pre>
|
582
|
+
</td>
|
583
|
+
</tr>
|
584
|
+
</table>
|
585
|
+
</div>
|
586
|
+
|
587
|
+
</div>
|
588
|
+
|
589
|
+
|
590
|
+
<div id="class_method_details" class="method_details_list">
|
591
|
+
<h2>Class Method Details</h2>
|
592
|
+
|
593
|
+
|
594
|
+
<div class="method_details first">
|
595
|
+
<h3 class="signature first" id="enumerate-class_method">
|
596
|
+
|
597
|
+
.<strong>enumerate</strong>(service:) ⇒ <tt>Object</tt>
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
</h3><div class="docstring">
|
604
|
+
<div class="discussion">
|
605
|
+
|
606
|
+
<p>determines all services provided by the <code>service</code> service module.</p>
|
607
|
+
|
608
|
+
|
609
|
+
</div>
|
610
|
+
</div>
|
611
|
+
<div class="tags">
|
612
|
+
|
613
|
+
|
614
|
+
</div><table class="source_code">
|
615
|
+
<tr>
|
616
|
+
<td>
|
617
|
+
<pre class="lines">
|
618
|
+
|
619
|
+
|
620
|
+
20
|
621
|
+
21
|
622
|
+
22
|
623
|
+
23
|
624
|
+
24</pre>
|
625
|
+
</td>
|
626
|
+
<td>
|
627
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 20</span>
|
628
|
+
|
629
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enumerate'>enumerate</span><span class='lparen'>(</span><span class='label'>service:</span><span class='rparen'>)</span> <span class='comment'># @private
|
630
|
+
</span> <span class='id identifier rubyid_service'>service</span><span class='period'>.</span><span class='id identifier rubyid_public_instance_methods'>public_instance_methods</span><span class='lparen'>(</span><span class='kw'>false</span><span class='rparen'>)</span>
|
631
|
+
<span class='period'>.</span><span class='id identifier rubyid_grep'>grep</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#IDENTIFIER_REGEXP-constant" title="Simple::Service::Action::IDENTIFIER_REGEXP (constant)">IDENTIFIER_REGEXP</a></span></span><span class='rparen'>)</span>
|
632
|
+
<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='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_hsh'>hsh</span><span class='op'>|</span> <span class='id identifier rubyid_hsh'>hsh</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Simple::Service::Action (class)">Action</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Simple::Service::Action#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_service'>service</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
633
|
+
<span class='kw'>end</span></pre>
|
634
|
+
</td>
|
635
|
+
</tr>
|
636
|
+
</table>
|
637
|
+
</div>
|
638
|
+
|
639
|
+
</div>
|
640
|
+
|
641
|
+
<div id="instance_method_details" class="method_details_list">
|
642
|
+
<h2>Instance Method Details</h2>
|
643
|
+
|
644
|
+
|
645
|
+
<div class="method_details first">
|
646
|
+
<h3 class="signature first" id="full_description-instance_method">
|
647
|
+
|
648
|
+
#<strong>full_description</strong> ⇒ <tt>Object</tt>
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
</h3><table class="source_code">
|
655
|
+
<tr>
|
656
|
+
<td>
|
657
|
+
<pre class="lines">
|
658
|
+
|
659
|
+
|
660
|
+
53
|
661
|
+
54
|
662
|
+
55</pre>
|
663
|
+
</td>
|
664
|
+
<td>
|
665
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 53</span>
|
666
|
+
|
667
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_full_description'>full_description</span>
|
668
|
+
<span class='id identifier rubyid_comment'>comment</span><span class='period'>.</span><span class='id identifier rubyid_full'>full</span>
|
669
|
+
<span class='kw'>end</span></pre>
|
670
|
+
</td>
|
671
|
+
</tr>
|
672
|
+
</table>
|
673
|
+
</div>
|
674
|
+
|
675
|
+
<div class="method_details ">
|
676
|
+
<h3 class="signature " id="full_name-instance_method">
|
677
|
+
|
678
|
+
#<strong>full_name</strong> ⇒ <tt>Object</tt>
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
</h3><table class="source_code">
|
685
|
+
<tr>
|
686
|
+
<td>
|
687
|
+
<pre class="lines">
|
688
|
+
|
689
|
+
|
690
|
+
29
|
691
|
+
30
|
692
|
+
31</pre>
|
693
|
+
</td>
|
694
|
+
<td>
|
695
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 29</span>
|
696
|
+
|
697
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_full_name'>full_name</span>
|
698
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_service'>service</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
699
|
+
<span class='kw'>end</span></pre>
|
700
|
+
</td>
|
701
|
+
</tr>
|
702
|
+
</table>
|
703
|
+
</div>
|
704
|
+
|
705
|
+
<div class="method_details ">
|
706
|
+
<h3 class="signature " id="invoke-instance_method">
|
707
|
+
|
708
|
+
#<strong>invoke</strong>(args:, flags:) ⇒ <tt>Object</tt>
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
</h3><div class="docstring">
|
715
|
+
<div class="discussion">
|
716
|
+
|
717
|
+
<p>invokes an action with a given <code>name</code> in a service with a Hash of arguments.</p>
|
718
|
+
|
719
|
+
<p>You cannot call this method if the context is not set.</p>
|
720
|
+
|
721
|
+
|
722
|
+
</div>
|
723
|
+
</div>
|
724
|
+
<div class="tags">
|
725
|
+
|
726
|
+
|
727
|
+
</div><table class="source_code">
|
728
|
+
<tr>
|
729
|
+
<td>
|
730
|
+
<pre class="lines">
|
731
|
+
|
732
|
+
|
733
|
+
75
|
734
|
+
76
|
735
|
+
77
|
736
|
+
78
|
737
|
+
79
|
738
|
+
80
|
739
|
+
81
|
740
|
+
82
|
741
|
+
83
|
742
|
+
84
|
743
|
+
85
|
744
|
+
86
|
745
|
+
87
|
746
|
+
88
|
747
|
+
89
|
748
|
+
90
|
749
|
+
91
|
750
|
+
92
|
751
|
+
93</pre>
|
752
|
+
</td>
|
753
|
+
<td>
|
754
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 75</span>
|
755
|
+
|
756
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_invoke'>invoke</span><span class='lparen'>(</span><span class='label'>args:</span><span class='comma'>,</span> <span class='label'>flags:</span><span class='rparen'>)</span>
|
757
|
+
<span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_convert_argument_array_to_hash'>convert_argument_array_to_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
758
|
+
|
759
|
+
<span class='id identifier rubyid_verify_required_args!'>verify_required_args!</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_flags'>flags</span><span class='rparen'>)</span>
|
760
|
+
|
761
|
+
<span class='id identifier rubyid_positionals'>positionals</span> <span class='op'>=</span> <span class='id identifier rubyid_build_positional_arguments'>build_positional_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_flags'>flags</span><span class='rparen'>)</span>
|
762
|
+
<span class='id identifier rubyid_keywords'>keywords</span> <span class='op'>=</span> <span class='id identifier rubyid_build_keyword_arguments'>build_keyword_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_flags'>flags</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
763
|
+
|
764
|
+
<span class='id identifier rubyid_service_instance'>service_instance</span> <span class='op'>=</span> <span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
765
|
+
<span class='id identifier rubyid_service_instance'>service_instance</span><span class='period'>.</span><span class='id identifier rubyid_extend'>extend</span> <span class='id identifier rubyid_service'>service</span>
|
766
|
+
|
767
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
768
|
+
<span class='id identifier rubyid_service_instance'>service_instance</span><span class='period'>.</span><span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_positionals'>positionals</span><span class='rparen'>)</span>
|
769
|
+
<span class='kw'>else</span>
|
770
|
+
<span class='comment'># calling this with an empty keywords Hash still raises an ArgumentError
|
771
|
+
</span> <span class='comment'># if the target method does not accept arguments.
|
772
|
+
</span> <span class='id identifier rubyid_service_instance'>service_instance</span><span class='period'>.</span><span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_positionals'>positionals</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_keywords'>keywords</span><span class='rparen'>)</span>
|
773
|
+
<span class='kw'>end</span>
|
774
|
+
<span class='kw'>end</span></pre>
|
775
|
+
</td>
|
776
|
+
</tr>
|
777
|
+
</table>
|
778
|
+
</div>
|
779
|
+
|
780
|
+
<div class="method_details ">
|
781
|
+
<h3 class="signature " id="parameters-instance_method">
|
782
|
+
|
783
|
+
#<strong>parameters</strong> ⇒ <tt>Object</tt>
|
784
|
+
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
</h3><div class="docstring">
|
790
|
+
<div class="discussion">
|
791
|
+
|
792
|
+
<p>returns an Array of Parameter structures.</p>
|
793
|
+
|
794
|
+
|
795
|
+
</div>
|
796
|
+
</div>
|
797
|
+
<div class="tags">
|
798
|
+
|
799
|
+
|
800
|
+
</div><table class="source_code">
|
801
|
+
<tr>
|
802
|
+
<td>
|
803
|
+
<pre class="lines">
|
804
|
+
|
805
|
+
|
806
|
+
38
|
807
|
+
39
|
808
|
+
40</pre>
|
809
|
+
</td>
|
810
|
+
<td>
|
811
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 38</span>
|
812
|
+
|
813
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parameters'>parameters</span>
|
814
|
+
<span class='ivar'>@parameters</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="Action/Parameter.html" title="Simple::Service::Action::Parameter (class)">Parameter</a></span></span><span class='period'>.</span><span class='id identifier rubyid_reflect_on_method'><span class='object_link'><a href="Action/Parameter.html#reflect_on_method-class_method" title="Simple::Service::Action::Parameter.reflect_on_method (method)">reflect_on_method</a></span></span><span class='lparen'>(</span><span class='label'>service:</span> <span class='id identifier rubyid_service'>service</span><span class='comma'>,</span> <span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
815
|
+
<span class='kw'>end</span></pre>
|
816
|
+
</td>
|
817
|
+
</tr>
|
818
|
+
</table>
|
819
|
+
</div>
|
820
|
+
|
821
|
+
<div class="method_details ">
|
822
|
+
<h3 class="signature " id="short_description-instance_method">
|
823
|
+
|
824
|
+
#<strong>short_description</strong> ⇒ <tt>Object</tt>
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
</h3><table class="source_code">
|
831
|
+
<tr>
|
832
|
+
<td>
|
833
|
+
<pre class="lines">
|
834
|
+
|
835
|
+
|
836
|
+
49
|
837
|
+
50
|
838
|
+
51</pre>
|
839
|
+
</td>
|
840
|
+
<td>
|
841
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 49</span>
|
842
|
+
|
843
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_short_description'>short_description</span>
|
844
|
+
<span class='id identifier rubyid_comment'>comment</span><span class='period'>.</span><span class='id identifier rubyid_short'>short</span>
|
845
|
+
<span class='kw'>end</span></pre>
|
846
|
+
</td>
|
847
|
+
</tr>
|
848
|
+
</table>
|
849
|
+
</div>
|
850
|
+
|
851
|
+
<div class="method_details ">
|
852
|
+
<h3 class="signature " id="source_location-instance_method">
|
853
|
+
|
854
|
+
#<strong>source_location</strong> ⇒ <tt>Object</tt>
|
855
|
+
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
|
860
|
+
</h3><table class="source_code">
|
861
|
+
<tr>
|
862
|
+
<td>
|
863
|
+
<pre class="lines">
|
864
|
+
|
865
|
+
|
866
|
+
68
|
867
|
+
69
|
868
|
+
70</pre>
|
869
|
+
</td>
|
870
|
+
<td>
|
871
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 68</span>
|
872
|
+
|
873
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_source_location'>source_location</span>
|
874
|
+
<span class='ivar'>@service</span><span class='period'>.</span><span class='id identifier rubyid_instance_method'>instance_method</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_source_location'>source_location</span>
|
875
|
+
<span class='kw'>end</span></pre>
|
876
|
+
</td>
|
877
|
+
</tr>
|
878
|
+
</table>
|
879
|
+
</div>
|
880
|
+
|
881
|
+
<div class="method_details ">
|
882
|
+
<h3 class="signature " id="to_s-instance_method">
|
883
|
+
|
884
|
+
#<strong>to_s</strong> ⇒ <tt>Object</tt>
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
</h3><table class="source_code">
|
891
|
+
<tr>
|
892
|
+
<td>
|
893
|
+
<pre class="lines">
|
894
|
+
|
895
|
+
|
896
|
+
33
|
897
|
+
34
|
898
|
+
35</pre>
|
899
|
+
</td>
|
900
|
+
<td>
|
901
|
+
<pre class="code"><span class="info file"># File 'lib/simple/service/action.rb', line 33</span>
|
902
|
+
|
903
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span> <span class='comment'># @private
|
904
|
+
</span> <span class='id identifier rubyid_full_name'>full_name</span>
|
905
|
+
<span class='kw'>end</span></pre>
|
906
|
+
</td>
|
907
|
+
</tr>
|
908
|
+
</table>
|
909
|
+
</div>
|
910
|
+
|
911
|
+
</div>
|
912
|
+
|
913
|
+
</div>
|
914
|
+
|
915
|
+
<div id="footer">
|
916
|
+
Generated on Wed Dec 4 22:57:13 2019 by
|
917
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
918
|
+
0.9.20 (ruby-2.5.1).
|
919
|
+
</div>
|
920
|
+
|
921
|
+
</div>
|
922
|
+
</body>
|
923
|
+
</html>
|