ruff 1.0.1 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 159e9448a5b85007d17d0c5a53ede55d57c8cbb6a7b2961e1b0fac2bb0f913b2
4
- data.tar.gz: 5136d5274bc2df709259a46e3eb2865a636fcd5a5e8f36c8d3acd845c288bfdd
3
+ metadata.gz: d7f3ee79cb42e509a2fc3410d95c7d197b39883758ea0fb81d46bea40e136a01
4
+ data.tar.gz: df62872b62ab83ca644d0d61bc1187d52d2f96fb2f9f85c9c38bee56f232eb58
5
5
  SHA512:
6
- metadata.gz: 52ea13247d42472813938758293eedd7dfba2017259ff584999c096bca2c1cc770f35354164beb80ae0c8e66208ee043c112f98642e67d20b45b97df5d80e4ca
7
- data.tar.gz: 12eb15bc6420c1041e8cf09ad47f323c63b5f3243c756e902be81d6678b55c7388f320087a096392335f9ceec0f1502e8a7b22e4fbda88554f99df12e116be4d
6
+ metadata.gz: e62ad575dd7fead1098b6cae54d66b5525128e593c50e4b54808f23e9d4206514e75747a65a50e500f457ada6991c4a4b075381009d1aa049d2deb2869ab8a91
7
+ data.tar.gz: 5d52c47183e2dcfcae02614d4ee9dcbee3ce596f8cd282c993221f8167959c4e76d69fd37f8aa6046594b4afc8245b26334faa685a8da16dccbbb5cb15171d25
data/.rubocop.yml CHANGED
@@ -1 +1,18 @@
1
- # inherit_from: .rubocop_todo.yml
1
+ Metrics/LineLength:
2
+ Max: 100
3
+
4
+ Metrics/MethodLength:
5
+ Max: 40
6
+
7
+ Naming/UncommunicativeMethodParamName:
8
+ MinNameLength: 1
9
+
10
+ Style/MultilineBlockChain:
11
+ Enabled: false
12
+
13
+ Style/Documentation:
14
+ Enabled: false
15
+
16
+ Style/ClassAndModuleChildren:
17
+ Enabled: false
18
+
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruff (1.0.0)
4
+ ruff (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -77,20 +77,9 @@ Defer.with {
77
77
  # 11!
78
78
  ```
79
79
 
80
- ## `Ruff::Standard::State`
81
- ### `with_init`
82
- <!-- This method handles state-like effects like `with` , but it requires initial state. -->
83
- <!-- `with { task }` is short hand for `with_init(0) { task }` . -->
84
-
85
- ### `get`
86
- ### `put`
87
- ### `modify`
88
-
89
- ## `Ruff::Standard::Defer`
90
- ### `register`
91
-
92
- ## `Ruff::Standard::CurrentTime`
93
- ### `get`
80
+ - `Ruff::Standard::State`
81
+ - `Ruff::Standard::Defer`
82
+ - `Ruff::Standard::CurrentTime`
94
83
 
95
84
  # LICENSE
96
85
  MIT
data/docs/Ruff.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Ruff
8
8
 
9
- &mdash; Ruff 1.0.0 Documentation
9
+ &mdash; Ruff 1.0.1 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'>&#39;</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
112
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>1.0.1</span><span class='tstring_end'>&#39;</span></span></pre></dd>
113
113
 
114
114
  </dl>
115
115
 
@@ -301,7 +301,7 @@
301
301
  </div>
302
302
 
303
303
  <div id="footer">
304
- Generated on Thu Oct 3 05:05:04 2019 by
304
+ Generated on Fri Oct 4 13:57:07 2019 by
305
305
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
306
306
  0.9.20 (ruby-2.6.4).
307
307
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Ruff::Effect
8
8
 
9
- &mdash; Ruff 1.0.0 Documentation
9
+ &mdash; Ruff 1.0.1 Documentation
10
10
 
11
11
  </title>
12
12
 
@@ -404,7 +404,7 @@
404
404
  </div>
405
405
 
406
406
  <div id="footer">
407
- Generated on Thu Oct 3 05:05:04 2019 by
407
+ Generated on Fri Oct 4 13:57:07 2019 by
408
408
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
409
409
  0.9.20 (ruby-2.6.4).
410
410
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Ruff::Handler
8
8
 
9
- &mdash; Ruff 1.0.0 Documentation
9
+ &mdash; Ruff 1.0.1 Documentation
10
10
 
11
11
  </title>
12
12
 
@@ -132,6 +132,28 @@
132
132
  <li class="public ">
133
133
  <span class="summary_signature">
134
134
 
135
+ <a href="#handlers=-instance_method" title="#handlers= (instance method)">#<strong>handlers=</strong>(handlers) &#x21d2; Object </a>
136
+
137
+
138
+
139
+ </span>
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'></div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
135
157
  <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Handler </a>
136
158
 
137
159
 
@@ -271,13 +293,13 @@ Value handler is set <code>id</code> function to by default.</p>
271
293
  <pre class="lines">
272
294
 
273
295
 
296
+ 16
274
297
  17
275
298
  18
276
- 19
277
- 20</pre>
299
+ 19</pre>
278
300
  </td>
279
301
  <td>
280
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 17</span>
302
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 16</span>
281
303
 
282
304
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
283
305
  <span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
@@ -296,7 +318,37 @@ Value handler is set <code>id</code> function to by default.</p>
296
318
 
297
319
 
298
320
  <div class="method_details first">
299
- <h3 class="signature first" id="on-instance_method">
321
+ <h3 class="signature first" id="handlers=-instance_method">
322
+
323
+ #<strong>handlers=</strong>(handlers) &#x21d2; <tt>Object</tt>
324
+
325
+
326
+
327
+
328
+
329
+ </h3><table class="source_code">
330
+ <tr>
331
+ <td>
332
+ <pre class="lines">
333
+
334
+
335
+ 112
336
+ 113
337
+ 114</pre>
338
+ </td>
339
+ <td>
340
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 112</span>
341
+
342
+ <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
+ <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>
344
+ <span class='kw'>end</span></pre>
345
+ </td>
346
+ </tr>
347
+ </table>
348
+ </div>
349
+
350
+ <div class="method_details ">
351
+ <h3 class="signature " id="on-instance_method">
300
352
 
301
353
  #<strong>on</strong>(eff, &amp;fun) &#x21d2; <tt><span class='object_link'><a href="" title="Ruff::Handler (class)">Handler</a></span>&lt;A!{<span class='object_link'><a href="Effect.html" title="Ruff::Effect (class)">Effect</a></span>&lt;Arg, Ret&gt;, e}, B!{e}&gt;</tt>
302
354
 
@@ -384,14 +436,14 @@ to go back to the handled computation.</p>
384
436
  <pre class="lines">
385
437
 
386
438
 
439
+ 77
387
440
  78
388
441
  79
389
442
  80
390
- 81
391
- 82</pre>
443
+ 81</pre>
392
444
  </td>
393
445
  <td>
394
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 78</span>
446
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 77</span>
395
447
 
396
448
  <span class='kw'>def</span> <span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_eff'>eff</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_fun'>fun</span><span class='rparen'>)</span>
397
449
  <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_eff'>eff</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
@@ -475,7 +527,8 @@ to go back to the handled computation.</p>
475
527
 
476
528
 
477
529
  &mdash;
478
- <div class='inline'><p>a value modified by value handler <code>Proc&lt;A, B&gt;</code> , or returned from the effect handler throwing continuation away</p>
530
+ <div class='inline'><p>a value modified by value handler <code>Proc&lt;A, B&gt;</code> ,
531
+ or returned from the effect handler throwing continuation away</p>
479
532
  </div>
480
533
 
481
534
  </li>
@@ -488,113 +541,19 @@ to go back to the handled computation.</p>
488
541
  <pre class="lines">
489
542
 
490
543
 
544
+ 106
491
545
  107
492
546
  108
493
547
  109
494
- 110
495
- 111
496
- 112
497
- 113
498
- 114
499
- 115
500
- 116
501
- 117
502
- 118
503
- 119
504
- 120
505
- 121
506
- 122
507
- 123
508
- 124
509
- 125
510
- 126
511
- 127
512
- 128
513
- 129
514
- 130
515
- 131
516
- 132
517
- 133
518
- 134
519
- 135
520
- 136
521
- 137
522
- 138
523
- 139
524
- 140
525
- 141
526
- 142
527
- 143
528
- 144
529
- 145
530
- 146
531
- 147
532
- 148
533
- 149
534
- 150
535
- 151
536
- 152
537
- 153
538
- 154
539
- 155
540
- 156
541
- 157
542
- 158</pre>
548
+ 110</pre>
543
549
  </td>
544
550
  <td>
545
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 107</span>
551
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 106</span>
546
552
 
547
553
  <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
548
- <span class='id identifier rubyid_co'>co</span> <span class='op'>=</span> <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='op'>&amp;</span><span class='id identifier rubyid_prc'>prc</span>
549
- <span class='id identifier rubyid_continue'>continue</span> <span class='op'>=</span> <span class='kw'>nil</span>
550
- <span class='id identifier rubyid_rehandles'>rehandles</span> <span class='op'>=</span> <span class='kw'>nil</span>
551
-
552
- <span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span>
553
- <span class='kw'>case</span> <span class='id identifier rubyid_r'>r</span>
554
- <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="Throws/Eff.html" title="Ruff::Throws::Eff (class)">Eff</a></span></span>
555
- <span class='kw'>if</span> <span class='id identifier rubyid_effh'>effh</span> <span class='op'>=</span> <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span>
556
- <span class='id identifier rubyid_effh'>effh</span><span class='lbracket'>[</span><span class='id identifier rubyid_continue'>continue</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='rbracket'>]</span>
557
- <span class='kw'>else</span>
558
- <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span> <span class='const'><span class='object_link'><a href="Throws/Resend.html" title="Ruff::Throws::Resend (class)">Resend</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Throws/Resend.html#initialize-instance_method" title="Ruff::Throws::Resend#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_continue'>continue</span><span class='rparen'>)</span>
559
- <span class='kw'>end</span>
560
- <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="Throws/Resend.html" title="Ruff::Throws::Resend (class)">Resend</a></span></span> <span class='kw'>then</span>
561
- <span class='id identifier rubyid_eff'>eff</span> <span class='op'>=</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_eff'>eff</span>
562
- <span class='id identifier rubyid_next_k'>next_k</span> <span class='op'>=</span> <span class='id identifier rubyid_rehandles'>rehandles</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span>
563
-
564
- <span class='kw'>if</span> <span class='id identifier rubyid_effh'>effh</span> <span class='op'>=</span> <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_eff'>eff</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span>
565
- <span class='id identifier rubyid_effh'>effh</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_next_k'>next_k</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_eff'>eff</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
566
- <span class='kw'>else</span>
567
- <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span> <span class='const'><span class='object_link'><a href="Throws/Resend.html" title="Ruff::Throws::Resend (class)">Resend</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Throws/Resend.html#initialize-instance_method" title="Ruff::Throws::Resend#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_eff'>eff</span><span class='comma'>,</span> <span class='id identifier rubyid_next_k'>next_k</span><span class='rparen'>)</span>
568
- <span class='kw'>end</span>
569
- <span class='kw'>else</span>
570
- <span class='ivar'>@valh</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='rparen'>)</span>
571
- <span class='kw'>end</span>
572
- <span class='rbrace'>}</span>
573
-
574
- <span class='id identifier rubyid_rehandles'>rehandles</span> <span class='op'>=</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
575
- <span class='id identifier rubyid_newh'>newh</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
576
- <span class='kw'>def</span> <span class='id identifier rubyid_newh'>newh</span><span class='period'>.</span><span class='id identifier rubyid_add_handler'>add_handler</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='rparen'>)</span>
577
- <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_h'>h</span>
578
- <span class='kw'>end</span>
579
-
580
- <span class='ivar'>@handlers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='op'>|</span>
581
- <span class='id identifier rubyid_newh'>newh</span><span class='period'>.</span><span class='id identifier rubyid_add_handler'>add_handler</span> <span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span>
582
- <span class='kw'>end</span>
583
-
584
- <span class='kw'>class</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_newh'>newh</span>
585
- <span class='kw'>undef</span> <span class='id identifier rubyid_add_handler'>add_handler</span>
586
- <span class='kw'>end</span>
587
-
588
- <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='op'>|</span>
589
- <span class='id identifier rubyid_continue'>continue</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_newh'>newh</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
590
- <span class='rbrace'>}</span>
591
- <span class='rbrace'>}</span>
592
-
593
- <span class='id identifier rubyid_continue'>continue</span> <span class='op'>=</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_arg'>arg</span><span class='op'>|</span>
594
- <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_co'>co</span><span class='period'>.</span><span class='id identifier rubyid_resume'>resume</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span><span class='rparen'>)</span>
595
- <span class='rbrace'>}</span>
554
+ <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'>&amp;</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
596
555
 
597
- <span class='id identifier rubyid_continue'>continue</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='rparen'>)</span>
556
+ <span class='id identifier rubyid_continue'>continue</span><span class='lparen'>(</span><span class='id identifier rubyid_co'>co</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='rparen'>)</span>
598
557
  <span class='kw'>end</span></pre>
599
558
  </td>
600
559
  </tr>
@@ -617,7 +576,8 @@ to go back to the handled computation.</p>
617
576
  <p>Value handler is the handler for <em>the result value of the computation</em>.
618
577
  For example, <code>Handler.new.to{|_x| 0}.run { value }</code> results in <code>0</code> .</p>
619
578
 
620
- <p>The value handler modifies the result of the call of continuation in effect handlers of the handler.</p>
579
+ <p>The value handler modifies the result of the call of continuation
580
+ in effect handlers of the handler.</p>
621
581
 
622
582
 
623
583
  </div>
@@ -691,14 +651,14 @@ For example, <code>Handler.new.to{|_x| 0}.run { value }</code> results in <code>
691
651
  <pre class="lines">
692
652
 
693
653
 
654
+ 55
694
655
  56
695
656
  57
696
657
  58
697
- 59
698
- 60</pre>
658
+ 59</pre>
699
659
  </td>
700
660
  <td>
701
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 56</span>
661
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 55</span>
702
662
 
703
663
  <span class='kw'>def</span> <span class='id identifier rubyid_to'>to</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_fun'>fun</span><span class='rparen'>)</span>
704
664
  <span class='ivar'>@valh</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
@@ -715,7 +675,7 @@ For example, <code>Handler.new.to{|_x| 0}.run { value }</code> results in <code>
715
675
  </div>
716
676
 
717
677
  <div id="footer">
718
- Generated on Thu Oct 3 05:05:04 2019 by
678
+ Generated on Fri Oct 4 13:57:07 2019 by
719
679
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
720
680
  0.9.20 (ruby-2.6.4).
721
681
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Ruff::Standard
8
8
 
9
- &mdash; Ruff 1.0.0 Documentation
9
+ &mdash; Ruff 1.0.1 Documentation
10
10
 
11
11
  </title>
12
12
 
@@ -83,7 +83,37 @@
83
83
 
84
84
  </div>
85
85
 
86
- <h2>Defined Under Namespace</h2>
86
+ <h2>Overview</h2><div class="docstring">
87
+ <div class="discussion">
88
+ <p><code>Ruff::Standard</code> provides several pre-defined effect handlers modules.
89
+ Each module provides <code>Instance</code> class to instantiate and handle the indivisual effect instances.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+ <div class="examples">
97
+ <p class="tag_title">Examples:</p>
98
+
99
+
100
+ <pre class="example code"><code><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'>Standard</span>
101
+
102
+ <span class='id identifier rubyid_state1'>state1</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Standard/State.html" title="Ruff::Standard::State (module)">State</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Standard/State/Instance.html" title="Ruff::Standard::State::Instance (class)">Instance</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Standard/State/Instance.html#initialize-instance_method" title="Ruff::Standard::State::Instance#initialize (method)">new</a></span></span>
103
+ <span class='id identifier rubyid_state2'>state2</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Standard/State.html" title="Ruff::Standard::State (module)">State</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Standard/State/Instance.html" title="Ruff::Standard::State::Instance (class)">Instance</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Standard/State/Instance.html#initialize-instance_method" title="Ruff::Standard::State::Instance#initialize (method)">new</a></span></span>
104
+
105
+ <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'>3</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
106
+ <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='int'>4</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
107
+ <span class='id identifier rubyid_state2'>state2</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='id identifier rubyid_state1'>state1</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span> <span class='rbrace'>}</span>
108
+
109
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_state1'>state1</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span> <span class='comment'>#==&gt; 3
110
+ </span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_state2'>state2</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span> <span class='comment'>#==&gt; 7
111
+ </span><span class='rbrace'>}</span><span class='rbrace'>}</span></code></pre>
112
+
113
+ </div>
114
+
115
+
116
+ </div><h2>Defined Under Namespace</h2>
87
117
  <p class="children">
88
118
 
89
119
 
@@ -105,7 +135,7 @@
105
135
  </div>
106
136
 
107
137
  <div id="footer">
108
- Generated on Thu Oct 3 05:05:04 2019 by
138
+ Generated on Fri Oct 4 13:57:07 2019 by
109
139
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
140
  0.9.20 (ruby-2.6.4).
111
141
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Ruff::Standard::CurrentTime
8
8
 
9
- &mdash; Ruff 1.0.0 Documentation
9
+ &mdash; Ruff 1.0.1 Documentation
10
10
 
11
11
  </title>
12
12
 
@@ -83,7 +83,26 @@
83
83
 
84
84
  </div>
85
85
 
86
- <h2>Defined Under Namespace</h2>
86
+ <h2>Overview</h2><div class="docstring">
87
+ <div class="discussion">
88
+ <p><code>CurrentTime</code> provides an effect <code>CurrentTime.eff</code> and the implementation returning <code>Time.now</code> .</p>
89
+
90
+ <p>The module has an instance of <code>Instance</code> and provides its methods as module method.</p>
91
+
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ <p class="tag_title">See Also:</p>
99
+ <ul class="see">
100
+
101
+ <li><span class='object_link'><a href="CurrentTime/Instance.html" title="Ruff::Standard::CurrentTime::Instance (class)">Instance</a></span></li>
102
+
103
+ </ul>
104
+
105
+ </div><h2>Defined Under Namespace</h2>
87
106
  <p class="children">
88
107
 
89
108
 
@@ -97,6 +116,38 @@
97
116
 
98
117
 
99
118
 
119
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
120
+ <ul class="summary">
121
+
122
+ <li class="public ">
123
+ <span class="summary_signature">
124
+
125
+ <a href="#eff-instance_method" title="#eff (instance method)">#<strong>eff</strong> &#x21d2; Object </a>
126
+
127
+
128
+
129
+ </span>
130
+
131
+
132
+
133
+
134
+ <span class="note title readonly">readonly</span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'></div></span>
145
+
146
+ </li>
147
+
148
+
149
+ </ul>
150
+
100
151
 
101
152
 
102
153
 
@@ -156,6 +207,59 @@
156
207
 
157
208
 
158
209
 
210
+ <div id="instance_attr_details" class="attr_details">
211
+ <h2>Instance Attribute Details</h2>
212
+
213
+
214
+ <span id=""></span>
215
+ <div class="method_details first">
216
+ <h3 class="signature first" id="eff-instance_method">
217
+
218
+ #<strong>eff</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
219
+
220
+
221
+
222
+
223
+
224
+ </h3><div class="docstring">
225
+ <div class="discussion">
226
+
227
+
228
+ </div>
229
+ </div>
230
+ <div class="tags">
231
+
232
+
233
+ <p class="tag_title">See Also:</p>
234
+ <ul class="see">
235
+
236
+ <li><span class='object_link'><a href="CurrentTime/Instance.html#eff-instance_method" title="Ruff::Standard::CurrentTime::Instance#eff (method)">Ruff::Standard::CurrentTime::Instance#eff</a></span></li>
237
+
238
+ </ul>
239
+
240
+ </div><table class="source_code">
241
+ <tr>
242
+ <td>
243
+ <pre class="lines">
244
+
245
+
246
+ 56
247
+ 57
248
+ 58</pre>
249
+ </td>
250
+ <td>
251
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 56</span>
252
+
253
+ <span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
254
+ <span class='ivar'>@eff</span>
255
+ <span class='kw'>end</span></pre>
256
+ </td>
257
+ </tr>
258
+ </table>
259
+ </div>
260
+
261
+ </div>
262
+
159
263
 
160
264
  <div id="class_method_details" class="method_details_list">
161
265
  <h2>Class Method Details</h2>
@@ -170,18 +274,34 @@
170
274
 
171
275
 
172
276
 
173
- </h3><table class="source_code">
277
+ </h3><div class="docstring">
278
+ <div class="discussion">
279
+
280
+
281
+ </div>
282
+ </div>
283
+ <div class="tags">
284
+
285
+
286
+ <p class="tag_title">See Also:</p>
287
+ <ul class="see">
288
+
289
+ <li><span class='object_link'><a href="CurrentTime/Instance.html#get-instance_method" title="Ruff::Standard::CurrentTime::Instance#get (method)">Ruff::Standard::CurrentTime::Instance#get</a></span></li>
290
+
291
+ </ul>
292
+
293
+ </div><table class="source_code">
174
294
  <tr>
175
295
  <td>
176
296
  <pre class="lines">
177
297
 
178
298
 
179
- 21
180
- 22
181
- 23</pre>
299
+ 44
300
+ 45
301
+ 46</pre>
182
302
  </td>
183
303
  <td>
184
- <pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 21</span>
304
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 44</span>
185
305
 
186
306
  <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
187
307
  <span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
@@ -200,21 +320,37 @@
200
320
 
201
321
 
202
322
 
203
- </h3><table class="source_code">
323
+ </h3><div class="docstring">
324
+ <div class="discussion">
325
+
326
+
327
+ </div>
328
+ </div>
329
+ <div class="tags">
330
+
331
+
332
+ <p class="tag_title">See Also:</p>
333
+ <ul class="see">
334
+
335
+ <li><span class='object_link'><a href="CurrentTime/Instance.html#with-instance_method" title="Ruff::Standard::CurrentTime::Instance#with (method)">Ruff::Standard::CurrentTime::Instance#with</a></span></li>
336
+
337
+ </ul>
338
+
339
+ </div><table class="source_code">
204
340
  <tr>
205
341
  <td>
206
342
  <pre class="lines">
207
343
 
208
344
 
209
- 25
210
- 26
211
- 27</pre>
345
+ 49
346
+ 50
347
+ 51</pre>
212
348
  </td>
213
349
  <td>
214
- <pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 25</span>
350
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/current_time.rb', line 49</span>
215
351
 
216
352
  <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>
217
- <span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span> <span class='op'>&amp;</span><span class='id identifier rubyid_th'>th</span>
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'>&amp;</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
218
354
  <span class='kw'>end</span></pre>
219
355
  </td>
220
356
  </tr>
@@ -226,7 +362,7 @@
226
362
  </div>
227
363
 
228
364
  <div id="footer">
229
- Generated on Thu Oct 3 05:05:04 2019 by
365
+ Generated on Fri Oct 4 13:57:07 2019 by
230
366
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
231
367
  0.9.20 (ruby-2.6.4).
232
368
  </div>