rushcheck 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/Rakefile +1 -1
  2. data/data/rushcheck/doc/policy.txt +107 -0
  3. data/data/rushcheck/doc/rushcheck.thtml +832 -0
  4. data/data/rushcheck/examples/candy.rb +6 -8
  5. data/data/rushcheck/examples/printf.rb +3 -3
  6. data/data/rushcheck/examples/proc.rb +4 -4
  7. data/data/rushcheck/examples/roguetile.rb +16 -16
  8. data/data/rushcheck/examples/sample.rb +10 -10
  9. data/data/rushcheck/rdoc/classes/Arbitrary.html +5 -5
  10. data/data/rushcheck/rdoc/classes/Arbitrary.src/M000082.html +18 -0
  11. data/data/rushcheck/rdoc/classes/Assertion.html +11 -11
  12. data/data/rushcheck/rdoc/classes/Assertion.src/M000019.html +20 -0
  13. data/data/rushcheck/rdoc/classes/Assertion.src/M000020.html +50 -0
  14. data/data/rushcheck/rdoc/classes/Coarbitrary.html +5 -5
  15. data/data/rushcheck/rdoc/classes/Coarbitrary.src/M000105.html +18 -0
  16. data/data/rushcheck/rdoc/classes/FalseClass.html +15 -15
  17. data/data/rushcheck/rdoc/classes/FalseClass.src/M000022.html +18 -0
  18. data/data/rushcheck/rdoc/classes/FalseClass.src/M000023.html +18 -0
  19. data/data/rushcheck/rdoc/classes/FalseClass.src/M000024.html +18 -0
  20. data/data/rushcheck/rdoc/classes/Float.html +20 -20
  21. data/data/rushcheck/rdoc/classes/Float.src/M000052.html +21 -0
  22. data/data/rushcheck/rdoc/classes/Float.src/M000053.html +18 -0
  23. data/data/rushcheck/rdoc/classes/Float.src/M000054.html +22 -0
  24. data/data/rushcheck/rdoc/classes/Float.src/M000055.html +20 -0
  25. data/data/rushcheck/rdoc/classes/Gen.html +102 -102
  26. data/data/rushcheck/rdoc/classes/Gen.src/M000030.html +4 -10
  27. data/data/rushcheck/rdoc/classes/Gen.src/M000031.html +29 -4
  28. data/data/rushcheck/rdoc/classes/Gen.src/M000032.html +6 -4
  29. data/data/rushcheck/rdoc/classes/Gen.src/M000033.html +14 -4
  30. data/data/rushcheck/rdoc/classes/Gen.src/M000034.html +10 -4
  31. data/data/rushcheck/rdoc/classes/Gen.src/M000035.html +4 -4
  32. data/data/rushcheck/rdoc/classes/Gen.src/M000036.html +4 -10
  33. data/data/rushcheck/rdoc/classes/Gen.src/M000037.html +4 -4
  34. data/data/rushcheck/rdoc/classes/Gen.src/M000038.html +4 -7
  35. data/data/rushcheck/rdoc/classes/Gen.src/M000039.html +4 -4
  36. data/data/rushcheck/rdoc/classes/Gen.src/M000040.html +10 -4
  37. data/data/rushcheck/rdoc/classes/Gen.src/M000041.html +4 -9
  38. data/data/rushcheck/rdoc/classes/Gen.src/M000042.html +7 -5
  39. data/data/rushcheck/rdoc/classes/Gen.src/M000043.html +4 -4
  40. data/data/rushcheck/rdoc/classes/Gen.src/M000044.html +4 -10
  41. data/data/rushcheck/rdoc/classes/Gen.src/M000045.html +23 -0
  42. data/data/rushcheck/rdoc/classes/Gen.src/M000046.html +19 -0
  43. data/data/rushcheck/rdoc/classes/Gen.src/M000047.html +18 -0
  44. data/data/rushcheck/rdoc/classes/Gen.src/M000048.html +24 -0
  45. data/data/rushcheck/rdoc/classes/Guard.html +10 -10
  46. data/data/rushcheck/rdoc/classes/Guard.src/M000028.html +27 -0
  47. data/data/rushcheck/rdoc/classes/Guard.src/M000029.html +18 -0
  48. data/data/rushcheck/rdoc/classes/HsRandom.html +20 -20
  49. data/data/rushcheck/rdoc/classes/HsRandom.src/M000088.html +22 -0
  50. data/data/rushcheck/rdoc/classes/HsRandom.src/M000089.html +32 -0
  51. data/data/rushcheck/rdoc/classes/HsRandom.src/M000090.html +18 -0
  52. data/data/rushcheck/rdoc/classes/Integer.html +20 -20
  53. data/data/rushcheck/rdoc/classes/Integer.src/M000010.html +18 -0
  54. data/data/rushcheck/rdoc/classes/Integer.src/M000011.html +18 -0
  55. data/data/rushcheck/rdoc/classes/Integer.src/M000012.html +21 -0
  56. data/data/rushcheck/rdoc/classes/Integer.src/M000013.html +19 -0
  57. data/data/rushcheck/rdoc/classes/NilClass.html +15 -15
  58. data/data/rushcheck/rdoc/classes/NilClass.src/M000064.html +18 -0
  59. data/data/rushcheck/rdoc/classes/NilClass.src/M000065.html +18 -0
  60. data/data/rushcheck/rdoc/classes/NilClass.src/M000066.html +18 -0
  61. data/data/rushcheck/rdoc/classes/Property.html +10 -10
  62. data/data/rushcheck/rdoc/classes/Property.src/M000077.html +26 -0
  63. data/data/rushcheck/rdoc/classes/Property.src/M000078.html +18 -0
  64. data/data/rushcheck/rdoc/classes/RandomArray.html +15 -15
  65. data/data/rushcheck/rdoc/classes/RandomArray.src/M000025.html +18 -0
  66. data/data/rushcheck/rdoc/classes/RandomArray.src/M000026.html +35 -0
  67. data/data/rushcheck/rdoc/classes/RandomArray.src/M000027.html +22 -0
  68. data/data/rushcheck/rdoc/classes/RandomBool.html +10 -10
  69. data/data/rushcheck/rdoc/classes/RandomBool.src/M000086.html +18 -0
  70. data/data/rushcheck/rdoc/classes/RandomBool.src/M000087.html +19 -0
  71. data/data/rushcheck/rdoc/classes/RandomGen.html +20 -20
  72. data/data/rushcheck/rdoc/classes/RandomGen.src/M000083.html +18 -0
  73. data/data/rushcheck/rdoc/classes/RandomGen.src/M000084.html +18 -0
  74. data/data/rushcheck/rdoc/classes/RandomGen.src/M000085.html +18 -0
  75. data/data/rushcheck/rdoc/classes/RandomHash.html +16 -16
  76. data/data/rushcheck/rdoc/classes/RandomHash.src/M000049.html +18 -0
  77. data/data/rushcheck/rdoc/classes/RandomHash.src/M000050.html +26 -0
  78. data/data/rushcheck/rdoc/classes/RandomHash.src/M000051.html +22 -0
  79. data/data/rushcheck/rdoc/classes/RandomProc.html +20 -20
  80. data/data/rushcheck/rdoc/classes/RandomProc.src/M000060.html +18 -0
  81. data/data/rushcheck/rdoc/classes/RandomProc.src/M000061.html +30 -0
  82. data/data/rushcheck/rdoc/classes/RandomProc.src/M000062.html +26 -0
  83. data/data/rushcheck/rdoc/classes/RandomProc.src/M000063.html +20 -0
  84. data/data/rushcheck/rdoc/classes/Result.html +19 -19
  85. data/data/rushcheck/rdoc/classes/Result.src/M000056.html +18 -0
  86. data/data/rushcheck/rdoc/classes/Result.src/M000057.html +18 -0
  87. data/data/rushcheck/rdoc/classes/Result.src/M000058.html +18 -0
  88. data/data/rushcheck/rdoc/classes/RushCheckConfig.html +41 -11
  89. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000001.html +1 -1
  90. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000002.html +1 -1
  91. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000003.html +8 -4
  92. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000004.html +4 -24
  93. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000005.html +22 -39
  94. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000006.html +55 -0
  95. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000007.html +50 -0
  96. data/data/rushcheck/rdoc/classes/SpecialString.html +5 -5
  97. data/data/rushcheck/rdoc/classes/SpecialString.src/M000021.html +37 -0
  98. data/data/rushcheck/rdoc/classes/StdGen.html +27 -27
  99. data/data/rushcheck/rdoc/classes/StdGen.src/M000014.html +9 -4
  100. data/data/rushcheck/rdoc/classes/StdGen.src/M000015.html +21 -0
  101. data/data/rushcheck/rdoc/classes/StdGen.src/M000016.html +21 -0
  102. data/data/rushcheck/rdoc/classes/StdGen.src/M000017.html +18 -0
  103. data/data/rushcheck/rdoc/classes/StdGen.src/M000018.html +18 -0
  104. data/data/rushcheck/rdoc/classes/String.html +20 -20
  105. data/data/rushcheck/rdoc/classes/String.src/M000073.html +24 -0
  106. data/data/rushcheck/rdoc/classes/String.src/M000074.html +18 -0
  107. data/data/rushcheck/rdoc/classes/String.src/M000075.html +25 -0
  108. data/data/rushcheck/rdoc/classes/String.src/M000076.html +22 -0
  109. data/data/rushcheck/rdoc/classes/TestExausted.html +113 -0
  110. data/data/rushcheck/rdoc/classes/TestFailed.html +155 -0
  111. data/data/rushcheck/rdoc/classes/TestFailed.src/M000067.html +18 -0
  112. data/data/rushcheck/rdoc/classes/TestOk.html +113 -0
  113. data/data/rushcheck/rdoc/classes/TestOptions.html +180 -0
  114. data/data/rushcheck/rdoc/classes/TestOptions.src/M000008.html +18 -0
  115. data/data/rushcheck/rdoc/classes/TestOptions.src/M000009.html +18 -0
  116. data/data/rushcheck/rdoc/classes/TestResult.html +164 -0
  117. data/data/rushcheck/rdoc/classes/TestResult.src/M000068.html +18 -0
  118. data/data/rushcheck/rdoc/classes/Testable.html +96 -51
  119. data/data/rushcheck/rdoc/classes/Testable.src/M000091.html +4 -4
  120. data/data/rushcheck/rdoc/classes/Testable.src/M000092.html +4 -4
  121. data/data/rushcheck/rdoc/classes/Testable.src/M000095.html +4 -4
  122. data/data/rushcheck/rdoc/classes/Testable.src/M000096.html +18 -0
  123. data/data/rushcheck/rdoc/classes/Testable.src/M000097.html +18 -0
  124. data/data/rushcheck/rdoc/classes/Testable.src/M000099.html +19 -0
  125. data/data/rushcheck/rdoc/classes/Testable.src/M000100.html +21 -0
  126. data/data/rushcheck/rdoc/classes/Testable.src/M000101.html +18 -0
  127. data/data/rushcheck/rdoc/classes/Testable.src/M000103.html +18 -0
  128. data/data/rushcheck/rdoc/classes/Testable.src/M000104.html +18 -0
  129. data/data/rushcheck/rdoc/classes/TheStdGen.html +20 -20
  130. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000069.html +18 -0
  131. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000070.html +20 -0
  132. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000071.html +21 -0
  133. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000072.html +18 -0
  134. data/data/rushcheck/rdoc/classes/TrueClass.html +15 -15
  135. data/data/rushcheck/rdoc/classes/TrueClass.src/M000079.html +18 -0
  136. data/data/rushcheck/rdoc/classes/TrueClass.src/M000080.html +18 -0
  137. data/data/rushcheck/rdoc/classes/TrueClass.src/M000081.html +18 -0
  138. data/data/rushcheck/rdoc/created.rid +1 -1
  139. data/data/rushcheck/rdoc/files/rushcheck/config_rb.html +8 -1
  140. data/data/rushcheck/rdoc/files/rushcheck/testable_rb.html +3 -1
  141. data/data/rushcheck/rdoc/files/rushcheck/testoptions_rb.html +109 -0
  142. data/data/rushcheck/rdoc/files/rushcheck/testresult_rb.html +105 -0
  143. data/data/rushcheck/rdoc/files/rushcheck_rb.html +127 -0
  144. data/data/rushcheck/rdoc/fr_class_index.html +5 -0
  145. data/data/rushcheck/rdoc/fr_file_index.html +3 -1
  146. data/data/rushcheck/rdoc/fr_method_index.html +103 -94
  147. data/lib/rushcheck/arbitrary.rb +16 -12
  148. data/lib/rushcheck/array.rb +7 -6
  149. data/lib/rushcheck/assertion.rb +53 -50
  150. data/lib/rushcheck/bool.rb +26 -24
  151. data/lib/rushcheck/config.rb +131 -81
  152. data/lib/rushcheck/float.rb +4 -4
  153. data/lib/rushcheck/gen.rb +194 -182
  154. data/lib/rushcheck/guard.rb +9 -10
  155. data/lib/rushcheck/hash.rb +4 -3
  156. data/lib/rushcheck/integer.rb +11 -6
  157. data/lib/rushcheck/proc.rb +7 -7
  158. data/lib/rushcheck/property.rb +19 -15
  159. data/lib/rushcheck/random.rb +162 -159
  160. data/lib/rushcheck/result.rb +16 -12
  161. data/lib/rushcheck/string.rb +12 -12
  162. data/lib/rushcheck/testable.rb +99 -25
  163. data/lib/rushcheck/testoptions.rb +20 -0
  164. data/lib/rushcheck/testresult.rb +25 -0
  165. data/lib/{rushcheck/rushcheck.rb → rushcheck.rb} +2 -1
  166. metadata +93 -4
  167. data/data/rushcheck/doc/rushcheck.txt +0 -670
@@ -5,14 +5,39 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>oneof (Gen)</title>
8
+ <title>create (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 104</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">oneof</span>(<span class="ruby-identifier">gens</span>)
15
- <span class="ruby-identifier">elements</span>(<span class="ruby-identifier">gens</span>).<span class="ruby-identifier">bind</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>}
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 24</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">xs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
15
+ <span class="ruby-constant">Gen</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
+ <span class="ruby-identifier">nguard</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">arity</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">length</span>
18
+ <span class="ruby-identifier">guards</span> = <span class="ruby-identifier">nguard</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">nguard</span>, <span class="ruby-constant">Guard</span>.<span class="ruby-identifier">new</span>) <span class="ruby-operator">:</span> []
19
+
20
+ <span class="ruby-identifier">try</span> = <span class="ruby-value">0</span>
21
+ <span class="ruby-keyword kw">begin</span>
22
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">try</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@@max_create</span>
23
+ <span class="ruby-identifier">raise</span>(<span class="ruby-constant">RuntimeError</span>, <span class="ruby-value str">&quot;Failed to guards too many.&quot;</span>)
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-identifier">args</span> = <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gen</span><span class="ruby-operator">|</span>
26
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
27
+ <span class="ruby-identifier">gen</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
28
+ <span class="ruby-keyword kw">end</span>
29
+ <span class="ruby-identifier">ys</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">guards</span>
30
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ys</span>)
31
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
32
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">ex</span>
33
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">RushCheckGuard</span>
34
+ <span class="ruby-identifier">try</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
35
+ <span class="ruby-keyword kw">retry</span>
36
+ <span class="ruby-keyword kw">else</span>
37
+ <span class="ruby-identifier">raise</span>(<span class="ruby-identifier">ex</span>, <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">to_s</span>)
38
+ <span class="ruby-keyword kw">end</span>
39
+ <span class="ruby-keyword kw">end</span>
40
+ <span class="ruby-keyword kw">end</span>
16
41
  <span class="ruby-keyword kw">end</span></pre>
17
42
  </body>
18
43
  </html>
@@ -5,14 +5,16 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>promote (Gen)</title>
8
+ <title>elements (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 114</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">promote</span>
15
- <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">a</span>).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) } }
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 57</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">elements</span>(<span class="ruby-identifier">xs</span>)
15
+ <span class="ruby-identifier">raise</span>(<span class="ruby-constant">RuntimeError</span>, <span class="ruby-value str">&quot;given argument is empty&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">empty?</span>
16
+
17
+ <span class="ruby-identifier">choose</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">fmap</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">xs</span>[<span class="ruby-identifier">i</span>] }
16
18
  <span class="ruby-keyword kw">end</span></pre>
17
19
  </body>
18
20
  </html>
@@ -5,14 +5,24 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>rand (Gen)</title>
8
+ <title>frequency (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 120</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rand</span>
15
- <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>}
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 71</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">frequency</span>(<span class="ruby-identifier">xs</span>)
15
+ <span class="ruby-identifier">tot</span> = <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span>, <span class="ruby-identifier">pair</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">0</span>]}
16
+ <span class="ruby-identifier">raise</span>(<span class="ruby-constant">RuntimeError</span>, <span class="ruby-node">&quot;Illegal frequency:#{xs.inspect}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tot</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
17
+ <span class="ruby-identifier">choose</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">tot</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
18
+ <span class="ruby-identifier">m</span> = <span class="ruby-identifier">n</span>
19
+ <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pair</span><span class="ruby-operator">|</span>
20
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">0</span>]
21
+ <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">break</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">1</span>]
22
+ <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">pair</span>[<span class="ruby-value">0</span>]
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-keyword kw">end</span>
16
26
  <span class="ruby-keyword kw">end</span></pre>
17
27
  </body>
18
28
  </html>
@@ -5,14 +5,20 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>sized (Gen)</title>
8
+ <title>lift_array (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 128</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sized</span>
15
- <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">n</span>).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 90</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lift_array</span>(<span class="ruby-identifier">xs</span>)
15
+ <span class="ruby-constant">Gen</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
+ <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
18
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
19
+ <span class="ruby-keyword kw">yield</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span>
16
22
  <span class="ruby-keyword kw">end</span></pre>
17
23
  </body>
18
24
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>unit (Gen)</title>
8
+ <title>oneof (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 135</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">x</span>)
15
- <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>}
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 104</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">oneof</span>(<span class="ruby-identifier">gens</span>)
15
+ <span class="ruby-identifier">elements</span>(<span class="ruby-identifier">gens</span>).<span class="ruby-identifier">bind</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>}
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,20 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>vector (Gen)</title>
8
+ <title>promote (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 144</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vector</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">len</span>)
15
- <span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
- (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">len</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span>
18
- <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
19
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">arbitrary</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
20
- <span class="ruby-keyword kw">end</span>
21
- <span class="ruby-keyword kw">end</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 114</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">promote</span>
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">a</span>).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) } }
22
16
  <span class="ruby-keyword kw">end</span></pre>
23
17
  </body>
24
18
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>new (Gen)</title>
8
+ <title>rand (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 157</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
15
- <span class="ruby-ivar">@proc</span> = <span class="ruby-identifier">f</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 120</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rand</span>
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>}
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,17 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>bind (Gen)</title>
8
+ <title>sized (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 165</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bind</span>
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">split</span>
17
- <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r2</span>)
18
- <span class="ruby-keyword kw">end</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 128</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sized</span>
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">n</span>).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
19
16
  <span class="ruby-keyword kw">end</span></pre>
20
17
  </body>
21
18
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>value (Gen)</title>
8
+ <title>unit (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 176</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
15
- <span class="ruby-ivar">@proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 135</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">x</span>)
15
+ <span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>}
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,14 +5,20 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>fmap (Gen)</title>
8
+ <title>vector (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 182</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fmap</span>
15
- <span class="ruby-identifier">bind</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-constant">Gen</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">x</span>)) }
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 144</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vector</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">len</span>)
15
+ <span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>
17
+ (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">len</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span>
18
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r2</span>.<span class="ruby-identifier">split</span>
19
+ <span class="ruby-identifier">c</span>.<span class="ruby-identifier">arbitrary</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span>
16
22
  <span class="ruby-keyword kw">end</span></pre>
17
23
  </body>
18
24
  </html>
@@ -5,19 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>forall (Gen)</title>
8
+ <title>new (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 190</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">forall</span>
15
- <span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
16
- <span class="ruby-keyword kw">yield</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>).<span class="ruby-identifier">property</span>.<span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">res</span><span class="ruby-operator">|</span>
17
- <span class="ruby-identifier">res</span>.<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>)
18
- <span class="ruby-constant">Gen</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">res</span>)
19
- <span class="ruby-keyword kw">end</span>
20
- <span class="ruby-keyword kw">end</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 157</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">f</span>)
15
+ <span class="ruby-ivar">@proc</span> = <span class="ruby-identifier">f</span>
21
16
  <span class="ruby-keyword kw">end</span></pre>
22
17
  </body>
23
18
  </html>
@@ -5,15 +5,17 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>generate (Gen)</title>
8
+ <title>bind (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 202</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">rnd</span>)
15
- <span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span> = <span class="ruby-constant">Integer</span>.<span class="ruby-identifier">random</span>(<span class="ruby-identifier">rnd</span>, <span class="ruby-value">0</span>, <span class="ruby-identifier">n</span>)
16
- <span class="ruby-identifier">value</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span>)
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 165</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bind</span>
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r1</span>, <span class="ruby-identifier">r2</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">split</span>
17
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r1</span>)).<span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r2</span>)
18
+ <span class="ruby-keyword kw">end</span>
17
19
  <span class="ruby-keyword kw">end</span></pre>
18
20
  </body>
19
21
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>resize (Gen)</title>
8
+ <title>value (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 209</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resize</span>(<span class="ruby-identifier">n</span>)
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 176</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
15
+ <span class="ruby-ivar">@proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,20 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>variant (Gen)</title>
8
+ <title>fmap (Gen)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 216</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">variant</span>(<span class="ruby-identifier">v</span>)
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
- <span class="ruby-identifier">g</span> = (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">v</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">r</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gen</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
17
- <span class="ruby-identifier">gen</span>, <span class="ruby-identifier">dummy</span> = <span class="ruby-identifier">gen</span>.<span class="ruby-identifier">split</span>
18
- <span class="ruby-identifier">gen</span>
19
- <span class="ruby-keyword kw">end</span>
20
- <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
21
- <span class="ruby-keyword kw">end</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 182</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fmap</span>
15
+ <span class="ruby-identifier">bind</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-constant">Gen</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">x</span>)) }
22
16
  <span class="ruby-keyword kw">end</span></pre>
23
17
  </body>
24
18
  </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>forall (Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 190</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">forall</span>
15
+ <span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>).<span class="ruby-identifier">property</span>.<span class="ruby-identifier">bind</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">res</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">res</span>.<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>)
18
+ <span class="ruby-constant">Gen</span>.<span class="ruby-identifier">unit</span>(<span class="ruby-identifier">res</span>)
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>generate (Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 202</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">rnd</span>)
15
+ <span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span> = <span class="ruby-constant">Integer</span>.<span class="ruby-identifier">random</span>(<span class="ruby-identifier">rnd</span>, <span class="ruby-value">0</span>, <span class="ruby-identifier">n</span>)
16
+ <span class="ruby-identifier">value</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span>)
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>resize (Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 209</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resize</span>(<span class="ruby-identifier">n</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span>) }
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>variant (Gen)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/gen.rb, line 216</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">variant</span>(<span class="ruby-identifier">v</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">g</span> = (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">v</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">r</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gen</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">gen</span>, <span class="ruby-identifier">dummy</span> = <span class="ruby-identifier">gen</span>.<span class="ruby-identifier">split</span>
18
+ <span class="ruby-identifier">gen</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-identifier">value</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">g</span>)
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -93,8 +93,8 @@ many user don&#8217;t care about this class.
93
93
  <h3 class="section-bar">Methods</h3>
94
94
 
95
95
  <div class="name-list">
96
- <a href="#M000025">guard</a>&nbsp;&nbsp;
97
- <a href="#M000024">guard_raise</a>&nbsp;&nbsp;
96
+ <a href="#M000029">guard</a>&nbsp;&nbsp;
97
+ <a href="#M000028">guard_raise</a>&nbsp;&nbsp;
98
98
  </div>
99
99
  </div>
100
100
 
@@ -116,12 +116,12 @@ many user don&#8217;t care about this class.
116
116
  <div id="methods">
117
117
  <h3 class="section-bar">Public Instance methods</h3>
118
118
 
119
- <div id="method-M000025" class="method-detail">
120
- <a name="M000025"></a>
119
+ <div id="method-M000029" class="method-detail">
120
+ <a name="M000029"></a>
121
121
 
122
122
  <div class="method-heading">
123
- <a href="Guard.src/M000025.html" target="Code" class="method-signature"
124
- onclick="popupCode('Guard.src/M000025.html');return false;">
123
+ <a href="Guard.src/M000029.html" target="Code" class="method-signature"
124
+ onclick="popupCode('Guard.src/M000029.html');return false;">
125
125
  <span class="method-name">guard</span><span class="method-args">() {|| ...}</span>
126
126
  </a>
127
127
  </div>
@@ -130,12 +130,12 @@ many user don&#8217;t care about this class.
130
130
  </div>
131
131
  </div>
132
132
 
133
- <div id="method-M000024" class="method-detail">
134
- <a name="M000024"></a>
133
+ <div id="method-M000028" class="method-detail">
134
+ <a name="M000028"></a>
135
135
 
136
136
  <div class="method-heading">
137
- <a href="Guard.src/M000024.html" target="Code" class="method-signature"
138
- onclick="popupCode('Guard.src/M000024.html');return false;">
137
+ <a href="Guard.src/M000028.html" target="Code" class="method-signature"
138
+ onclick="popupCode('Guard.src/M000028.html');return false;">
139
139
  <span class="method-name">guard_raise</span><span class="method-args">(c) {|| ...}</span>
140
140
  </a>
141
141
  </div>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>guard_raise (Guard)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/guard.rb, line 10</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guard_raise</span>(<span class="ruby-identifier">c</span>)
15
+ <span class="ruby-keyword kw">begin</span>
16
+ <span class="ruby-keyword kw">yield</span>
17
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
18
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">ex</span>
19
+ <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">c</span>
20
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">RushCheckGuard</span>
21
+ <span class="ruby-keyword kw">else</span>
22
+ <span class="ruby-identifier">raise</span> <span class="ruby-identifier">ex</span>
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </html>