ruff 0.0.4 → 0.0.5

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.
@@ -0,0 +1,570 @@
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: Ruff::Handler
8
+
9
+ &mdash; Ruff 0.0.4 Documentation
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 = "Ruff::Handler";
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 (H)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Ruff.html" title="Ruff (module)">Ruff</a></span></span>
41
+ &raquo;
42
+ <span class="title">Handler</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: Ruff::Handler
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">Ruff::Handler</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/ruff/handler.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+ <p>In algebraic effects, handler is an first-class object.</p>
105
+
106
+
107
+ </div>
108
+ </div>
109
+ <div class="tags">
110
+
111
+
112
+ </div>
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <h2>
121
+ Instance Method Summary
122
+ <small><a href="#" class="summary_toggle">collapse</a></small>
123
+ </h2>
124
+
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Handler </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+ <span class="note title constructor">constructor</span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'><p>makes a new handler, internally having fresh empty hash.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#on-instance_method" title="#on (instance method)">#<strong>on</strong>(eff, &amp;prc) &#x21d2; Handler{Effect&lt;Arg, Ret&gt;, e} </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'><p>sets effec handler <code>&amp;prc</code> for <code>eff</code>.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#run-instance_method" title="#run (instance method)">#<strong>run</strong>(&amp;prc) &#x21d2; T </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <span class="summary_desc"><div class='inline'><p>handles the computation.</p>
193
+ </div></span>
194
+
195
+ </li>
196
+
197
+
198
+ </ul>
199
+
200
+
201
+ <div id="constructor_details" class="method_details_list">
202
+ <h2>Constructor Details</h2>
203
+
204
+ <div class="method_details first">
205
+ <h3 class="signature first" id="initialize-instance_method">
206
+
207
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="Ruff::Handler (class)">Handler</a></span></tt>
208
+
209
+
210
+
211
+
212
+
213
+ </h3><div class="docstring">
214
+ <div class="discussion">
215
+ <p>makes a new handler, internally having fresh empty hash.
216
+ This is a effect-handler store and when handliong it is looked up.</p>
217
+
218
+
219
+ </div>
220
+ </div>
221
+ <div class="tags">
222
+
223
+ <div class="examples">
224
+ <p class="tag_title">Examples:</p>
225
+
226
+
227
+ <pre class="example code"><code><span class='id identifier rubyid_handler'>handler</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Ruff::Handler (class)">Handler</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span></code></pre>
228
+
229
+ </div>
230
+
231
+
232
+ </div><table class="source_code">
233
+ <tr>
234
+ <td>
235
+ <pre class="lines">
236
+
237
+
238
+ 8
239
+ 9
240
+ 10</pre>
241
+ </td>
242
+ <td>
243
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 8</span>
244
+
245
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
246
+ <span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
247
+ <span class='kw'>end</span></pre>
248
+ </td>
249
+ </tr>
250
+ </table>
251
+ </div>
252
+
253
+ </div>
254
+
255
+
256
+ <div id="instance_method_details" class="method_details_list">
257
+ <h2>Instance Method Details</h2>
258
+
259
+
260
+ <div class="method_details first">
261
+ <h3 class="signature first" id="on-instance_method">
262
+
263
+ #<strong>on</strong>(eff, &amp;prc) &#x21d2; <tt><span class='object_link'><a href="" title="Ruff::Handler (class)">Handler</a></span>{<span class='object_link'><a href="Effect.html" title="Ruff::Effect (class)">Effect</a></span>&lt;Arg, Ret&gt;, e}</tt>
264
+
265
+
266
+
267
+
268
+
269
+ </h3><div class="docstring">
270
+ <div class="discussion">
271
+ <p>sets effec handler <code>&amp;prc</code> for <code>eff</code></p>
272
+
273
+
274
+ </div>
275
+ </div>
276
+ <div class="tags">
277
+
278
+ <div class="examples">
279
+ <p class="tag_title">Examples:</p>
280
+
281
+
282
+ <pre class="example code"><code><span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='const'>Log</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
283
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Logger: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_msg'>msg</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
284
+ <span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
285
+ <span class='rbrace'>}</span></code></pre>
286
+
287
+ </div>
288
+ <p class="tag_title">Parameters:</p>
289
+ <ul class="param">
290
+
291
+ <li>
292
+
293
+ <span class='name'>eff</span>
294
+
295
+
296
+ <span class='type'>(<tt><span class='object_link'><a href="Effect.html" title="Ruff::Effect (class)">Effect</a></span>&lt;Arg, Ret&gt;</tt>)</span>
297
+
298
+
299
+
300
+ &mdash;
301
+ <div class='inline'><p>the effect instance to be handled</p>
302
+ </div>
303
+
304
+ </li>
305
+
306
+ <li>
307
+
308
+ <span class='name'>prc</span>
309
+
310
+
311
+ <span class='type'>(<tt>Proc&lt;Arg, Ret =&gt; A&gt;</tt>)</span>
312
+
313
+
314
+
315
+ &mdash;
316
+ <div class='inline'><p>a handler to handle <code>eff</code>;
317
+ last argument of <code>&amp;prc</code> is <em>continuation</em>, proc object
318
+ to go back to the handled computation.</p>
319
+ </div>
320
+
321
+ </li>
322
+
323
+ </ul>
324
+
325
+ <p class="tag_title">Returns:</p>
326
+ <ul class="return">
327
+
328
+ <li>
329
+
330
+
331
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Ruff::Handler (class)">Handler</a></span>{<span class='object_link'><a href="Effect.html" title="Ruff::Effect (class)">Effect</a></span>&lt;Arg, Ret&gt;, e}</tt>)</span>
332
+
333
+
334
+
335
+ &mdash;
336
+ <div class='inline'><p>itself updated with handling <code>Effect&lt;Arg, Ret&gt;</code></p>
337
+ </div>
338
+
339
+ </li>
340
+
341
+ </ul>
342
+
343
+ </div><table class="source_code">
344
+ <tr>
345
+ <td>
346
+ <pre class="lines">
347
+
348
+
349
+ 27
350
+ 28
351
+ 29
352
+ 30
353
+ 31</pre>
354
+ </td>
355
+ <td>
356
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 27</span>
357
+
358
+ <span class='kw'>def</span> <span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_eff'>eff</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
359
+ <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_eff'>eff</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_prc'>prc</span>
360
+
361
+ <span class='kw'>self</span>
362
+ <span class='kw'>end</span></pre>
363
+ </td>
364
+ </tr>
365
+ </table>
366
+ </div>
367
+
368
+ <div class="method_details ">
369
+ <h3 class="signature " id="run-instance_method">
370
+
371
+ #<strong>run</strong>(&amp;prc) &#x21d2; <tt>T</tt>
372
+
373
+
374
+
375
+
376
+
377
+ </h3><div class="docstring">
378
+ <div class="discussion">
379
+ <p>handles the computation.</p>
380
+
381
+
382
+ </div>
383
+ </div>
384
+ <div class="tags">
385
+
386
+ <div class="examples">
387
+ <p class="tag_title">Examples:</p>
388
+
389
+
390
+ <pre class="example code"><code><span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='lbrace'>{</span>
391
+ <span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hello</span><span class='tstring_end'>&quot;</span></span>
392
+ <span class='rbrace'>}</span></code></pre>
393
+
394
+
395
+ <p class="example_title"><div class='inline'><p><code>handler</code> can be layered.</p>
396
+ </div></p>
397
+
398
+ <pre class="example code"><code><span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='lbrace'>{</span>
399
+ <span class='const'><span class='object_link'><a href="" title="Ruff::Handler (class)">Handler</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Ruff::Handler#initialize (method)">new</a></span></span>
400
+ <span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='const'>Double</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
401
+ <span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='id identifier rubyid_v'>v</span> <span class='op'>*</span> <span class='id identifier rubyid_v'>v</span><span class='rbracket'>]</span>
402
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='lbrace'>{</span>
403
+ <span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='const'>Double</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='int'>3</span>
404
+ <span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='int'>3</span>
405
+ <span class='rbrace'>}</span>
406
+ <span class='rbrace'>}</span></code></pre>
407
+
408
+ </div>
409
+ <p class="tag_title">Parameters:</p>
410
+ <ul class="param">
411
+
412
+ <li>
413
+
414
+ <span class='name'></span>
415
+
416
+
417
+ <span class='type'>(<tt>Proc&lt;(), T&gt;</tt>)</span>
418
+
419
+
420
+
421
+ </li>
422
+
423
+ </ul>
424
+
425
+ <p class="tag_title">Returns:</p>
426
+ <ul class="return">
427
+
428
+ <li>
429
+
430
+
431
+ <span class='type'>(<tt>T</tt>)</span>
432
+
433
+
434
+
435
+ </li>
436
+
437
+ </ul>
438
+
439
+ </div><table class="source_code">
440
+ <tr>
441
+ <td>
442
+ <pre class="lines">
443
+
444
+
445
+ 53
446
+ 54
447
+ 55
448
+ 56
449
+ 57
450
+ 58
451
+ 59
452
+ 60
453
+ 61
454
+ 62
455
+ 63
456
+ 64
457
+ 65
458
+ 66
459
+ 67
460
+ 68
461
+ 69
462
+ 70
463
+ 71
464
+ 72
465
+ 73
466
+ 74
467
+ 75
468
+ 76
469
+ 77
470
+ 78
471
+ 79
472
+ 80
473
+ 81
474
+ 82
475
+ 83
476
+ 84
477
+ 85
478
+ 86
479
+ 87
480
+ 88
481
+ 89
482
+ 90
483
+ 91
484
+ 92
485
+ 93
486
+ 94
487
+ 95
488
+ 96
489
+ 97
490
+ 98
491
+ 99
492
+ 100
493
+ 101
494
+ 102
495
+ 103
496
+ 104</pre>
497
+ </td>
498
+ <td>
499
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 53</span>
500
+
501
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
502
+ <span class='id identifier rubyid_co'>co</span> <span class='op'>=</span> <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='op'>&amp;</span><span class='id identifier rubyid_prc'>prc</span>
503
+ <span class='id identifier rubyid_continue'>continue</span> <span class='op'>=</span> <span class='kw'>nil</span>
504
+ <span class='id identifier rubyid_rehandles'>rehandles</span> <span class='op'>=</span> <span class='kw'>nil</span>
505
+
506
+ <span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='rparen'>)</span> <span class='tlambeg'>{</span>
507
+ <span class='kw'>if</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'><span class='object_link'><a href="Throws.html" title="Ruff::Throws (module)">Throws</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Throws/Eff.html" title="Ruff::Throws::Eff (class)">Eff</a></span></span>
508
+ <span class='kw'>if</span> <span class='id identifier rubyid_effh'>effh</span> <span class='op'>=</span> <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span>
509
+ <span class='id identifier rubyid_effh'>effh</span><span class='lbracket'>[</span><span class='id identifier rubyid_continue'>continue</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='rbracket'>]</span>
510
+ <span class='kw'>else</span>
511
+ <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span> <span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Throws.html" title="Ruff::Throws (module)">Throws</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Throws/Resend.html" title="Ruff::Throws::Resend (class)">Resend</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Throws/Resend.html#initialize-instance_method" title="Ruff::Throws::Resend#initialize (method)">new</a></span></span> <span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_continue'>continue</span><span class='rparen'>)</span>
512
+ <span class='kw'>end</span>
513
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'><span class='object_link'><a href="Throws.html" title="Ruff::Throws (module)">Throws</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Throws/Resend.html" title="Ruff::Throws::Resend (class)">Resend</a></span></span>
514
+ <span class='kw'>if</span> <span class='id identifier rubyid_effh'>effh</span> <span class='op'>=</span> <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_eff'>eff</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span>
515
+ <span class='id identifier rubyid_effh'>effh</span><span class='lbracket'>[</span><span class='id identifier rubyid_rehandles'>rehandles</span><span class='lbracket'>[</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_eff'>eff</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='rbracket'>]</span>
516
+ <span class='kw'>else</span>
517
+ <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span> <span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Throws.html" title="Ruff::Throws (module)">Throws</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Throws/Resend.html" title="Ruff::Throws::Resend (class)">Resend</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Throws/Resend.html#initialize-instance_method" title="Ruff::Throws::Resend#initialize (method)">new</a></span></span> <span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_rehandles'>rehandles</span><span class='lbracket'>[</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span><span class='rparen'>)</span>
518
+ <span class='kw'>end</span>
519
+ <span class='kw'>else</span>
520
+ <span class='id identifier rubyid_r'>r</span>
521
+ <span class='kw'>end</span>
522
+ <span class='rbrace'>}</span>
523
+
524
+ <span class='id identifier rubyid_rehandles'>rehandles</span> <span class='op'>=</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span><span class='tlambeg'>{</span>
525
+ <span class='id identifier rubyid_newh'>newh</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
526
+ <span class='kw'>def</span> <span class='id identifier rubyid_newh'>newh</span><span class='period'>.</span><span class='id identifier rubyid_add_handler'>add_handler</span> <span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span>
527
+ <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_h'>h</span>
528
+ <span class='kw'>end</span>
529
+
530
+ <span class='ivar'>@handlers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='op'>|</span>
531
+ <span class='id identifier rubyid_newh'>newh</span><span class='period'>.</span><span class='id identifier rubyid_add_handler'>add_handler</span> <span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span>
532
+ <span class='rbrace'>}</span>
533
+
534
+ <span class='kw'>class</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_newh'>newh</span>
535
+ <span class='kw'>undef</span> <span class='id identifier rubyid_add_handler'>add_handler</span>
536
+ <span class='kw'>end</span>
537
+
538
+ <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='tlambeg'>{</span>
539
+ <span class='id identifier rubyid_continue'>continue</span><span class='lbracket'>[</span>
540
+ <span class='id identifier rubyid_newh'>newh</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='lbrace'>{</span>
541
+ <span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rbracket'>]</span>
542
+ <span class='rbrace'>}</span>
543
+ <span class='rbracket'>]</span>
544
+ <span class='rbrace'>}</span>
545
+ <span class='rbrace'>}</span>
546
+
547
+ <span class='id identifier rubyid_continue'>continue</span> <span class='op'>=</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> <span class='tlambeg'>{</span>
548
+ <span class='id identifier rubyid_handle'>handle</span><span class='lbracket'>[</span><span class='id identifier rubyid_co'>co</span><span class='period'>.</span><span class='id identifier rubyid_resume'>resume</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span><span class='rbracket'>]</span>
549
+ <span class='rbrace'>}</span>
550
+
551
+ <span class='id identifier rubyid_continue'>continue</span><span class='lbracket'>[</span><span class='kw'>nil</span><span class='rbracket'>]</span>
552
+ <span class='kw'>end</span></pre>
553
+ </td>
554
+ </tr>
555
+ </table>
556
+ </div>
557
+
558
+ </div>
559
+
560
+ </div>
561
+
562
+ <div id="footer">
563
+ Generated on Wed Aug 14 22:29:58 2019 by
564
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
565
+ 0.9.20 (ruby-2.6.3).
566
+ </div>
567
+
568
+ </div>
569
+ </body>
570
+ </html>