doc/main-rdoc/classes/OrderedHash.src/M000219.html in facets-0.7.1 vs doc/main-rdoc/classes/OrderedHash.src/M000219.html in facets-0.7.2

- old
+ new

@@ -3,16 +3,24 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>keys (OrderedHash)</title> + <title>[] (OrderedHash)</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/facet/orderedhash.rb, line 150</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span> - <span class="ruby-ivar">@order</span> - <span class="ruby-keyword kw">end</span></pre> + <pre><span class="ruby-comment cmt"># File lib/facet/orderedhash.rb, line 78</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> + <span class="ruby-identifier">hsh</span> = <span class="ruby-constant">OrderedHash</span>.<span class="ruby-identifier">new</span> + <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>] + <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">replace</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>] + <span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">%</span> <span class="ruby-value">2</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> + <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;odd number of elements for Hash&quot;</span> + <span class="ruby-keyword kw">else</span> + <span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>] = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span> <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> + <span class="ruby-keyword kw">end</span> + <span class="ruby-identifier">hsh</span> + <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file