Sha256: 71462cfec920e86b899792a80e2940a7fb4e171cc46a0bde55612f054593fe3f
Contents?: true
Size: 1.58 KB
Versions: 4
Compression:
Stored size: 1.58 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>hash_of (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 31</span> 31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_of</span>(<span class="ruby-identifier">count</span>,<span class="ruby-identifier">length</span>=<span class="ruby-value">5</span>,<span class="ruby-identifier">type</span>=<span class="ruby-ivar">@type</span>) 32: <span class="ruby-identifier">list</span> = [] 33: <span class="ruby-identifier">count</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> 34: <span class="ruby-identifier">list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Hash</span>[<span class="ruby-operator">*</span><span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span>,<span class="ruby-identifier">length</span><span class="ruby-operator">*</span><span class="ruby-value">2</span>)] 35: <span class="ruby-keyword kw">end</span> 36: 37: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span> 38: <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
4 entries across 4 versions & 1 rubygems