Sha256: ec74de23c5d7fca42297e0aa78f91ae38381c4a7e7d1e64f20eaa9ac6f01ba75
Contents?: true
Size: 1.45 KB
Versions: 4
Compression:
Stored size: 1.45 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <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 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">"You need a dictionary."</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>
Version data entries
4 entries across 4 versions & 1 rubygems