doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html in rfuzz-0.9

- old
+ new

@@ -3,20 +3,18 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>base64 (RFuzz::RandomGenerator)</title> + <title>words (RFuzz::RandomGenerator)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre> <span class="ruby-comment cmt"># File lib/rfuzz/random.rb, line 65</span> -65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base64</span>(<span class="ruby-identifier">count</span>,<span class="ruby-identifier">length</span>=<span class="ruby-value">100</span>) -66: <span class="ruby-identifier">list</span> = [] -67: <span class="ruby-identifier">count</span>.<span class="ruby-identifier">times</span> { -68: <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Base64</span>.<span class="ruby-identifier">encode64</span>(<span class="ruby-ivar">@rnd</span>.<span class="ruby-identifier">data</span>(<span class="ruby-identifier">num</span>(<span class="ruby-identifier">length</span>))) -69: } -70: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span> -71: <span class="ruby-keyword kw">end</span></pre> + <pre> <span class="ruby-comment cmt"># File lib/rfuzz/random.rb, line 55</span> +55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">words</span>(<span class="ruby-identifier">count</span>=<span class="ruby-value">1</span>) +56: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You need a dictionary.&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@dict</span> +57: <span class="ruby-identifier">w</span> = <span class="ruby-identifier">ints</span>(<span class="ruby-identifier">count</span>, <span class="ruby-ivar">@dict</span>.<span class="ruby-identifier">length</span>) +58: <span class="ruby-identifier">w</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@dict</span>[<span class="ruby-identifier">i</span>]} +59: <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file