mangrove 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,563 @@
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
+ Module: Mangrove::ControlFlow::Handler::ClassMethods
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Mangrove::ControlFlow::Handler::ClassMethods";
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 (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../Mangrove.html" title="Mangrove (module)">Mangrove</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../ControlFlow.html" title="Mangrove::ControlFlow (module)">ControlFlow</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Handler.html" title="Mangrove::ControlFlow::Handler (module)">Handler</a></span></span>
41
+ &raquo;
42
+ <span class="title">ClassMethods</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>Module: Mangrove::ControlFlow::Handler::ClassMethods
63
+ <span class="abstract note title">Abstract</span>
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+ <dl>
73
+ <dt>Extended by:</dt>
74
+ <dd>T::Helpers, T::Sig</dd>
75
+ </dl>
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dl>
85
+ <dt>Defined in:</dt>
86
+ <dd>lib/mangrove/control_flow.rb</dd>
87
+ </dl>
88
+
89
+ </div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <div class="note abstract">
94
+ <strong>This module is abstract.</strong>
95
+ <div class='inline'>
96
+ <p>Subclasses must implement the ‘abstract` methods below.</p>
97
+ </div>
98
+ </div>
99
+
100
+ <p>Mangrove::ControlFlow::ClassMethods</p>
101
+
102
+
103
+ </div>
104
+ </div>
105
+ <div class="tags">
106
+
107
+
108
+ </div>
109
+
110
+
111
+
112
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
113
+ <ul class="summary">
114
+
115
+ <li class="public ">
116
+ <span class="summary_signature">
117
+
118
+ <a href="#__mangrove_flow_controlled_method_names-instance_method" title="#__mangrove_flow_controlled_method_names (instance method)">#<strong>__mangrove_flow_controlled_method_names</strong> &#x21d2; Hash{Symbol =&gt; Set&lt;Symbol&gt;}<sup>?</sup> </a>
119
+
120
+
121
+
122
+ </span>
123
+
124
+
125
+
126
+
127
+ <span class="note title readonly">readonly</span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <span class="summary_desc"><div class='inline'></div></span>
138
+
139
+ </li>
140
+
141
+
142
+ </ul>
143
+
144
+
145
+
146
+
147
+
148
+ <h2>
149
+ Instance Method Summary
150
+ <small><a href="#" class="summary_toggle">collapse</a></small>
151
+ </h2>
152
+
153
+ <ul class="summary">
154
+
155
+ <li class="public ">
156
+ <span class="summary_signature">
157
+
158
+ <a href="#handle_flow_control_exception-instance_method" title="#handle_flow_control_exception (instance method)">#<strong>handle_flow_control_exception</strong>(signal) &#x21d2; void </a>
159
+
160
+
161
+
162
+ </span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+ <span class="summary_desc"><div class='inline'></div></span>
173
+
174
+ </li>
175
+
176
+
177
+ <li class="public ">
178
+ <span class="summary_signature">
179
+
180
+ <a href="#method_added-instance_method" title="#method_added (instance method)">#<strong>method_added</strong>(method_name) &#x21d2; Object </a>
181
+
182
+
183
+
184
+ </span>
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+ <span class="summary_desc"><div class='inline'></div></span>
195
+
196
+ </li>
197
+
198
+
199
+ <li class="public ">
200
+ <span class="summary_signature">
201
+
202
+ <a href="#singleton_method_added-instance_method" title="#singleton_method_added (instance method)">#<strong>singleton_method_added</strong>(method_name) &#x21d2; Object </a>
203
+
204
+
205
+
206
+ </span>
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'></div></span>
217
+
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature">
223
+
224
+ <a href="#wrap_original_method_to_handle_flow_control_exception-instance_method" title="#wrap_original_method_to_handle_flow_control_exception (instance method)">#<strong>wrap_original_method_to_handle_flow_control_exception</strong>(original_method) &#x21d2; void </a>
225
+
226
+
227
+
228
+ </span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <span class="summary_desc"><div class='inline'></div></span>
239
+
240
+ </li>
241
+
242
+
243
+ </ul>
244
+
245
+
246
+
247
+
248
+
249
+ <div id="instance_attr_details" class="attr_details">
250
+ <h2>Instance Attribute Details</h2>
251
+
252
+
253
+ <span id=""></span>
254
+ <div class="method_details first">
255
+ <h3 class="signature first" id="__mangrove_flow_controlled_method_names-instance_method">
256
+
257
+ #<strong>__mangrove_flow_controlled_method_names</strong> &#x21d2; <tt>Hash{Symbol =&gt; Set&lt;Symbol&gt;}</tt><sup>?</sup> <span class="extras">(readonly)</span>
258
+
259
+
260
+
261
+
262
+
263
+ </h3><div class="docstring">
264
+ <div class="discussion">
265
+
266
+
267
+ </div>
268
+ </div>
269
+ <div class="tags">
270
+
271
+ <p class="tag_title">Returns:</p>
272
+ <ul class="return">
273
+
274
+ <li>
275
+
276
+
277
+ <span class='type'>(<tt>Hash{Symbol =&gt; Set&lt;Symbol&gt;}</tt>, <tt>nil</tt>)</span>
278
+
279
+
280
+
281
+ </li>
282
+
283
+ </ul>
284
+
285
+ </div><table class="source_code">
286
+ <tr>
287
+ <td>
288
+ <pre class="lines">
289
+
290
+
291
+ 78
292
+ 79
293
+ 80</pre>
294
+ </td>
295
+ <td>
296
+ <pre class="code"><span class="info file"># File 'lib/mangrove/control_flow.rb', line 78</span>
297
+
298
+ <span class='kw'>def</span> <span class='id identifier rubyid___mangrove_flow_controlled_method_names'>__mangrove_flow_controlled_method_names</span>
299
+ <span class='ivar'>@__mangrove_flow_controlled_method_names</span>
300
+ <span class='kw'>end</span></pre>
301
+ </td>
302
+ </tr>
303
+ </table>
304
+ </div>
305
+
306
+ </div>
307
+
308
+
309
+ <div id="instance_method_details" class="method_details_list">
310
+ <h2>Instance Method Details</h2>
311
+
312
+
313
+ <div class="method_details first">
314
+ <h3 class="signature first" id="handle_flow_control_exception-instance_method">
315
+
316
+ #<strong>handle_flow_control_exception</strong>(signal) &#x21d2; <tt>void</tt>
317
+
318
+
319
+
320
+
321
+
322
+ </h3><div class="docstring">
323
+ <div class="discussion">
324
+ <p class="note returns_void">This method returns an undefined value.</p>
325
+
326
+ </div>
327
+ </div>
328
+ <div class="tags">
329
+ <p class="tag_title">Parameters:</p>
330
+ <ul class="param">
331
+
332
+ <li>
333
+
334
+ <span class='name'>signal</span>
335
+
336
+
337
+ <span class='type'>(<tt><span class='object_link'><a href="../ControlSignal.html" title="Mangrove::ControlFlow::ControlSignal (module)">ControlFlow::ControlSignal</a></span></tt>)</span>
338
+
339
+
340
+
341
+ </li>
342
+
343
+ </ul>
344
+
345
+
346
+ </div><table class="source_code">
347
+ <tr>
348
+ <td>
349
+ <pre class="lines">
350
+
351
+
352
+ 49
353
+ 50
354
+ 51</pre>
355
+ </td>
356
+ <td>
357
+ <pre class="code"><span class="info file"># File 'lib/mangrove/control_flow.rb', line 49</span>
358
+
359
+ <span class='kw'>def</span> <span class='id identifier rubyid_handle_flow_control_exception'>handle_flow_control_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_signal'>signal</span><span class='rparen'>)</span>
360
+ <span class='id identifier rubyid_signal'>signal</span><span class='period'>.</span><span class='id identifier rubyid_inner_value'>inner_value</span>
361
+ <span class='kw'>end</span></pre>
362
+ </td>
363
+ </tr>
364
+ </table>
365
+ </div>
366
+
367
+ <div class="method_details ">
368
+ <h3 class="signature " id="method_added-instance_method">
369
+
370
+ #<strong>method_added</strong>(method_name) &#x21d2; <tt>Object</tt>
371
+
372
+
373
+
374
+
375
+
376
+ </h3><table class="source_code">
377
+ <tr>
378
+ <td>
379
+ <pre class="lines">
380
+
381
+
382
+ 36
383
+ 37
384
+ 38
385
+ 39
386
+ 40
387
+ 41
388
+ 42
389
+ 43
390
+ 44
391
+ 45
392
+ 46</pre>
393
+ </td>
394
+ <td>
395
+ <pre class="code"><span class="info file"># File 'lib/mangrove/control_flow.rb', line 36</span>
396
+
397
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_added'>method_added</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span>
398
+ <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_bind'>bind</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Mangrove::ControlFlow::Handler::ClassMethods (module)">ClassMethods</a></span></span><span class='comma'>,</span> <span class='const'>Module</span><span class='rparen'>)</span><span class='rparen'>)</span>
399
+
400
+ <span class='kw'>super</span>
401
+
402
+ <span class='kw'>unless</span> <span class='ivar'>@__inside_mangrove_control_flow</span>
403
+ <span class='id identifier rubyid_original_method'>original_method</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_method'>instance_method</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span>
404
+
405
+ <span class='id identifier rubyid_wrap_original_method_to_handle_flow_control_exception'>wrap_original_method_to_handle_flow_control_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_original_method'>original_method</span><span class='rparen'>)</span>
406
+ <span class='kw'>end</span>
407
+ <span class='kw'>end</span></pre>
408
+ </td>
409
+ </tr>
410
+ </table>
411
+ </div>
412
+
413
+ <div class="method_details ">
414
+ <h3 class="signature " id="singleton_method_added-instance_method">
415
+
416
+ #<strong>singleton_method_added</strong>(method_name) &#x21d2; <tt>Object</tt>
417
+
418
+
419
+
420
+
421
+
422
+ </h3><table class="source_code">
423
+ <tr>
424
+ <td>
425
+ <pre class="lines">
426
+
427
+
428
+ 24
429
+ 25
430
+ 26
431
+ 27
432
+ 28
433
+ 29
434
+ 30
435
+ 31
436
+ 32
437
+ 33
438
+ 34</pre>
439
+ </td>
440
+ <td>
441
+ <pre class="code"><span class="info file"># File 'lib/mangrove/control_flow.rb', line 24</span>
442
+
443
+ <span class='kw'>def</span> <span class='id identifier rubyid_singleton_method_added'>singleton_method_added</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span>
444
+ <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_bind'>bind</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Mangrove::ControlFlow::Handler::ClassMethods (module)">ClassMethods</a></span></span><span class='comma'>,</span> <span class='const'>Module</span><span class='rparen'>)</span><span class='rparen'>)</span>
445
+
446
+ <span class='kw'>super</span>
447
+
448
+ <span class='kw'>unless</span> <span class='ivar'>@__inside_mangrove_control_flow</span>
449
+ <span class='id identifier rubyid_original_method'>original_method</span> <span class='op'>=</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span>
450
+
451
+ <span class='id identifier rubyid_wrap_original_method_to_handle_flow_control_exception'>wrap_original_method_to_handle_flow_control_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_original_method'>original_method</span><span class='rparen'>)</span>
452
+ <span class='kw'>end</span>
453
+ <span class='kw'>end</span></pre>
454
+ </td>
455
+ </tr>
456
+ </table>
457
+ </div>
458
+
459
+ <div class="method_details ">
460
+ <h3 class="signature " id="wrap_original_method_to_handle_flow_control_exception-instance_method">
461
+
462
+ #<strong>wrap_original_method_to_handle_flow_control_exception</strong>(original_method) &#x21d2; <tt>void</tt>
463
+
464
+
465
+
466
+
467
+
468
+ </h3><div class="docstring">
469
+ <div class="discussion">
470
+ <p class="note returns_void">This method returns an undefined value.</p>
471
+
472
+ </div>
473
+ </div>
474
+ <div class="tags">
475
+ <p class="tag_title">Parameters:</p>
476
+ <ul class="param">
477
+
478
+ <li>
479
+
480
+ <span class='name'>original_method</span>
481
+
482
+
483
+ <span class='type'>(<tt>Method</tt>, <tt>UnboundMethod</tt>)</span>
484
+
485
+
486
+
487
+ </li>
488
+
489
+ </ul>
490
+
491
+
492
+ </div><table class="source_code">
493
+ <tr>
494
+ <td>
495
+ <pre class="lines">
496
+
497
+
498
+ 54
499
+ 55
500
+ 56
501
+ 57
502
+ 58
503
+ 59
504
+ 60
505
+ 61
506
+ 62
507
+ 63
508
+ 64
509
+ 65
510
+ 66
511
+ 67
512
+ 68
513
+ 69
514
+ 70
515
+ 71
516
+ 72
517
+ 73
518
+ 74
519
+ 75</pre>
520
+ </td>
521
+ <td>
522
+ <pre class="code"><span class="info file"># File 'lib/mangrove/control_flow.rb', line 54</span>
523
+
524
+ <span class='kw'>def</span> <span class='id identifier rubyid_wrap_original_method_to_handle_flow_control_exception'>wrap_original_method_to_handle_flow_control_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_original_method'>original_method</span><span class='rparen'>)</span>
525
+ <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_bind'>bind</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_class_of'>class_of</span><span class='lparen'>(</span><span class='const'>Kernel</span><span class='rparen'>)</span><span class='rparen'>)</span>
526
+
527
+ <span class='ivar'>@__mangrove_flow_controlled_method_names</span> <span class='op'>||=</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_let'>let</span><span class='lparen'>(</span>
528
+ <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span>
529
+ <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_nilable'>nilable</span><span class='lparen'>(</span><span class='const'>T</span><span class='op'>::</span><span class='const'>Hash</span><span class='lbracket'>[</span><span class='const'>Symbol</span><span class='comma'>,</span> <span class='const'>T</span><span class='op'>::</span><span class='const'>Set</span><span class='lbracket'>[</span><span class='const'>Symbol</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='rparen'>)</span>
530
+ <span class='rparen'>)</span>
531
+
532
+ <span class='ivar'>@__mangrove_flow_controlled_method_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_let'>let</span><span class='lparen'>(</span><span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='const'>T</span><span class='op'>::</span><span class='const'>Set</span><span class='lbracket'>[</span><span class='const'>Symbol</span><span class='rbracket'>]</span><span class='rparen'>)</span>
533
+
534
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_cast'>cast</span><span class='lparen'>(</span><span class='ivar'>@__mangrove_flow_controlled_method_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>T</span><span class='op'>::</span><span class='const'>Set</span><span class='lbracket'>[</span><span class='const'>Symbol</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_original_method'>original_method</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
535
+
536
+ <span class='kw'>begin</span>
537
+ <span class='ivar'>@__inside_mangrove_control_flow</span> <span class='op'>=</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_let'>let</span><span class='lparen'>(</span><span class='kw'>true</span><span class='comma'>,</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_nilable'>nilable</span><span class='lparen'>(</span><span class='const'>T</span><span class='op'>::</span><span class='const'>Boolean</span><span class='rparen'>)</span><span class='rparen'>)</span>
538
+
539
+ <span class='id identifier rubyid_class_eval'>class_eval</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../../Mangrove.html" title="Mangrove (module)">Mangrove</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../ControlFlow.html" title="Mangrove::ControlFlow (module)">ControlFlow</a></span></span><span class='period'>.</span><span class='id identifier rubyid_impl!'><span class='object_link'><a href="../../ControlFlow.html#impl!-class_method" title="Mangrove::ControlFlow.impl! (method)">impl!</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_original_method'>original_method</span><span class='rparen'>)</span><span class='rparen'>)</span>
540
+ <span class='kw'>ensure</span>
541
+ <span class='ivar'>@__inside_mangrove_control_flow</span> <span class='op'>=</span> <span class='kw'>false</span>
542
+ <span class='kw'>end</span>
543
+
544
+ <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_cast'>cast</span><span class='lparen'>(</span><span class='ivar'>@__mangrove_flow_controlled_method_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>T</span><span class='op'>::</span><span class='const'>Set</span><span class='lbracket'>[</span><span class='const'>Symbol</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_original_method'>original_method</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
545
+ <span class='kw'>end</span></pre>
546
+ </td>
547
+ </tr>
548
+ </table>
549
+ </div>
550
+
551
+ </div>
552
+
553
+ </div>
554
+
555
+ <div id="footer">
556
+ Generated on Fri Sep 1 17:32:57 2023 by
557
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
558
+ 0.9.34 (ruby-3.2.2).
559
+ </div>
560
+
561
+ </div>
562
+ </body>
563
+ </html>