ruff 1.4.0 → 2.0.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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/Gemfile +2 -1
  4. data/Gemfile.lock +16 -12
  5. data/README.md +35 -58
  6. data/Rakefile +2 -1
  7. data/docs/Ruff.html +7 -7
  8. data/docs/Ruff/Effect.html +165 -23
  9. data/docs/Ruff/Handler.html +45 -50
  10. data/docs/Ruff/Standard.html +6 -6
  11. data/docs/Ruff/Standard/Async.html +26 -26
  12. data/docs/Ruff/Standard/Async/Instance.html +8 -8
  13. data/docs/Ruff/Standard/Call1cc.html +6 -6
  14. data/docs/Ruff/Standard/CurrentTime.html +6 -6
  15. data/docs/Ruff/Standard/CurrentTime/Instance.html +7 -7
  16. data/docs/Ruff/Standard/Defer.html +6 -6
  17. data/docs/Ruff/Standard/Defer/Instance.html +6 -6
  18. data/docs/Ruff/Standard/MeasureTime.html +6 -6
  19. data/docs/Ruff/Standard/MeasureTime/Instance.html +8 -8
  20. data/docs/Ruff/Standard/State.html +6 -6
  21. data/docs/Ruff/Standard/State/Instance.html +6 -6
  22. data/docs/Ruff/Throws.html +6 -11
  23. data/docs/Ruff/Throws/Eff.html +6 -6
  24. data/docs/Ruff/Throws/Resend.html +6 -6
  25. data/docs/_index.html +7 -7
  26. data/docs/class_list.html +2 -2
  27. data/docs/css/style.css +2 -2
  28. data/docs/file.README.html +39 -56
  29. data/docs/file_list.html +2 -2
  30. data/docs/frames.html +2 -2
  31. data/docs/index.html +39 -56
  32. data/docs/js/app.js +14 -3
  33. data/docs/method_list.html +71 -63
  34. data/docs/top-level-namespace.html +6 -6
  35. data/lib/ruff/effect.rb +32 -3
  36. data/lib/ruff/handler.rb +43 -18
  37. data/lib/ruff/standard/async.rb +10 -7
  38. data/lib/ruff/standard/current_time.rb +1 -1
  39. data/lib/ruff/standard/measure_time.rb +2 -2
  40. data/lib/ruff/version.rb +1 -1
  41. data/version +1 -1
  42. metadata +3 -3
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Standard::CurrentTime::Instance
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::CurrentTime::Instance";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -449,7 +449,7 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
449
449
  <pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 32</span>
450
450
 
451
451
  <span class='kw'>def</span> <span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
452
- <span class='ivar'>@handler</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
452
+ <span class='ivar'>@handler</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
453
453
  <span class='kw'>end</span></pre>
454
454
  </td>
455
455
  </tr>
@@ -461,9 +461,9 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
461
461
  </div>
462
462
 
463
463
  <div id="footer">
464
- Generated on Wed Oct 30 01:51:52 2019 by
464
+ Generated on Thu Jan 2 19:46:23 2020 by
465
465
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
466
- 0.9.20 (ruby-2.6.5).
466
+ 0.9.22 (ruby-2.6.5).
467
467
  </div>
468
468
 
469
469
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Standard::Defer
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::Defer";
19
19
  relpath = '../../';
20
20
  </script>
@@ -363,9 +363,9 @@ and the implementation to defer procedures .</p>
363
363
  </div>
364
364
 
365
365
  <div id="footer">
366
- Generated on Wed Oct 30 01:51:52 2019 by
366
+ Generated on Thu Jan 2 19:46:23 2020 by
367
367
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
368
- 0.9.20 (ruby-2.6.5).
368
+ 0.9.22 (ruby-2.6.5).
369
369
  </div>
370
370
 
371
371
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Standard::Defer::Instance
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::Defer::Instance";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -503,9 +503,9 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
503
503
  </div>
504
504
 
505
505
  <div id="footer">
506
- Generated on Wed Oct 30 01:51:52 2019 by
506
+ Generated on Thu Jan 2 19:46:23 2020 by
507
507
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
508
- 0.9.20 (ruby-2.6.5).
508
+ 0.9.22 (ruby-2.6.5).
509
509
  </div>
510
510
 
511
511
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Standard::MeasureTime
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::MeasureTime";
19
19
  relpath = '../../';
20
20
  </script>
@@ -379,9 +379,9 @@ and the implementation to measure and report execution time .</p>
379
379
  </div>
380
380
 
381
381
  <div id="footer">
382
- Generated on Wed Oct 30 01:51:52 2019 by
382
+ Generated on Thu Jan 2 19:46:23 2020 by
383
383
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
384
- 0.9.20 (ruby-2.6.5).
384
+ 0.9.22 (ruby-2.6.5).
385
385
  </div>
386
386
 
387
387
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Standard::MeasureTime::Instance
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::MeasureTime::Instance";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -267,13 +267,13 @@
267
267
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
268
268
  <span class='ivar'>@eff</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="../../../Ruff.html#instance-class_method" title="Ruff.instance (method)">instance</a></span></span>
269
269
  <span class='ivar'>@handler</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_handler'><span class='object_link'><a href="../../../Ruff.html#handler-class_method" title="Ruff.handler (method)">handler</a></span></span>
270
- <span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='ivar'>@eff</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_label'>label</span><span class='op'>|</span>
270
+ <span class='ivar'>@handler</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='ivar'>@eff</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_label'>label</span><span class='op'>|</span>
271
271
  <span class='id identifier rubyid_t1'>t1</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
272
272
  <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
273
273
  <span class='id identifier rubyid_t2'>t2</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
274
274
  <span class='id identifier rubyid_result'>result</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='lbrace'>{</span> <span class='label'>label:</span> <span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='label'>time:</span> <span class='id identifier rubyid_t2'>t2</span> <span class='op'>-</span> <span class='id identifier rubyid_t1'>t1</span> <span class='rbrace'>}</span><span class='rbracket'>]</span>
275
275
  <span class='kw'>end</span>
276
- <span class='period'>.</span><span class='id identifier rubyid_to'>to</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='id identifier rubyid_x'>x</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
276
+ <span class='ivar'>@handler</span><span class='period'>.</span><span class='id identifier rubyid_to'>to</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='id identifier rubyid_x'>x</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
277
277
  <span class='kw'>end</span></pre>
278
278
  </td>
279
279
  </tr>
@@ -489,9 +489,9 @@ It still has the possibility to invoke effects(<code>e</code>).</p>
489
489
  </div>
490
490
 
491
491
  <div id="footer">
492
- Generated on Wed Oct 30 01:51:52 2019 by
492
+ Generated on Thu Jan 2 19:46:23 2020 by
493
493
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
494
- 0.9.20 (ruby-2.6.5).
494
+ 0.9.22 (ruby-2.6.5).
495
495
  </div>
496
496
 
497
497
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Standard::State
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::State";
19
19
  relpath = '../../';
20
20
  </script>
@@ -589,9 +589,9 @@ and the implementation of the mutable cell or so-called <em>state</em> .</p>
589
589
  </div>
590
590
 
591
591
  <div id="footer">
592
- Generated on Wed Oct 30 01:51:52 2019 by
592
+ Generated on Thu Jan 2 19:46:23 2020 by
593
593
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
594
- 0.9.20 (ruby-2.6.5).
594
+ 0.9.22 (ruby-2.6.5).
595
595
  </div>
596
596
 
597
597
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Standard::State::Instance
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::State::Instance";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -798,9 +798,9 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
798
798
  </div>
799
799
 
800
800
  <div id="footer">
801
- Generated on Wed Oct 30 01:51:52 2019 by
801
+ Generated on Thu Jan 2 19:46:23 2020 by
802
802
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
803
- 0.9.20 (ruby-2.6.5).
803
+ 0.9.22 (ruby-2.6.5).
804
804
  </div>
805
805
 
806
806
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Throws
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Throws";
19
19
  relpath = '../';
20
20
  </script>
@@ -74,11 +74,6 @@
74
74
 
75
75
 
76
76
 
77
- <dl>
78
- <dt>Included in:</dt>
79
- <dd><span class='object_link'><a href="Handler.html" title="Ruff::Handler (class)">Handler</a></span></dd>
80
- </dl>
81
-
82
77
 
83
78
 
84
79
  <dl>
@@ -110,9 +105,9 @@
110
105
  </div>
111
106
 
112
107
  <div id="footer">
113
- Generated on Wed Oct 30 01:51:52 2019 by
108
+ Generated on Thu Jan 2 19:46:22 2020 by
114
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
115
- 0.9.20 (ruby-2.6.5).
110
+ 0.9.22 (ruby-2.6.5).
116
111
  </div>
117
112
 
118
113
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Throws::Eff
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Throws::Eff";
19
19
  relpath = '../../';
20
20
  </script>
@@ -355,9 +355,9 @@
355
355
  </div>
356
356
 
357
357
  <div id="footer">
358
- Generated on Wed Oct 30 01:51:52 2019 by
358
+ Generated on Thu Jan 2 19:46:23 2020 by
359
359
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
360
- 0.9.20 (ruby-2.6.5).
360
+ 0.9.22 (ruby-2.6.5).
361
361
  </div>
362
362
 
363
363
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Throws::Resend
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Throws::Resend";
19
19
  relpath = '../../';
20
20
  </script>
@@ -355,9 +355,9 @@
355
355
  </div>
356
356
 
357
357
  <div id="footer">
358
- Generated on Wed Oct 30 01:51:52 2019 by
358
+ Generated on Thu Jan 2 19:46:23 2020 by
359
359
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
360
- 0.9.20 (ruby-2.6.5).
360
+ 0.9.22 (ruby-2.6.5).
361
361
  </div>
362
362
 
363
363
  </div>
@@ -4,15 +4,15 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
- Ruff 1.3.1 Documentation
7
+ Ruff 1.4.0 Documentation
8
8
 
9
9
  </title>
10
10
 
11
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
12
12
 
13
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
14
14
 
15
- <script type="text/javascript" charset="utf-8">
15
+ <script type="text/javascript">
16
16
  pathId = null;
17
17
  relpath = '';
18
18
  </script>
@@ -52,7 +52,7 @@
52
52
  <div class="clear"></div>
53
53
  </div>
54
54
 
55
- <div id="content"><h1 class="noborder title">Ruff 1.3.1 Documentation</h1>
55
+ <div id="content"><h1 class="noborder title">Ruff 1.4.0 Documentation</h1>
56
56
  <div id="listing">
57
57
  <h1 class="alphaindex">Alphabetic Index</h1>
58
58
 
@@ -291,9 +291,9 @@
291
291
  </div>
292
292
 
293
293
  <div id="footer">
294
- Generated on Wed Oct 30 01:51:52 2019 by
294
+ Generated on Thu Jan 2 19:46:22 2020 by
295
295
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
296
- 0.9.20 (ruby-2.6.5).
296
+ 0.9.22 (ruby-2.6.5).
297
297
  </div>
298
298
 
299
299
  </div>
@@ -4,9 +4,9 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
6
6
 
7
- <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
8
8
 
9
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
10
10
 
11
11
 
12
12
 
@@ -422,8 +422,8 @@ li.r2 { background: #fafafa; }
422
422
  #toc ol { padding-left: 1.8em; }
423
423
  #toc li { font-size: 1.1em; line-height: 1.7em; }
424
424
  #toc > ol > li { font-size: 1.1em; font-weight: bold; }
425
- #toc ol > ol { font-size: 0.9em; }
426
- #toc ol ol > ol { padding-left: 2.3em; }
425
+ #toc ol > li > ol { font-size: 0.9em; }
426
+ #toc ol ol > li > ol { padding-left: 2.3em; }
427
427
  #toc ol + li { margin-top: 0.3em; }
428
428
  #toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
429
429
  #toc.hidden:hover { background: #fafafa; }
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "README";
19
19
  relpath = '';
20
20
  </script>
@@ -61,28 +61,33 @@
61
61
 
62
62
  <p><a href="https://badge.fury.io/rb/ruff"><img src="https://badge.fury.io/rb/ruff.svg" alt="Gem Version"></a></p>
63
63
 
64
+ <ul>
65
+ <li><a href="https://github.com/Nymphium/ruff">source</a></li>
66
+ <li><a href="https://nymphium.github.io/ruff">documentation</a></li>
67
+ </ul>
68
+
64
69
  <p>ONE-SHOT Algebraic Effects Library for Ruby!</p>
65
70
 
66
71
  <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ruff</span><span class='tstring_end'>&quot;</span></span>
67
72
 
68
- <span class='id identifier rubyid_double'>double</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Ruff.html#instance-class_method" title="Ruff.instance (method)">instance</a></span></span>
69
- <span class='id identifier rubyid_triple'>triple</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Ruff.html#instance-class_method" title="Ruff.instance (method)">instance</a></span></span>
70
- <span class='id identifier rubyid_log'>log</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Ruff.html#instance-class_method" title="Ruff.instance (method)">instance</a></span></span>
73
+ <span class='const'>Double</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Ruff.html#instance-class_method" title="Ruff.instance (method)">instance</a></span></span>
74
+ <span class='const'>Triple</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Ruff.html#instance-class_method" title="Ruff.instance (method)">instance</a></span></span>
75
+ <span class='const'>Log</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Ruff.html#instance-class_method" title="Ruff.instance (method)">instance</a></span></span>
71
76
 
72
77
  <span class='id identifier rubyid_h1'>h1</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_handler'><span class='object_link'><a href="Ruff.html#handler-class_method" title="Ruff.handler (method)">handler</a></span></span>
73
- <span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_double'>double</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <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='int'>2</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
74
- <span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_triple'>triple</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <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='int'>3</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
78
+ <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_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <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='int'>2</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
79
+ <span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='const'>Triple</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <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='int'>3</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
75
80
 
76
- <span class='id identifier rubyid_h2'>h2</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_handler'><span class='object_link'><a href="Ruff.html#handler-class_method" title="Ruff.handler (method)">handler</a></span></span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_log'>log</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='op'>|</span>
81
+ <span class='id identifier rubyid_h2'>h2</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_handler'><span class='object_link'><a href="Ruff.html#handler-class_method" title="Ruff.handler (method)">handler</a></span></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_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='op'>|</span>
77
82
  <span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
78
83
  <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>
79
84
  <span class='rbrace'>}</span>
80
85
 
81
86
  <span class='id identifier rubyid_h1'>h1</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lbrace'>{</span>
82
87
  <span class='id identifier rubyid_h2'>h2</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lbrace'>{</span>
83
- <span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='id identifier rubyid_double'>double</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='int'>2</span>
84
- <span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span> <span class='op'>+</span> <span class='int'>2</span><span class='rparen'>)</span>
85
- <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_triple'>triple</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='int'>3</span>
88
+ <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'>2</span>
89
+ <span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span> <span class='op'>+</span> <span class='int'>2</span><span class='rparen'>)</span>
90
+ <span class='id identifier rubyid_puts'>puts</span> <span class='const'>Triple</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='int'>3</span>
86
91
  <span class='rbrace'>}</span>
87
92
  <span class='rbrace'>}</span>
88
93
  <span class='comment'># ==&gt; prints
@@ -90,56 +95,34 @@
90
95
  </span><span class='comment'># logger: 6
91
96
  </span></code></pre>
92
97
 
93
- <h1>pre-defined effect and handlers</h1>
98
+ <h1>Feature</h1>
94
99
 
95
- <p>They have <code>with</code> method to handle the effects, and <code>Instance</code> class to instanciate and handle the indivisual effect objects.</p>
96
-
97
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ruff</span><span class='tstring_end'>&quot;</span></span>
98
- <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ruff/standard</span><span class='tstring_end'>&quot;</span></span>
100
+ <h2><strong><em>One-shot</em></strong> algebraic effects</h2>
99
101
 
100
- <span class='id identifier rubyid_include'>include</span> <span class='const'><span class='object_link'><a href="Ruff.html" title="Ruff (module)">Ruff</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ruff/Standard.html" title="Ruff::Standard (module)">Standard</a></span></span>
102
+ <p>You can access the delimited continuation which can run only once.
103
+ Even the limitation exists, you can write powerful control flow manipulation, like async/await, call1cc.</p>
101
104
 
102
- <span class='const'>Defer</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span> <span class='lbrace'>{</span>
103
- <span class='id identifier rubyid_state1'>state1</span> <span class='op'>=</span> <span class='const'>State</span><span class='op'>::</span><span class='const'>Instance</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
104
- <span class='id identifier rubyid_state2'>state2</span> <span class='op'>=</span> <span class='const'>State</span><span class='op'>::</span><span class='const'>Instance</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
105
+ <p>We have an formal definition for the implementation, by showing a conversion from algebraic effects and handlers to asymmetric coroutines.
106
+ See <a href="https://nymphium.github.io/2018/12/09/asymmetric-coroutines%E3%81%AB%E3%82%88%E3%82%8Boneshot-algebraic-effects%E3%81%AE%E5%AE%9F%E8%A3%85.html">here</a> (in Japanese).</p>
105
107
 
106
- <span class='id identifier rubyid_state1'>state1</span><span class='period'>.</span><span class='id identifier rubyid_with_init'>with_init</span><span class='lparen'>(</span><span class='int'>10</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
107
- <span class='const'>CurrentTime</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span> <span class='lbrace'>{</span>
108
- <span class='id identifier rubyid_puts'>puts</span> <span class='const'>CurrentTime</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
109
- <span class='rbrace'>}</span>
108
+ <h2>Subtyping on effects</h2>
110
109
 
111
- <span class='id identifier rubyid_state2'>state2</span><span class='period'>.</span><span class='id identifier rubyid_with_init'>with_init</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span>
112
- <span class='int'>3</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span><span class='lbrace'>{</span>
113
- <span class='id identifier rubyid_state1'>state1</span><span class='period'>.</span><span class='id identifier rubyid_modify'>modify</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='id identifier rubyid_s'>s</span> <span class='op'>+</span> <span class='int'>1</span> <span class='rbrace'>}</span>
114
- <span class='id identifier rubyid_state2'>state2</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_state1'>state1</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='embexpr_end'>}</span><span class='tstring_content'>!</span><span class='tstring_end'>&quot;</span></span>
110
+ <p>You can define an <em>sub</em> effect for another effect.
111
+ It enables to make an effect hierarchy, such as <code>Exception</code>s in Java.
112
+ This implementation is based on a calculus λ<sub>σ<sub>&lt;:</sub></sub> <a href="https://nymphium.github.io/2019/12/22/effsub.html">(Description (in Japanese))</a>.</p>
115
113
 
116
- <span class='id identifier rubyid_s1'>s1</span> <span class='op'>=</span> <span class='id identifier rubyid_state1'>state1</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
117
- <span class='id identifier rubyid_s2'>s2</span> <span class='op'>=</span> <span class='id identifier rubyid_state2'>state2</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
114
+ <h1>Pre-defined effect and handlers</h1>
118
115
 
119
- <span class='const'>Defer</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span> <span class='lbrace'>{</span>
120
- <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_s1'>s1</span><span class='comma'>,</span> <span class='id identifier rubyid_s2'>s2</span>
121
- <span class='rbrace'>}</span>
122
- <span class='rbrace'>}</span>
123
- <span class='rbrace'>}</span>
124
- <span class='rbrace'>}</span>
125
- <span class='rbrace'>}</span>
126
-
127
- <span class='comment'># ==&gt;
128
- </span><span class='comment'># 2019-10-03 03:24:34 +0900
129
- </span><span class='comment'># 13
130
- </span><span class='comment'># 13!
131
- </span><span class='comment'># 12
132
- </span><span class='comment'># 12!
133
- </span><span class='comment'># 11
134
- </span><span class='comment'># 11!
135
- </span></code></pre>
116
+ <p>We provide some ready-to-use effect and handlers.
117
+ You can use quickly powerful control flows.</p>
136
118
 
137
119
  <ul>
138
- <li><code>Ruff::Standard::State</code></li>
139
- <li><code>Ruff::Standard::Defer</code></li>
140
- <li><code>Ruff::Standard::CurrentTime</code></li>
141
- <li><code>Ruff::Standard::MeasureTime</code></li>
142
- <li><code>Ruff::Standard::Async</code></li>
120
+ <li><a href="https://nymphium.github.io/ruff/Ruff/Standard/State.html"><code>Ruff::Standard::State</code></a></li>
121
+ <li><a href="https://nymphium.github.io/ruff/Ruff/Standard/Defer.html"><code>Ruff::Standard::Defer</code></a></li>
122
+ <li><a href="https://nymphium.github.io/ruff/Ruff/Standard/CurrentTime.html"><code>Ruff::Standard::CurrentTime</code></a></li>
123
+ <li><a href="https://nymphium.github.io/ruff/Ruff/Standard/MeasureTime.html"><code>Ruff::Standard::MeasureTime</code></a></li>
124
+ <li><a href="https://nymphium.github.io/ruff/Ruff/Standard/Async.html"><code>Ruff::Standard::Async</code></a></li>
125
+ <li><a href="https://nymphium.github.io/ruff/Ruff/Standard/Call1cc.html"><code>Ruff::Standard::Call1cc</code></a></li>
143
126
  </ul>
144
127
 
145
128
  <h1>LICENSE</h1>
@@ -148,9 +131,9 @@
148
131
  </div></div>
149
132
 
150
133
  <div id="footer">
151
- Generated on Wed Oct 30 01:51:52 2019 by
134
+ Generated on Thu Jan 2 19:46:22 2020 by
152
135
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
153
- 0.9.20 (ruby-2.6.5).
136
+ 0.9.22 (ruby-2.6.5).
154
137
  </div>
155
138
 
156
139
  </div>