hash_magic 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,20 +0,0 @@
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>new (SlashedHash)</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 lib/hash_magic.rb, line 171</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hsh</span>={})
15
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;must be a hash or array of slashed values&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
16
- <span class="ruby-ivar">@constructor</span> = <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Hash</span>
17
- <span class="ruby-ivar">@flat</span> = <span class="ruby-identifier">flatten_to_hash</span>(<span class="ruby-identifier">hsh</span>)
18
- <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,25 +0,0 @@
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>[] (SlashedHash)</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 lib/hash_magic.rb, line 182</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
15
- <span class="ruby-identifier">rg</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;^#{key}/?&quot;</span>)
16
- <span class="ruby-identifier">start_obj</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@constructor</span> <span class="ruby-operator">==</span> <span class="ruby-constant">OrderedHash</span>
17
- <span class="ruby-ivar">@constructor</span>.<span class="ruby-identifier">new</span>((<span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">:@keys_in_order</span>) <span class="ruby-operator">||</span> []).<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-identifier">rg</span>,<span class="ruby-value str">''</span>)})
18
- <span class="ruby-keyword kw">else</span>
19
- <span class="ruby-ivar">@constructor</span>.<span class="ruby-identifier">new</span>
20
- <span class="ruby-keyword kw">end</span>
21
- <span class="ruby-identifier">v</span> = <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>) <span class="ruby-operator">?</span> <span class="ruby-ivar">@flat</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">:</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">k</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">rg</span>)}.<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">start_obj</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-identifier">rg</span>,<span class="ruby-value str">''</span>)] = <span class="ruby-identifier">v</span>; <span class="ruby-identifier">h</span>})
22
- <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">v</span>
23
- <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,25 +0,0 @@
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>[]= (SlashedHash)</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 lib/hash_magic.rb, line 193</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span>)
15
- <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">reject!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;^#{key}/&quot;</span>)}
16
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
17
- <span class="ruby-identifier">flatten_to_hash</span>(<span class="ruby-identifier">value</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hk</span>,<span class="ruby-identifier">hv</span><span class="ruby-operator">|</span>
18
- <span class="ruby-ivar">@flat</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-value str">'/'</span><span class="ruby-operator">+</span><span class="ruby-identifier">hk</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">hv</span>
19
- <span class="ruby-keyword kw">end</span>
20
- <span class="ruby-keyword kw">else</span>
21
- <span class="ruby-ivar">@flat</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">value</span>
22
- <span class="ruby-keyword kw">end</span>
23
- <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,21 +0,0 @@
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>delete (SlashedHash)</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 lib/hash_magic.rb, line 224</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
- <span class="ruby-identifier">value</span> = <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>) <span class="ruby-operator">?</span> <span class="ruby-ivar">@flat</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">:</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">k</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;^#{key}/&quot;</span>))}.<span class="ruby-identifier">inject</span>({}) {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>,<span class="ruby-value">2</span>)[<span class="ruby-value">1</span>]] = <span class="ruby-identifier">v</span>; <span class="ruby-identifier">h</span>})
16
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">key</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">block_given?</span>
17
- <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">k</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;^#{key}/&quot;</span>))}.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)}
18
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span>
19
- <span class="ruby-keyword kw">end</span></pre>
20
- </body>
21
- </html>
@@ -1,18 +0,0 @@
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>index (SlashedHash)</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 lib/hash_magic.rb, line 234</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span>(<span class="ruby-identifier">value</span>)
15
- <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">value</span>)
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>keys (SlashedHash)</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 lib/hash_magic.rb, line 241</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span>
15
- <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">inject</span>([]) {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">k</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>,<span class="ruby-value">2</span>)].<span class="ruby-identifier">flatten</span>[<span class="ruby-value">0</span>]; <span class="ruby-identifier">a</span>}.<span class="ruby-identifier">uniq</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>flat (SlashedHash)</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 lib/hash_magic.rb, line 253</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">flat</span>
15
- <span class="ruby-ivar">@flat</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>expand (SlashedHash)</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 lib/hash_magic.rb, line 257</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expand</span>
15
- <span class="ruby-identifier">inject</span>({}) {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">SlashedHash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">expand</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">v</span>; <span class="ruby-identifier">h</span>}
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>to_string_array (SlashedHash)</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 lib/hash_magic.rb, line 260</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_string_array</span>
15
- <span class="ruby-identifier">flatten_to_array</span>(<span class="ruby-identifier">flat</span>,[])
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>ordered (SlashedHash)</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 lib/hash_magic.rb, line 267</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ordered</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys_in_order</span>)
15
- <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">ordered!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys_in_order</span>)
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,21 +0,0 @@
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>ordered! (SlashedHash)</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 lib/hash_magic.rb, line 275</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ordered!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys_in_order</span>)
15
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@constructor</span> <span class="ruby-operator">==</span> <span class="ruby-constant">OrderedHash</span>
16
- <span class="ruby-ivar">@constructor</span> = <span class="ruby-constant">OrderedHash</span>
17
- <span class="ruby-ivar">@flat</span> = <span class="ruby-ivar">@flat</span>.<span class="ruby-identifier">ordered</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys_in_order</span>)
18
- <span class="ruby-keyword kw">self</span>
19
- <span class="ruby-keyword kw">end</span></pre>
20
- </body>
21
- </html>
@@ -1 +0,0 @@
1
- Mon, 31 Mar 2008 16:48:09 -0400
@@ -1,126 +0,0 @@
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: hash_magic.rb</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>hash_magic.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/hash_magic.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Mon Mar 31 16:44:20 -0400 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <p>
73
- The aim of this gem:
74
- </p>
75
- <ol>
76
- <li>Don&#8216;t extend <a href="../../classes/Hash.html">Hash</a>
77
-
78
- </li>
79
- <li>Provide <a href="../../classes/SlashedHash.html">SlashedHash</a>
80
-
81
- </li>
82
- <li>Provide <a href="../../classes/OrderedHash.html">OrderedHash</a>
83
-
84
- </li>
85
- <li>Make a <a href="../../classes/SlashedHash.html">SlashedHash</a> orderable
86
-
87
- </li>
88
- <li>Make an <a href="../../classes/OrderedHash.html">OrderedHash</a> convert
89
- correctly to an ordered <a
90
- href="../../classes/SlashedHash.html">SlashedHash</a>
91
-
92
- </li>
93
- </ol>
94
-
95
- </div>
96
-
97
-
98
- </div>
99
-
100
-
101
- </div>
102
-
103
-
104
- <!-- if includes -->
105
-
106
- <div id="section">
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
- <!-- if method_list -->
116
-
117
-
118
- </div>
119
-
120
-
121
- <div id="validator-badges">
122
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
123
- </div>
124
-
125
- </body>
126
- </html>
@@ -1,29 +0,0 @@
1
-
2
- <?xml version="1.0" encoding="iso-8859-1"?>
3
- <!DOCTYPE html
4
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
-
7
- <!--
8
-
9
- Classes
10
-
11
- -->
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <title>Classes</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
- <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
- <base target="docwin" />
18
- </head>
19
- <body>
20
- <div id="index">
21
- <h1 class="section-bar">Classes</h1>
22
- <div id="index-entries">
23
- <a href="classes/Hash.html">Hash</a><br />
24
- <a href="classes/OrderedHash.html">OrderedHash</a><br />
25
- <a href="classes/SlashedHash.html">SlashedHash</a><br />
26
- </div>
27
- </div>
28
- </body>
29
- </html>
@@ -1,27 +0,0 @@
1
-
2
- <?xml version="1.0" encoding="iso-8859-1"?>
3
- <!DOCTYPE html
4
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
-
7
- <!--
8
-
9
- Files
10
-
11
- -->
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <title>Files</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
- <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
- <base target="docwin" />
18
- </head>
19
- <body>
20
- <div id="index">
21
- <h1 class="section-bar">Files</h1>
22
- <div id="index-entries">
23
- <a href="files/lib/hash_magic_rb.html">lib/hash_magic.rb</a><br />
24
- </div>
25
- </div>
26
- </body>
27
- </html>
@@ -1,44 +0,0 @@
1
-
2
- <?xml version="1.0" encoding="iso-8859-1"?>
3
- <!DOCTYPE html
4
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
-
7
- <!--
8
-
9
- Methods
10
-
11
- -->
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <title>Methods</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
- <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
- <base target="docwin" />
18
- </head>
19
- <body>
20
- <div id="index">
21
- <h1 class="section-bar">Methods</h1>
22
- <div id="index-entries">
23
- <a href="classes/SlashedHash.html#M000002">[] (SlashedHash)</a><br />
24
- <a href="classes/OrderedHash.html#M000015">[]= (OrderedHash)</a><br />
25
- <a href="classes/SlashedHash.html#M000003">[]= (SlashedHash)</a><br />
26
- <a href="classes/SlashedHash.html#M000004">delete (SlashedHash)</a><br />
27
- <a href="classes/SlashedHash.html#M000008">expand (SlashedHash)</a><br />
28
- <a href="classes/SlashedHash.html#M000007">flat (SlashedHash)</a><br />
29
- <a href="classes/SlashedHash.html#M000005">index (SlashedHash)</a><br />
30
- <a href="classes/OrderedHash.html#M000016">inspect (OrderedHash)</a><br />
31
- <a href="classes/OrderedHash.html#M000017">keys (OrderedHash)</a><br />
32
- <a href="classes/SlashedHash.html#M000006">keys (SlashedHash)</a><br />
33
- <a href="classes/SlashedHash.html#M000001">new (SlashedHash)</a><br />
34
- <a href="classes/OrderedHash.html#M000014">new (OrderedHash)</a><br />
35
- <a href="classes/Hash.html#M000013">ordered (Hash)</a><br />
36
- <a href="classes/SlashedHash.html#M000010">ordered (SlashedHash)</a><br />
37
- <a href="classes/SlashedHash.html#M000011">ordered! (SlashedHash)</a><br />
38
- <a href="classes/Hash.html#M000012">slashed (Hash)</a><br />
39
- <a href="classes/OrderedHash.html#M000018">slashed (OrderedHash)</a><br />
40
- <a href="classes/SlashedHash.html#M000009">to_string_array (SlashedHash)</a><br />
41
- </div>
42
- </div>
43
- </body>
44
- </html>