ruff 1.3.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.rubocop.yml +1 -1
- data/Gemfile +3 -0
- data/README.md +35 -58
- data/Rakefile +2 -1
- data/docs/.nojekyll +0 -0
- data/docs/Ruff.html +7 -7
- data/docs/Ruff/Effect.html +165 -23
- data/docs/Ruff/Handler.html +46 -114
- data/docs/Ruff/Standard.html +7 -7
- data/docs/Ruff/Standard/Async.html +28 -27
- data/docs/Ruff/Standard/Async/Instance.html +63 -27
- data/docs/Ruff/Standard/Call1cc.html +297 -0
- data/docs/Ruff/Standard/CurrentTime.html +6 -6
- data/docs/Ruff/Standard/CurrentTime/Instance.html +7 -7
- data/docs/Ruff/Standard/Defer.html +6 -6
- data/docs/Ruff/Standard/Defer/Instance.html +6 -6
- data/docs/Ruff/Standard/DelimCtrl.html +340 -0
- data/docs/Ruff/Standard/MeasureTime.html +6 -6
- data/docs/Ruff/Standard/MeasureTime/Instance.html +8 -8
- data/docs/Ruff/Standard/State.html +6 -6
- data/docs/Ruff/Standard/State/Instance.html +6 -6
- data/docs/Ruff/Throws.html +6 -11
- data/docs/Ruff/Throws/Eff.html +6 -6
- data/docs/Ruff/Throws/Resend.html +6 -6
- data/docs/_index.html +14 -7
- data/docs/class_list.html +3 -3
- data/docs/css/style.css +2 -2
- data/docs/file.README.html +41 -58
- data/docs/file_list.html +2 -2
- data/docs/frames.html +2 -2
- data/docs/index.html +41 -58
- data/docs/js/app.js +14 -3
- data/docs/method_list.html +46 -30
- data/docs/top-level-namespace.html +6 -6
- data/lib/ruff/effect.rb +32 -3
- data/lib/ruff/handler.rb +43 -18
- data/lib/ruff/standard.rb +1 -0
- data/lib/ruff/standard/async.rb +27 -22
- data/lib/ruff/standard/current_time.rb +1 -1
- data/lib/ruff/standard/delim_ctrl.rb +49 -0
- data/lib/ruff/standard/measure_time.rb +2 -2
- data/lib/ruff/version.rb +1 -1
- data/ruff.gemspec +1 -1
- data/version +1 -1
- metadata +12 -9
- data/Gemfile.lock +0 -62
data/docs/Ruff/Handler.html
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ruff::Handler
|
8
8
|
|
9
|
-
— Ruff 1.
|
9
|
+
— Ruff 2.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ruff::Handler";
|
19
19
|
relpath = '../';
|
20
20
|
</script>
|
@@ -87,11 +87,6 @@
|
|
87
87
|
|
88
88
|
|
89
89
|
|
90
|
-
<dl>
|
91
|
-
<dt>Includes:</dt>
|
92
|
-
<dd><span class='object_link'><a href="Throws.html" title="Ruff::Throws (module)">Throws</a></span></dd>
|
93
|
-
</dl>
|
94
|
-
|
95
90
|
|
96
91
|
|
97
92
|
|
@@ -132,29 +127,6 @@
|
|
132
127
|
<li class="public ">
|
133
128
|
<span class="summary_signature">
|
134
129
|
|
135
|
-
<a href="#handlers=-instance_method" title="#handlers= (instance method)">#<strong>handlers=</strong>(handlers) ⇒ Object </a>
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
</span>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
<span class="summary_desc"><div class='inline'><p>is also private method.</p>
|
150
|
-
</div></span>
|
151
|
-
|
152
|
-
</li>
|
153
|
-
|
154
|
-
|
155
|
-
<li class="public ">
|
156
|
-
<span class="summary_signature">
|
157
|
-
|
158
130
|
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Handler </a>
|
159
131
|
|
160
132
|
|
@@ -171,7 +143,7 @@
|
|
171
143
|
|
172
144
|
|
173
145
|
|
174
|
-
<span class="summary_desc"><div class='inline'><p>
|
146
|
+
<span class="summary_desc"><div class='inline'><p>A new instance of Handler.</p>
|
175
147
|
</div></span>
|
176
148
|
|
177
149
|
</li>
|
@@ -194,7 +166,7 @@
|
|
194
166
|
|
195
167
|
|
196
168
|
|
197
|
-
<span class="summary_desc"><div class='inline'><p>sets effec handler <code>&fun</code> for <code>eff</code>.</p>
|
169
|
+
<span class="summary_desc"><div class='inline'><p>sets or updates effec handler <code>&fun</code> for <code>eff</code>.</p>
|
198
170
|
</div></span>
|
199
171
|
|
200
172
|
</li>
|
@@ -249,13 +221,7 @@
|
|
249
221
|
</ul>
|
250
222
|
|
251
223
|
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<div id="constructor_details" class="method_details_list">
|
224
|
+
<div id="constructor_details" class="method_details_list">
|
259
225
|
<h2>Constructor Details</h2>
|
260
226
|
|
261
227
|
<div class="method_details first">
|
@@ -269,10 +235,7 @@
|
|
269
235
|
|
270
236
|
</h3><div class="docstring">
|
271
237
|
<div class="discussion">
|
272
|
-
<p>
|
273
|
-
|
274
|
-
<p>This is a effect-handler store and when handliong it is looked up.
|
275
|
-
Value handler is set <code>id</code> function to by default.</p>
|
238
|
+
<p>Returns a new instance of Handler.</p>
|
276
239
|
|
277
240
|
|
278
241
|
</div>
|
@@ -294,16 +257,16 @@ Value handler is set
id function to by default. |
|
294
257
|
<pre class="lines">
|
295
258
|
|
296
259
|
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
260
|
+
38
|
261
|
+
39
|
262
|
+
40
|
263
|
+
41</pre>
|
301
264
|
</td>
|
302
265
|
<td>
|
303
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line
|
266
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 38</span>
|
304
267
|
|
305
268
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
306
|
-
<span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='
|
269
|
+
<span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='const'>Store</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
307
270
|
<span class='ivar'>@valh</span> <span class='op'>=</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_x'>x</span> <span class='rbrace'>}</span>
|
308
271
|
<span class='kw'>end</span></pre>
|
309
272
|
</td>
|
@@ -319,47 +282,7 @@ Value handler is set
id function to by default. |
|
319
282
|
|
320
283
|
|
321
284
|
<div class="method_details first">
|
322
|
-
<h3 class="signature first" id="
|
323
|
-
|
324
|
-
#<strong>handlers=</strong>(handlers) ⇒ <tt>Object</tt>
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
</h3><div class="docstring">
|
331
|
-
<div class="discussion">
|
332
|
-
<p>is also private method.</p>
|
333
|
-
|
334
|
-
|
335
|
-
</div>
|
336
|
-
</div>
|
337
|
-
<div class="tags">
|
338
|
-
|
339
|
-
|
340
|
-
</div><table class="source_code">
|
341
|
-
<tr>
|
342
|
-
<td>
|
343
|
-
<pre class="lines">
|
344
|
-
|
345
|
-
|
346
|
-
111
|
347
|
-
112
|
348
|
-
113</pre>
|
349
|
-
</td>
|
350
|
-
<td>
|
351
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 111</span>
|
352
|
-
|
353
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_handlers='>handlers=</span><span class='lparen'>(</span><span class='id identifier rubyid_handlers'>handlers</span><span class='rparen'>)</span>
|
354
|
-
<span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='id identifier rubyid_handlers'>handlers</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
355
|
-
<span class='kw'>end</span></pre>
|
356
|
-
</td>
|
357
|
-
</tr>
|
358
|
-
</table>
|
359
|
-
</div>
|
360
|
-
|
361
|
-
<div class="method_details ">
|
362
|
-
<h3 class="signature " id="on-instance_method">
|
285
|
+
<h3 class="signature first" id="on-instance_method">
|
363
286
|
|
364
287
|
#<strong>on</strong>(eff, &fun) ⇒ <tt><span class='object_link'><a href="" title="Ruff::Handler (class)">Handler</a></span><A!{<span class='object_link'><a href="Effect.html" title="Ruff::Effect (class)">Effect</a></span><Arg, Ret>, e}, B!{e}></tt>
|
365
288
|
|
@@ -369,7 +292,9 @@ Value handler is set
id function to by default. |
|
369
292
|
|
370
293
|
</h3><div class="docstring">
|
371
294
|
<div class="discussion">
|
372
|
-
<p>sets effec handler <code>&fun</code> for <code>eff</code></p>
|
295
|
+
<p>sets or updates effec handler <code>&fun</code> for <code>eff</code></p>
|
296
|
+
|
297
|
+
<p>Note that <code>eff</code> can be a supertype of an effect to be caught.</p>
|
373
298
|
|
374
299
|
|
375
300
|
</div>
|
@@ -441,23 +366,30 @@ to go back to the handled computation.
|
|
441
366
|
|
442
367
|
</ul>
|
443
368
|
|
369
|
+
<p class="tag_title">See Also:</p>
|
370
|
+
<ul class="see">
|
371
|
+
|
372
|
+
<li><span class='object_link'><a href="Effect.html#<<-class_method" title="Ruff::Effect.<< (method)">Effect.<<</a></span></li>
|
373
|
+
|
374
|
+
</ul>
|
375
|
+
|
444
376
|
</div><table class="source_code">
|
445
377
|
<tr>
|
446
378
|
<td>
|
447
379
|
<pre class="lines">
|
448
380
|
|
449
381
|
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
382
|
+
102
|
383
|
+
103
|
384
|
+
104
|
385
|
+
105
|
386
|
+
106</pre>
|
455
387
|
</td>
|
456
388
|
<td>
|
457
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line
|
389
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 102</span>
|
458
390
|
|
459
391
|
<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'>&</span><span class='id identifier rubyid_fun'>fun</span><span class='rparen'>)</span>
|
460
|
-
<span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_eff'>eff</span><span class='
|
392
|
+
<span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_eff'>eff</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
|
461
393
|
|
462
394
|
<span class='kw'>self</span>
|
463
395
|
<span class='kw'>end</span></pre>
|
@@ -552,14 +484,14 @@ or returned from the effect handler throwing continuation away
|
|
552
484
|
<pre class="lines">
|
553
485
|
|
554
486
|
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
487
|
+
131
|
488
|
+
132
|
489
|
+
133
|
490
|
+
134
|
491
|
+
135</pre>
|
560
492
|
</td>
|
561
493
|
<td>
|
562
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line
|
494
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 131</span>
|
563
495
|
|
564
496
|
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
|
565
497
|
<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='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
|
@@ -662,14 +594,14 @@ in effect handlers of the handler.
|
|
662
594
|
<pre class="lines">
|
663
595
|
|
664
596
|
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
597
|
+
77
|
598
|
+
78
|
599
|
+
79
|
600
|
+
80
|
601
|
+
81</pre>
|
670
602
|
</td>
|
671
603
|
<td>
|
672
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line
|
604
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 77</span>
|
673
605
|
|
674
606
|
<span class='kw'>def</span> <span class='id identifier rubyid_to'>to</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_fun'>fun</span><span class='rparen'>)</span>
|
675
607
|
<span class='ivar'>@valh</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
|
@@ -686,9 +618,9 @@ in effect handlers of the handler.
|
|
686
618
|
</div>
|
687
619
|
|
688
620
|
<div id="footer">
|
689
|
-
Generated on
|
621
|
+
Generated on Wed Jun 10 21:24:09 2020 by
|
690
622
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
691
|
-
0.9.
|
623
|
+
0.9.25 (ruby-2.7.1).
|
692
624
|
</div>
|
693
625
|
|
694
626
|
</div>
|
data/docs/Ruff/Standard.html
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ruff::Standard
|
8
8
|
|
9
|
-
— Ruff 1.
|
9
|
+
— Ruff 2.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ruff::Standard";
|
19
19
|
relpath = '../';
|
20
20
|
</script>
|
@@ -117,7 +117,7 @@ Each module provides
Instance class to instantiate and handle the i |
|
117
117
|
<p class="children">
|
118
118
|
|
119
119
|
|
120
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Standard/Async.html" title="Ruff::Standard::Async (module)">Async</a></span>, <span class='object_link'><a href="Standard/CurrentTime.html" title="Ruff::Standard::CurrentTime (module)">CurrentTime</a></span>, <span class='object_link'><a href="Standard/Defer.html" title="Ruff::Standard::Defer (module)">Defer</a></span>, <span class='object_link'><a href="Standard/MeasureTime.html" title="Ruff::Standard::MeasureTime (module)">MeasureTime</a></span>, <span class='object_link'><a href="Standard/State.html" title="Ruff::Standard::State (module)">State</a></span>
|
120
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Standard/Async.html" title="Ruff::Standard::Async (module)">Async</a></span>, <span class='object_link'><a href="Standard/CurrentTime.html" title="Ruff::Standard::CurrentTime (module)">CurrentTime</a></span>, <span class='object_link'><a href="Standard/Defer.html" title="Ruff::Standard::Defer (module)">Defer</a></span>, <span class='object_link'><a href="Standard/DelimCtrl.html" title="Ruff::Standard::DelimCtrl (module)">DelimCtrl</a></span>, <span class='object_link'><a href="Standard/MeasureTime.html" title="Ruff::Standard::MeasureTime (module)">MeasureTime</a></span>, <span class='object_link'><a href="Standard/State.html" title="Ruff::Standard::State (module)">State</a></span>
|
121
121
|
|
122
122
|
|
123
123
|
|
@@ -135,9 +135,9 @@ Each module provides
Instance class to instantiate and handle the i |
|
135
135
|
</div>
|
136
136
|
|
137
137
|
<div id="footer">
|
138
|
-
Generated on
|
138
|
+
Generated on Wed Jun 10 21:24:09 2020 by
|
139
139
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
|
-
0.9.
|
140
|
+
0.9.25 (ruby-2.7.1).
|
141
141
|
</div>
|
142
142
|
|
143
143
|
</div>
|
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ruff::Standard::Async
|
8
8
|
|
9
|
-
— Ruff 1.
|
9
|
+
— Ruff 2.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ruff::Standard::Async";
|
19
19
|
relpath = '../../';
|
20
20
|
</script>
|
@@ -85,7 +85,8 @@
|
|
85
85
|
|
86
86
|
<h2>Overview</h2><div class="docstring">
|
87
87
|
<div class="discussion">
|
88
|
-
<p><code>Async</code> provides effects <code>Async.async</code>, <code>Async.yield</code> and <code>Async.await</code>,
|
88
|
+
<p><code>Async</code> provides effects <code>Async.async</code>, <code>Async.yield</code> and <code>Async.await</code>,
|
89
|
+
and the implementation async/await.
|
89
90
|
This implementation is based on the tutorial for Multicore OCaml.
|
90
91
|
The module has an instance of <code>Instance</code> and provides its methods as module method.</p>
|
91
92
|
|
@@ -325,12 +326,12 @@ The module has an instance of
Instance and provides its methods as |
|
325
326
|
<pre class="lines">
|
326
327
|
|
327
328
|
|
328
|
-
|
329
|
-
|
330
|
-
|
329
|
+
181
|
330
|
+
182
|
331
|
+
183</pre>
|
331
332
|
</td>
|
332
333
|
<td>
|
333
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
334
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 181</span>
|
334
335
|
|
335
336
|
<span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
|
336
337
|
<span class='ivar'>@eff</span>
|
@@ -378,12 +379,12 @@ The module has an instance of
Instance and provides its methods as |
|
378
379
|
<pre class="lines">
|
379
380
|
|
380
381
|
|
381
|
-
|
382
|
-
|
383
|
-
|
382
|
+
159
|
383
|
+
160
|
384
|
+
161</pre>
|
384
385
|
</td>
|
385
386
|
<td>
|
386
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
387
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 159</span>
|
387
388
|
|
388
389
|
<span class='kw'>def</span> <span class='id identifier rubyid_async'>async</span><span class='lparen'>(</span><span class='id identifier rubyid_asynth'>asynth</span><span class='rparen'>)</span>
|
389
390
|
<span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_async'>async</span> <span class='id identifier rubyid_asynth'>asynth</span>
|
@@ -424,12 +425,12 @@ The module has an instance of
Instance and provides its methods as |
|
424
425
|
<pre class="lines">
|
425
426
|
|
426
427
|
|
427
|
-
|
428
|
-
|
429
|
-
|
428
|
+
164
|
429
|
+
165
|
430
|
+
166</pre>
|
430
431
|
</td>
|
431
432
|
<td>
|
432
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
433
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 164</span>
|
433
434
|
|
434
435
|
<span class='kw'>def</span> <span class='id identifier rubyid_await'>await</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span>
|
435
436
|
<span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_await'>await</span> <span class='id identifier rubyid_p'>p</span>
|
@@ -470,12 +471,12 @@ The module has an instance of
Instance and provides its methods as |
|
470
471
|
<pre class="lines">
|
471
472
|
|
472
473
|
|
473
|
-
|
474
|
-
|
475
|
-
|
474
|
+
174
|
475
|
+
175
|
476
|
+
176</pre>
|
476
477
|
</td>
|
477
478
|
<td>
|
478
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
479
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 174</span>
|
479
480
|
|
480
481
|
<span class='kw'>def</span> <span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
|
481
482
|
<span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
|
@@ -516,12 +517,12 @@ The module has an instance of
Instance and provides its methods as |
|
516
517
|
<pre class="lines">
|
517
518
|
|
518
519
|
|
519
|
-
|
520
|
-
|
521
|
-
|
520
|
+
169
|
521
|
+
170
|
522
|
+
171</pre>
|
522
523
|
</td>
|
523
524
|
<td>
|
524
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
525
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 169</span>
|
525
526
|
|
526
527
|
<span class='kw'>def</span> <span class='kw'>yield</span>
|
527
528
|
<span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span>
|
@@ -536,9 +537,9 @@ The module has an instance of
Instance and provides its methods as |
|
536
537
|
</div>
|
537
538
|
|
538
539
|
<div id="footer">
|
539
|
-
Generated on
|
540
|
+
Generated on Wed Jun 10 21:24:09 2020 by
|
540
541
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
541
|
-
0.9.
|
542
|
+
0.9.25 (ruby-2.7.1).
|
542
543
|
</div>
|
543
544
|
|
544
545
|
</div>
|
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ruff::Standard::Async::Instance
|
8
8
|
|
9
|
-
— Ruff 1.
|
9
|
+
— Ruff 2.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "Ruff::Standard::Async::Instance";
|
19
19
|
relpath = '../../../';
|
20
20
|
</script>
|
@@ -100,6 +100,42 @@
|
|
100
100
|
</div>
|
101
101
|
|
102
102
|
|
103
|
+
|
104
|
+
<h2>
|
105
|
+
Constant Summary
|
106
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
107
|
+
</h2>
|
108
|
+
|
109
|
+
<dl class="constants">
|
110
|
+
|
111
|
+
<dt id="Waiting-constant" class="">Waiting =
|
112
|
+
<div class="docstring">
|
113
|
+
<div class="discussion">
|
114
|
+
<p>are ADT-like classes which have only getter method.
|
115
|
+
These are used internally.</p>
|
116
|
+
|
117
|
+
<p>type 'a promise =
|
118
|
+
| Waiting of ('a, unit) continuation list
|
119
|
+
| Done of 'a</p>
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
<div class="tags">
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
</dt>
|
129
|
+
<dd><pre class="code"><span class='const'>Util</span><span class='op'>::</span><span class='const'>ADT</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span></pre></dd>
|
130
|
+
|
131
|
+
<dt id="Done-constant" class="">Done =
|
132
|
+
|
133
|
+
</dt>
|
134
|
+
<dd><pre class="code"><span class='const'>Util</span><span class='op'>::</span><span class='const'>ADT</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span></pre></dd>
|
135
|
+
|
136
|
+
</dl>
|
137
|
+
|
138
|
+
|
103
139
|
|
104
140
|
|
105
141
|
|
@@ -221,7 +257,7 @@
|
|
221
257
|
<li class="public ">
|
222
258
|
<span class="summary_signature">
|
223
259
|
|
224
|
-
<a href="#with-instance_method" title="#with (instance method)">#<strong>with</strong> ⇒ ()!{e} </a>
|
260
|
+
<a href="#with-instance_method" title="#with (instance method)">#<strong>with</strong>(&th) ⇒ ()!{e} </a>
|
225
261
|
|
226
262
|
|
227
263
|
|
@@ -295,7 +331,6 @@
|
|
295
331
|
<pre class="lines">
|
296
332
|
|
297
333
|
|
298
|
-
54
|
299
334
|
55
|
300
335
|
56
|
301
336
|
57
|
@@ -305,10 +340,11 @@
|
|
305
340
|
61
|
306
341
|
62
|
307
342
|
63
|
308
|
-
64
|
343
|
+
64
|
344
|
+
65</pre>
|
309
345
|
</td>
|
310
346
|
<td>
|
311
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
347
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 55</span>
|
312
348
|
|
313
349
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
314
350
|
<span class='comment'># delegates effect instances.
|
@@ -359,12 +395,12 @@ with accessing
Async.async , Async.yield , and A |
|
359
395
|
<pre class="lines">
|
360
396
|
|
361
397
|
|
362
|
-
103
|
363
398
|
104
|
364
|
-
105
|
399
|
+
105
|
400
|
+
106</pre>
|
365
401
|
</td>
|
366
402
|
<td>
|
367
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
403
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 104</span>
|
368
404
|
|
369
405
|
<span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
|
370
406
|
<span class='ivar'>@eff</span>
|
@@ -442,12 +478,12 @@ with accessing
Async.async , Async.yield , and A |
|
442
478
|
<pre class="lines">
|
443
479
|
|
444
480
|
|
445
|
-
71
|
446
481
|
72
|
447
|
-
73
|
482
|
+
73
|
483
|
+
74</pre>
|
448
484
|
</td>
|
449
485
|
<td>
|
450
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
486
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 72</span>
|
451
487
|
|
452
488
|
<span class='kw'>def</span> <span class='id identifier rubyid_async'>async</span><span class='lparen'>(</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
|
453
489
|
<span class='ivar'>@eff</span><span class='period'>.</span><span class='id identifier rubyid_async'>async</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='id identifier rubyid_th'>th</span>
|
@@ -518,12 +554,12 @@ with accessing
Async.async , Async.yield , and A |
|
518
554
|
<pre class="lines">
|
519
555
|
|
520
556
|
|
521
|
-
87
|
522
557
|
88
|
523
|
-
89
|
558
|
+
89
|
559
|
+
90</pre>
|
524
560
|
</td>
|
525
561
|
<td>
|
526
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
562
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 88</span>
|
527
563
|
|
528
564
|
<span class='kw'>def</span> <span class='id identifier rubyid_await'>await</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span>
|
529
565
|
<span class='ivar'>@eff</span><span class='period'>.</span><span class='id identifier rubyid_await'>await</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='id identifier rubyid_p'>p</span>
|
@@ -536,7 +572,7 @@ with accessing
Async.async , Async.yield , and A |
|
536
572
|
<div class="method_details ">
|
537
573
|
<h3 class="signature " id="with-instance_method">
|
538
574
|
|
539
|
-
#<strong>with</strong> ⇒ <tt>()!{e}</tt>
|
575
|
+
#<strong>with</strong>(&th) ⇒ <tt>()!{e}</tt>
|
540
576
|
|
541
577
|
|
542
578
|
|
@@ -595,15 +631,15 @@ including
Async.async , Async.yield and Async.aw |
|
595
631
|
<pre class="lines">
|
596
632
|
|
597
633
|
|
598
|
-
97
|
599
634
|
98
|
600
|
-
99
|
635
|
+
99
|
636
|
+
100</pre>
|
601
637
|
</td>
|
602
638
|
<td>
|
603
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
639
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 98</span>
|
604
640
|
|
605
641
|
<span class='id identifier rubyid_define_method'>define_method</span> <span class='symbol'>:with</span> <span class='kw'>do</span> <span class='op'>|</span><span class='op'>&</span><span class='id identifier rubyid_th'>th</span><span class='op'>|</span>
|
606
|
-
<span class='id identifier rubyid_fork'>fork</span><span class='lparen'>(</span><span class='const'>Util</span><span class='op'>::</span><span class='const'>Ref</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='
|
642
|
+
<span class='id identifier rubyid_fork'>fork</span><span class='lparen'>(</span><span class='const'>Util</span><span class='op'>::</span><span class='const'>Ref</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#Waiting-constant" title="Ruff::Standard::Async::Instance::Waiting (constant)">Waiting</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Ruff::Standard::Async::Instance#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
|
607
643
|
<span class='kw'>end</span></pre>
|
608
644
|
</td>
|
609
645
|
</tr>
|
@@ -652,12 +688,12 @@ including
Async.async , Async.yield and Async.aw |
|
652
688
|
<pre class="lines">
|
653
689
|
|
654
690
|
|
655
|
-
78
|
656
691
|
79
|
657
|
-
80
|
692
|
+
80
|
693
|
+
81</pre>
|
658
694
|
</td>
|
659
695
|
<td>
|
660
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line
|
696
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 79</span>
|
661
697
|
|
662
698
|
<span class='kw'>def</span> <span class='kw'>yield</span>
|
663
699
|
<span class='ivar'>@eff</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span>
|
@@ -672,9 +708,9 @@ including
Async.async , Async.yield and Async.aw |
|
672
708
|
</div>
|
673
709
|
|
674
710
|
<div id="footer">
|
675
|
-
Generated on
|
711
|
+
Generated on Wed Jun 10 21:24:09 2020 by
|
676
712
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
677
|
-
0.9.
|
713
|
+
0.9.25 (ruby-2.7.1).
|
678
714
|
</div>
|
679
715
|
|
680
716
|
</div>
|