ruff 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +3 -0
- data/docs/Ruff.html +5 -5
- data/docs/Ruff/Effect.html +3 -3
- data/docs/Ruff/Handler.html +19 -8
- data/docs/Ruff/Standard.html +4 -4
- data/docs/Ruff/Standard/CurrentTime.html +12 -12
- data/docs/Ruff/Standard/CurrentTime/Instance.html +17 -15
- data/docs/Ruff/Standard/Defer.html +15 -15
- data/docs/Ruff/Standard/Defer/Instance.html +16 -10
- data/docs/Ruff/Standard/MeasureTime.html +389 -0
- data/docs/Ruff/Standard/MeasureTime/Instance.html +499 -0
- data/docs/Ruff/Standard/State.html +49 -27
- data/docs/Ruff/Standard/State/Instance.html +49 -47
- data/docs/Ruff/Throws.html +3 -3
- data/docs/Ruff/Throws/Eff.html +3 -3
- data/docs/Ruff/Throws/Resend.html +3 -3
- data/docs/_index.html +29 -7
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +3 -3
- data/docs/frames.html +1 -1
- data/docs/index.html +3 -3
- data/docs/method_list.html +74 -18
- data/docs/top-level-namespace.html +3 -3
- data/lib/ruff.rb +1 -1
- data/lib/ruff/standard.rb +2 -0
- data/lib/ruff/standard/current_time.rb +3 -2
- data/lib/ruff/standard/defer.rb +4 -1
- data/lib/ruff/standard/measure_time.rb +77 -0
- data/lib/ruff/standard/state.rb +17 -0
- data/lib/ruff/version.rb +1 -1
- data/version +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfebb70cd49dd7912799a61968e781995e766b2ebf9c31d9bcd0e37e906428bc
|
4
|
+
data.tar.gz: 688639673c9ca99111482a18aa8f4a18f4e1b450ad628eee645df6f0bfd57c0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76b93cc1a843dc47a00692e3ca4b011113e47d804bbe4e71c7933e8ca02a583f10b6632f10bac013035531294cdeaf6cee3a4c3e5768175e6e14a3c0cfe2ad93
|
7
|
+
data.tar.gz: 43f9b5c94fd98da4c9d1f248392cd775eab21110640fa963183a3a95802b7e90a95acb2a685c697244ebec8c0f5d70d5506ba66a3b83b6685dd5877d6b6b04a4
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
data/docs/Ruff.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ruff
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -109,7 +109,7 @@
|
|
109
109
|
<dt id="VERSION-constant" class="">VERSION =
|
110
110
|
|
111
111
|
</dt>
|
112
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0
|
112
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.1.0</span><span class='tstring_end'>'</span></span></pre></dd>
|
113
113
|
|
114
114
|
</dl>
|
115
115
|
|
@@ -263,7 +263,7 @@
|
|
263
263
|
<p class="tag_title">Examples:</p>
|
264
264
|
|
265
265
|
|
266
|
-
<pre class="example code"><code><span class='const'>Log</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span> <span class='comment'
|
266
|
+
<pre class="example code"><code><span class='const'>Log</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span> <span class='comment'>#==> Ruff::Effect.new</span></code></pre>
|
267
267
|
|
268
268
|
</div>
|
269
269
|
|
@@ -301,9 +301,9 @@
|
|
301
301
|
</div>
|
302
302
|
|
303
303
|
<div id="footer">
|
304
|
-
Generated on Fri Oct 4
|
304
|
+
Generated on Fri Oct 4 21:12:21 2019 by
|
305
305
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
306
|
-
0.9.20 (ruby-2.6.
|
306
|
+
0.9.20 (ruby-2.6.5).
|
307
307
|
</div>
|
308
308
|
|
309
309
|
</div>
|
data/docs/Ruff/Effect.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ruff::Effect
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -404,9 +404,9 @@
|
|
404
404
|
</div>
|
405
405
|
|
406
406
|
<div id="footer">
|
407
|
-
Generated on Fri Oct 4
|
407
|
+
Generated on Fri Oct 4 21:12:21 2019 by
|
408
408
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
409
|
-
0.9.20 (ruby-2.6.
|
409
|
+
0.9.20 (ruby-2.6.5).
|
410
410
|
</div>
|
411
411
|
|
412
412
|
</div>
|
data/docs/Ruff/Handler.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ruff::Handler
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -146,7 +146,8 @@
|
|
146
146
|
|
147
147
|
|
148
148
|
|
149
|
-
<span class="summary_desc"><div class='inline'
|
149
|
+
<span class="summary_desc"><div class='inline'><p>is also private method.</p>
|
150
|
+
</div></span>
|
150
151
|
|
151
152
|
</li>
|
152
153
|
|
@@ -326,18 +327,28 @@ Value handler is set <code>id</code> function to by default.</p>
|
|
326
327
|
|
327
328
|
|
328
329
|
|
329
|
-
</h3><
|
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">
|
330
341
|
<tr>
|
331
342
|
<td>
|
332
343
|
<pre class="lines">
|
333
344
|
|
334
345
|
|
335
|
-
112
|
336
346
|
113
|
337
|
-
114
|
347
|
+
114
|
348
|
+
115</pre>
|
338
349
|
</td>
|
339
350
|
<td>
|
340
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line
|
351
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 113</span>
|
341
352
|
|
342
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>
|
343
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>
|
@@ -675,9 +686,9 @@ in effect handlers of the handler.</p>
|
|
675
686
|
</div>
|
676
687
|
|
677
688
|
<div id="footer">
|
678
|
-
Generated on Fri Oct 4
|
689
|
+
Generated on Fri Oct 4 21:12:21 2019 by
|
679
690
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
680
|
-
0.9.20 (ruby-2.6.
|
691
|
+
0.9.20 (ruby-2.6.5).
|
681
692
|
</div>
|
682
693
|
|
683
694
|
</div>
|
data/docs/Ruff/Standard.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ruff::Standard
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -117,7 +117,7 @@ Each module provides <code>Instance</code> 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/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/State.html" title="Ruff::Standard::State (module)">State</a></span>
|
120
|
+
<strong class="modules">Modules:</strong> <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>
|
121
121
|
|
122
122
|
|
123
123
|
|
@@ -135,9 +135,9 @@ Each module provides <code>Instance</code> class to instantiate and handle the i
|
|
135
135
|
</div>
|
136
136
|
|
137
137
|
<div id="footer">
|
138
|
-
Generated on Fri Oct 4
|
138
|
+
Generated on Fri Oct 4 21:12:21 2019 by
|
139
139
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
|
-
0.9.20 (ruby-2.6.
|
140
|
+
0.9.20 (ruby-2.6.5).
|
141
141
|
</div>
|
142
142
|
|
143
143
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ruff::Standard::CurrentTime
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -243,12 +243,12 @@
|
|
243
243
|
<pre class="lines">
|
244
244
|
|
245
245
|
|
246
|
-
56
|
247
246
|
57
|
248
|
-
58
|
247
|
+
58
|
248
|
+
59</pre>
|
249
249
|
</td>
|
250
250
|
<td>
|
251
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line
|
251
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 57</span>
|
252
252
|
|
253
253
|
<span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
|
254
254
|
<span class='ivar'>@eff</span>
|
@@ -296,12 +296,12 @@
|
|
296
296
|
<pre class="lines">
|
297
297
|
|
298
298
|
|
299
|
-
44
|
300
299
|
45
|
301
|
-
46
|
300
|
+
46
|
301
|
+
47</pre>
|
302
302
|
</td>
|
303
303
|
<td>
|
304
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line
|
304
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 45</span>
|
305
305
|
|
306
306
|
<span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
|
307
307
|
<span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
|
@@ -342,12 +342,12 @@
|
|
342
342
|
<pre class="lines">
|
343
343
|
|
344
344
|
|
345
|
-
49
|
346
345
|
50
|
347
|
-
51
|
346
|
+
51
|
347
|
+
52</pre>
|
348
348
|
</td>
|
349
349
|
<td>
|
350
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line
|
350
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 50</span>
|
351
351
|
|
352
352
|
<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>
|
353
353
|
<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>
|
@@ -362,9 +362,9 @@
|
|
362
362
|
</div>
|
363
363
|
|
364
364
|
<div id="footer">
|
365
|
-
Generated on Fri Oct 4
|
365
|
+
Generated on Fri Oct 4 21:12:21 2019 by
|
366
366
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
367
|
-
0.9.20 (ruby-2.6.
|
367
|
+
0.9.20 (ruby-2.6.5).
|
368
368
|
</div>
|
369
369
|
|
370
370
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ruff::Standard::CurrentTime::Instance
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -251,13 +251,15 @@
|
|
251
251
|
|
252
252
|
10
|
253
253
|
11
|
254
|
-
12
|
254
|
+
12
|
255
|
+
13</pre>
|
255
256
|
</td>
|
256
257
|
<td>
|
257
258
|
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 10</span>
|
258
259
|
|
259
260
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
260
261
|
<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>
|
262
|
+
<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><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='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
261
263
|
<span class='kw'>end</span></pre>
|
262
264
|
</td>
|
263
265
|
</tr>
|
@@ -296,12 +298,12 @@
|
|
296
298
|
<pre class="lines">
|
297
299
|
|
298
300
|
|
299
|
-
36
|
300
301
|
37
|
301
|
-
38
|
302
|
+
38
|
303
|
+
39</pre>
|
302
304
|
</td>
|
303
305
|
<td>
|
304
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line
|
306
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 37</span>
|
305
307
|
|
306
308
|
<span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
|
307
309
|
<span class='ivar'>@eff</span>
|
@@ -360,12 +362,12 @@
|
|
360
362
|
<pre class="lines">
|
361
363
|
|
362
364
|
|
363
|
-
17
|
364
365
|
18
|
365
|
-
19
|
366
|
+
19
|
367
|
+
20</pre>
|
366
368
|
</td>
|
367
369
|
<td>
|
368
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line
|
370
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 18</span>
|
369
371
|
|
370
372
|
<span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
|
371
373
|
<span class='ivar'>@eff</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span>
|
@@ -401,7 +403,7 @@ This handler receives the <em>request</em> and returns current time.</p>
|
|
401
403
|
<span class='name'>th</span>
|
402
404
|
|
403
405
|
|
404
|
-
<span class='type'>(<tt>Proc<(), A
|
406
|
+
<span class='type'>(<tt>Proc<(), A!{<span class='object_link'><a href="../CurrentTime.html" title="Ruff::Standard::CurrentTime (module)">CurrentTime</a></span>.<span class='object_link'><a href="#eff-instance_method" title="Ruff::Standard::CurrentTime::Instance#eff (method)">eff</a></span>, e}></tt>)</span>
|
405
407
|
|
406
408
|
|
407
409
|
|
@@ -439,15 +441,15 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
|
|
439
441
|
<pre class="lines">
|
440
442
|
|
441
443
|
|
442
|
-
31
|
443
444
|
32
|
444
|
-
33
|
445
|
+
33
|
446
|
+
34</pre>
|
445
447
|
</td>
|
446
448
|
<td>
|
447
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line
|
449
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 32</span>
|
448
450
|
|
449
451
|
<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>
|
450
|
-
|
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'>&</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
|
451
453
|
<span class='kw'>end</span></pre>
|
452
454
|
</td>
|
453
455
|
</tr>
|
@@ -459,9 +461,9 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
|
|
459
461
|
</div>
|
460
462
|
|
461
463
|
<div id="footer">
|
462
|
-
Generated on Fri Oct 4
|
464
|
+
Generated on Fri Oct 4 21:12:21 2019 by
|
463
465
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
464
|
-
0.9.20 (ruby-2.6.
|
466
|
+
0.9.20 (ruby-2.6.5).
|
465
467
|
</div>
|
466
468
|
|
467
469
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ruff::Standard::Defer
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -244,12 +244,12 @@ and the implementation to defer procedures .</p>
|
|
244
244
|
<pre class="lines">
|
245
245
|
|
246
246
|
|
247
|
-
|
248
|
-
|
249
|
-
|
247
|
+
72
|
248
|
+
73
|
249
|
+
74</pre>
|
250
250
|
</td>
|
251
251
|
<td>
|
252
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line
|
252
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line 72</span>
|
253
253
|
|
254
254
|
<span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
|
255
255
|
<span class='ivar'>@eff</span>
|
@@ -297,12 +297,12 @@ and the implementation to defer procedures .</p>
|
|
297
297
|
<pre class="lines">
|
298
298
|
|
299
299
|
|
300
|
-
|
301
|
-
|
302
|
-
|
300
|
+
60
|
301
|
+
61
|
302
|
+
62</pre>
|
303
303
|
</td>
|
304
304
|
<td>
|
305
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line
|
305
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line 60</span>
|
306
306
|
|
307
307
|
<span class='kw'>def</span> <span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
|
308
308
|
<span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
|
@@ -343,12 +343,12 @@ and the implementation to defer procedures .</p>
|
|
343
343
|
<pre class="lines">
|
344
344
|
|
345
345
|
|
346
|
-
|
347
|
-
|
348
|
-
|
346
|
+
65
|
347
|
+
66
|
348
|
+
67</pre>
|
349
349
|
</td>
|
350
350
|
<td>
|
351
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line
|
351
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line 65</span>
|
352
352
|
|
353
353
|
<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>
|
354
354
|
<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>
|
@@ -363,9 +363,9 @@ and the implementation to defer procedures .</p>
|
|
363
363
|
</div>
|
364
364
|
|
365
365
|
<div id="footer">
|
366
|
-
Generated on Fri Oct 4
|
366
|
+
Generated on Fri Oct 4 21:12:21 2019 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.
|
368
|
+
0.9.20 (ruby-2.6.5).
|
369
369
|
</div>
|
370
370
|
|
371
371
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ruff::Standard::Defer::Instance
|
8
8
|
|
9
|
-
— Ruff 1.0
|
9
|
+
— Ruff 1.1.0 Documentation
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -296,12 +296,12 @@
|
|
296
296
|
<pre class="lines">
|
297
297
|
|
298
298
|
|
299
|
-
|
300
|
-
|
301
|
-
|
299
|
+
52
|
300
|
+
53
|
301
|
+
54</pre>
|
302
302
|
</td>
|
303
303
|
<td>
|
304
|
-
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line
|
304
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line 52</span>
|
305
305
|
|
306
306
|
<span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
|
307
307
|
<span class='ivar'>@eff</span>
|
@@ -467,7 +467,10 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
|
|
467
467
|
43
|
468
468
|
44
|
469
469
|
45
|
470
|
-
46
|
470
|
+
46
|
471
|
+
47
|
472
|
+
48
|
473
|
+
49</pre>
|
471
474
|
</td>
|
472
475
|
<td>
|
473
476
|
<pre class="code"><span class="info file"># File 'lib/ruff/standard/defer.rb', line 32</span>
|
@@ -476,14 +479,17 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
|
|
476
479
|
<span class='comment'># This is a stack to store deferred procedures.
|
477
480
|
</span> <span class='id identifier rubyid_procs'>procs</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
478
481
|
|
479
|
-
<span class='
|
482
|
+
<span class='comment'># The handler *closes* `procs` variable so it should be created every time.
|
483
|
+
</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>
|
480
484
|
<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_prc'>prc</span><span class='op'>|</span>
|
481
485
|
<span class='id identifier rubyid_procs'>procs</span> <span class='op'><<</span> <span class='id identifier rubyid_prc'>prc</span>
|
482
486
|
<span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
|
483
487
|
<span class='kw'>end</span>
|
484
|
-
<span class='period'>.</span><span class='id identifier rubyid_to'>to</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier
|
488
|
+
<span class='period'>.</span><span class='id identifier rubyid_to'>to</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
485
489
|
<span class='comment'># Like Go's defer functions, it crashes the thunk by reversed order.
|
486
490
|
</span> <span class='id identifier rubyid_procs'>procs</span><span class='period'>.</span><span class='id identifier rubyid_reverse_each'>reverse_each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:[]</span><span class='rparen'>)</span>
|
491
|
+
|
492
|
+
<span class='id identifier rubyid_v'>v</span>
|
487
493
|
<span class='kw'>end</span>
|
488
494
|
<span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
|
489
495
|
<span class='kw'>end</span></pre>
|
@@ -497,9 +503,9 @@ But it still has the possibility to invoke effects(<code>e</code>).</p>
|
|
497
503
|
</div>
|
498
504
|
|
499
505
|
<div id="footer">
|
500
|
-
Generated on Fri Oct 4
|
506
|
+
Generated on Fri Oct 4 21:12:21 2019 by
|
501
507
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
502
|
-
0.9.20 (ruby-2.6.
|
508
|
+
0.9.20 (ruby-2.6.5).
|
503
509
|
</div>
|
504
510
|
|
505
511
|
</div>
|