hashutils 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. data/README +93 -0
  2. data/Rakefile +51 -0
  3. data/doc/classes/Array.html +131 -0
  4. data/doc/classes/Hash.html +137 -0
  5. data/doc/classes/HashUtils.html +131 -0
  6. data/doc/classes/HashUtils.src/M000018.html +20 -0
  7. data/doc/classes/HashUtilsNamedAttributes.html +131 -0
  8. data/doc/classes/HashUtilsNamedAttributes.src/M000019.html +29 -0
  9. data/doc/classes/HashUtilsXML.html +164 -0
  10. data/doc/classes/HashUtilsXML.src/M000015.html +56 -0
  11. data/doc/classes/HashUtilsXML.src/M000016.html +44 -0
  12. data/doc/classes/HashUtilsXML.src/M000017.html +29 -0
  13. data/doc/classes/TC_HashUtilsFromXML.html +170 -0
  14. data/doc/classes/TC_HashUtilsFromXML.src/M000012.html +25 -0
  15. data/doc/classes/TC_HashUtilsFromXML.src/M000013.html +37 -0
  16. data/doc/classes/TC_HashUtilsFromXML.src/M000014.html +18 -0
  17. data/doc/classes/TC_HashUtilsHashAsAttributes.html +170 -0
  18. data/doc/classes/TC_HashUtilsHashAsAttributes.src/M000008.html +18 -0
  19. data/doc/classes/TC_HashUtilsHashAsAttributes.src/M000009.html +19 -0
  20. data/doc/classes/TC_HashUtilsHashAsAttributes.src/M000010.html +20 -0
  21. data/doc/classes/TC_HashUtilsToXML.html +237 -0
  22. data/doc/classes/TC_HashUtilsToXML.src/M000001.html +34 -0
  23. data/doc/classes/TC_HashUtilsToXML.src/M000002.html +22 -0
  24. data/doc/classes/TC_HashUtilsToXML.src/M000003.html +24 -0
  25. data/doc/classes/TC_HashUtilsToXML.src/M000004.html +30 -0
  26. data/doc/classes/TC_HashUtilsToXML.src/M000005.html +22 -0
  27. data/doc/classes/TC_HashUtilsToXML.src/M000006.html +26 -0
  28. data/doc/classes/TC_HashUtilsToXML.src/M000007.html +31 -0
  29. data/doc/classes/TS_HashUtils.html +137 -0
  30. data/doc/classes/TS_HashUtils.src/M000011.html +22 -0
  31. data/doc/created.rid +1 -0
  32. data/doc/files/lib/hashutils_rb.html +108 -0
  33. data/doc/files/rakefile_rb.html +101 -0
  34. data/doc/files/test/tc_hash_utils_from_xml_rb.html +109 -0
  35. data/doc/files/test/tc_hash_utils_hash_as_attributes_rb.html +109 -0
  36. data/doc/files/test/tc_hash_utils_to_xml_rb.html +110 -0
  37. data/doc/files/test/ts_hash_utils_rb.html +112 -0
  38. data/doc/fr_class_index.html +35 -0
  39. data/doc/fr_file_index.html +32 -0
  40. data/doc/fr_method_index.html +45 -0
  41. data/doc/index.html +24 -0
  42. data/doc/rdoc-style.css +208 -0
  43. data/lib/hashutils.rb +178 -0
  44. data/test/tc_hash_utils_from_xml.rb +47 -0
  45. data/test/tc_hash_utils_hash_as_attributes.rb +24 -0
  46. data/test/tc_hash_utils_to_xml.rb +103 -0
  47. data/test/ts_hash_utils.rb +18 -0
  48. metadata +101 -0
@@ -0,0 +1,31 @@
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>test_should_look_pretty (TC_HashUtilsToXML)</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 test/tc_hash_utils_to_xml.rb, line 86</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_should_look_pretty</span>
15
+ <span class="ruby-identifier">pretty</span> = <span class="ruby-ivar">@hash</span>.<span class="ruby-identifier">to_xml</span> <span class="ruby-identifier">:pretty</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:doc</span>
16
+ <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">pretty</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
17
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">30</span>, <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">size</span>)
18
+ <span class="ruby-identifier">tab_stop</span> = <span class="ruby-value">0</span>
19
+ <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
20
+ <span class="ruby-identifier">array</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">chars</span>.<span class="ruby-identifier">to_a</span>
21
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">array</span>[<span class="ruby-identifier">tab_stop</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;&lt;&quot;</span>
22
+ <span class="ruby-identifier">tab_stop</span> <span class="ruby-operator">-=</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\&lt;\/(.+)\&gt;/</span>
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;&lt;&quot;</span>, <span class="ruby-identifier">array</span>[<span class="ruby-identifier">tab_stop</span>], <span class="ruby-node">&quot;#{line} should start with '&lt;'&quot;</span>)
25
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;&gt;&quot;</span>, <span class="ruby-identifier">array</span>.<span class="ruby-identifier">last</span>, <span class="ruby-node">&quot;#{line} should start with '&gt;'&quot;</span>)
26
+ <span class="ruby-identifier">tab_stop</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\&lt;(.+)(\&gt;|[:blank])/</span>
27
+ <span class="ruby-identifier">tab_stop</span> <span class="ruby-operator">-=</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\&lt;\/(.+)\&gt;/</span>
28
+ <span class="ruby-keyword kw">end</span>
29
+ <span class="ruby-keyword kw">end</span></pre>
30
+ </body>
31
+ </html>
@@ -0,0 +1,137 @@
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>Class: TS_HashUtils</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="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">TS_HashUtils</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/test/ts_hash_utils_rb.html">
59
+ test/ts_hash_utils.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000011">suite</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+ <div id="methods">
109
+ <h3 class="section-bar">Public Class methods</h3>
110
+
111
+ <div id="method-M000011" class="method-detail">
112
+ <a name="M000011"></a>
113
+
114
+ <div class="method-heading">
115
+ <a href="TS_HashUtils.src/M000011.html" target="Code" class="method-signature"
116
+ onclick="popupCode('TS_HashUtils.src/M000011.html');return false;">
117
+ <span class="method-name">suite</span><span class="method-args">()</span>
118
+ </a>
119
+ </div>
120
+
121
+ <div class="method-description">
122
+ </div>
123
+ </div>
124
+
125
+
126
+ </div>
127
+
128
+
129
+ </div>
130
+
131
+
132
+ <div id="validator-badges">
133
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
134
+ </div>
135
+
136
+ </body>
137
+ </html>
@@ -0,0 +1,22 @@
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>suite (TS_HashUtils)</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 test/ts_hash_utils.rb, line 9</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">suite</span>
15
+ <span class="ruby-identifier">suite</span> = <span class="ruby-constant">Test</span><span class="ruby-operator">::</span><span class="ruby-constant">Unit</span><span class="ruby-operator">::</span><span class="ruby-constant">TestSuite</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-identifier">suite</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">TC_HashUtilsToXML</span>.<span class="ruby-identifier">suite</span>
17
+ <span class="ruby-identifier">suite</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">TC_HashUtilsHashAsAttributes</span>.<span class="ruby-identifier">suite</span>
18
+ <span class="ruby-identifier">suite</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">TC_HashUtilsFromXML</span>.<span class="ruby-identifier">suite</span>
19
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">suite</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
data/doc/created.rid ADDED
@@ -0,0 +1 @@
1
+ Sun, 22 Nov 2009 20:30:25 +0800
@@ -0,0 +1,108 @@
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: hashutils.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>hashutils.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/hashutils.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Oct 19 06:00:55 +0800 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+ <div id="requires-list">
73
+ <h3 class="section-bar">Required files</h3>
74
+
75
+ <div class="name-list">
76
+ rexml/document&nbsp;&nbsp;
77
+ </div>
78
+ </div>
79
+
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+
86
+ <!-- if includes -->
87
+
88
+ <div id="section">
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <!-- if method_list -->
98
+
99
+
100
+ </div>
101
+
102
+
103
+ <div id="validator-badges">
104
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
105
+ </div>
106
+
107
+ </body>
108
+ </html>
@@ -0,0 +1,101 @@
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: rakefile.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>rakefile.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>rakefile.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sun Nov 22 20:30:00 +0800 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>
@@ -0,0 +1,109 @@
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: tc_hash_utils_from_xml.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>tc_hash_utils_from_xml.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>test/tc_hash_utils_from_xml.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sun Nov 22 19:57:42 +0800 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+ <div id="requires-list">
73
+ <h3 class="section-bar">Required files</h3>
74
+
75
+ <div class="name-list">
76
+ test/unit&nbsp;&nbsp;
77
+ lib/hashutils.rb&nbsp;&nbsp;
78
+ </div>
79
+ </div>
80
+
81
+ </div>
82
+
83
+
84
+ </div>
85
+
86
+
87
+ <!-- if includes -->
88
+
89
+ <div id="section">
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <!-- if method_list -->
99
+
100
+
101
+ </div>
102
+
103
+
104
+ <div id="validator-badges">
105
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
106
+ </div>
107
+
108
+ </body>
109
+ </html>