eymiha_util 0.1.6 → 1.0.0

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 (106) hide show
  1. data/gem_package.rb +3 -3
  2. data/html/classes/Eymiha.html +144 -0
  3. data/html/classes/{BaseEnvelope.html → Eymiha/BaseEnvelope.html} +21 -21
  4. data/html/classes/Eymiha/BaseEnvelope.src/M000010.html +18 -0
  5. data/html/classes/Eymiha/BaseEnvelope.src/M000011.html +20 -0
  6. data/html/classes/Eymiha/BaseEnvelope.src/M000012.html +18 -0
  7. data/html/classes/{Enum.html → Eymiha/Enum.html} +5 -27
  8. data/html/classes/{Envelope.html → Eymiha/Envelope.html} +52 -52
  9. data/html/classes/Eymiha/Envelope.src/M000025.html +19 -0
  10. data/html/classes/Eymiha/Envelope.src/M000026.html +19 -0
  11. data/html/classes/Eymiha/Envelope.src/M000027.html +35 -0
  12. data/html/classes/Eymiha/Envelope.src/M000028.html +19 -0
  13. data/html/classes/Eymiha/Envelope.src/M000029.html +19 -0
  14. data/html/classes/Eymiha/Envelope.src/M000030.html +26 -0
  15. data/html/classes/Eymiha/Envelope.src/M000032.html +18 -0
  16. data/html/classes/{EnvelopeException.html → Eymiha/EnvelopeException.html} +5 -5
  17. data/html/classes/{ForwardReference.html → Eymiha/ForwardReference.html} +16 -16
  18. data/html/classes/Eymiha/ForwardReference.src/M000033.html +21 -0
  19. data/html/classes/Eymiha/ForwardReference.src/M000034.html +18 -0
  20. data/html/classes/{ForwardReferencer.html → Eymiha/ForwardReferencer.html} +12 -5
  21. data/html/classes/{ForwardReferencing.html → Eymiha/ForwardReferencing.html} +51 -51
  22. data/html/classes/Eymiha/ForwardReferencing.src/M000001.html +20 -0
  23. data/html/classes/Eymiha/ForwardReferencing.src/M000002.html +20 -0
  24. data/html/classes/Eymiha/ForwardReferencing.src/M000003.html +20 -0
  25. data/html/classes/Eymiha/ForwardReferencing.src/M000004.html +32 -0
  26. data/html/classes/Eymiha/ForwardReferencing.src/M000005.html +18 -0
  27. data/html/classes/Eymiha/ForwardReferencing.src/M000006.html +25 -0
  28. data/html/classes/Eymiha/ForwardReferencing.src/M000007.html +18 -0
  29. data/html/classes/Eymiha/ForwardReferencing.src/M000008.html +18 -0
  30. data/html/classes/Eymiha/ForwardReferencing.src/M000009.html +18 -0
  31. data/html/classes/{Histogram.html → Eymiha/Histogram.html} +65 -65
  32. data/html/classes/Eymiha/Histogram.src/M000016.html +19 -0
  33. data/html/classes/Eymiha/Histogram.src/M000017.html +21 -0
  34. data/html/classes/Eymiha/Histogram.src/M000018.html +37 -0
  35. data/html/classes/Eymiha/Histogram.src/M000019.html +18 -0
  36. data/html/classes/{Histogram.src/M000015.html → Eymiha/Histogram.src/M000020.html} +5 -9
  37. data/html/classes/Eymiha/Histogram.src/M000021.html +20 -0
  38. data/html/classes/Eymiha/Histogram.src/M000022.html +20 -0
  39. data/html/classes/Eymiha/Histogram.src/M000023.html +20 -0
  40. data/html/classes/Eymiha/Histogram.src/M000024.html +24 -0
  41. data/html/classes/{HistogramException.html → Eymiha/HistogramException.html} +5 -5
  42. data/html/classes/{MethodicHash.html → Eymiha/MethodicHash.html} +22 -22
  43. data/html/classes/Eymiha/MethodicHash.src/M000013.html +22 -0
  44. data/html/classes/Eymiha/MethodicHash.src/M000014.html +23 -0
  45. data/html/classes/Eymiha/MethodicHash.src/M000015.html +23 -0
  46. data/html/created.rid +1 -1
  47. data/html/files/lib/{enum_rb.html → eymiha/util/enum_rb.html} +3 -3
  48. data/html/files/lib/{envelope_rb.html → eymiha/util/envelope_rb.html} +3 -3
  49. data/html/files/lib/{forward_referencing_rb.html → eymiha/util/forward_referencing_rb.html} +6 -8
  50. data/html/files/lib/{histogram_rb.html → eymiha/util/histogram_rb.html} +3 -3
  51. data/html/files/lib/eymiha/util/methodic_hash_rb.html +101 -0
  52. data/html/files/lib/eymiha/util_rb.html +112 -0
  53. data/html/fr_class_index.html +11 -10
  54. data/html/fr_file_index.html +6 -5
  55. data/html/fr_method_index.html +34 -34
  56. data/html/index.html +1 -1
  57. data/lib/eymiha/util.rb +5 -0
  58. data/lib/eymiha/util/enum.rb +59 -0
  59. data/lib/eymiha/util/envelope.rb +130 -0
  60. data/lib/eymiha/util/forward_referencing.rb +161 -0
  61. data/lib/eymiha/util/histogram.rb +112 -0
  62. data/lib/eymiha/util/methodic_hash.rb +70 -0
  63. data/test/tc_enum.rb +1 -1
  64. data/test/tc_envelope.rb +4 -2
  65. data/test/tc_forward_referencing.rb +3 -1
  66. data/test/tc_histogram.rb +3 -1
  67. data/test/tc_methodic_hash.rb +4 -1
  68. metadata +70 -62
  69. data/html/classes/BaseEnvelope.src/M000001.html +0 -18
  70. data/html/classes/BaseEnvelope.src/M000002.html +0 -20
  71. data/html/classes/BaseEnvelope.src/M000003.html +0 -18
  72. data/html/classes/Envelope.src/M000016.html +0 -19
  73. data/html/classes/Envelope.src/M000017.html +0 -19
  74. data/html/classes/Envelope.src/M000018.html +0 -35
  75. data/html/classes/Envelope.src/M000019.html +0 -19
  76. data/html/classes/Envelope.src/M000020.html +0 -19
  77. data/html/classes/Envelope.src/M000021.html +0 -26
  78. data/html/classes/Envelope.src/M000023.html +0 -18
  79. data/html/classes/ForwardReference.src/M000024.html +0 -21
  80. data/html/classes/ForwardReference.src/M000025.html +0 -18
  81. data/html/classes/ForwardReferencing.src/M000026.html +0 -20
  82. data/html/classes/ForwardReferencing.src/M000027.html +0 -20
  83. data/html/classes/ForwardReferencing.src/M000028.html +0 -20
  84. data/html/classes/ForwardReferencing.src/M000029.html +0 -32
  85. data/html/classes/ForwardReferencing.src/M000030.html +0 -18
  86. data/html/classes/ForwardReferencing.src/M000031.html +0 -25
  87. data/html/classes/ForwardReferencing.src/M000032.html +0 -18
  88. data/html/classes/ForwardReferencing.src/M000033.html +0 -18
  89. data/html/classes/ForwardReferencing.src/M000034.html +0 -18
  90. data/html/classes/Histogram.src/M000007.html +0 -19
  91. data/html/classes/Histogram.src/M000008.html +0 -21
  92. data/html/classes/Histogram.src/M000009.html +0 -37
  93. data/html/classes/Histogram.src/M000010.html +0 -18
  94. data/html/classes/Histogram.src/M000011.html +0 -20
  95. data/html/classes/Histogram.src/M000012.html +0 -20
  96. data/html/classes/Histogram.src/M000013.html +0 -20
  97. data/html/classes/Histogram.src/M000014.html +0 -20
  98. data/html/classes/MethodicHash.src/M000004.html +0 -22
  99. data/html/classes/MethodicHash.src/M000005.html +0 -23
  100. data/html/classes/MethodicHash.src/M000006.html +0 -23
  101. data/html/files/lib/methodic_hash_rb.html +0 -140
  102. data/lib/enum.rb +0 -57
  103. data/lib/envelope.rb +0 -126
  104. data/lib/forward_referencing.rb +0 -157
  105. data/lib/histogram.rb +0 -109
  106. data/lib/methodic_hash.rb +0 -66
@@ -0,0 +1,19 @@
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 (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 18</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">key</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">number</span>=<span class="ruby-value">1</span>)
15
+ <span class="ruby-keyword kw">super</span>()
16
+ <span class="ruby-identifier">add</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">number</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,21 @@
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>count (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 25</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>(<span class="ruby-identifier">check_keys</span> = <span class="ruby-identifier">keys</span>)
15
+ <span class="ruby-identifier">check_keys</span> = [<span class="ruby-identifier">check_keys</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">check_keys</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
16
+ <span class="ruby-identifier">count</span> = <span class="ruby-value">0</span>
17
+ <span class="ruby-identifier">check_keys</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">+=</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">key</span> }
18
+ <span class="ruby-identifier">count</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,37 @@
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>add (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 36</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">count</span>=<span class="ruby-value">1</span>)
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
16
+ <span class="ruby-identifier">key</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">member</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">member</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
18
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">member</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
19
+ <span class="ruby-identifier">add</span>(<span class="ruby-identifier">member</span>[<span class="ruby-value">0</span>])
20
+ <span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">member</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span>) <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">member</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Fixnum</span>)
21
+ <span class="ruby-identifier">add</span>(<span class="ruby-identifier">member</span>[<span class="ruby-value">0</span>],<span class="ruby-identifier">member</span>[<span class="ruby-value">1</span>])
22
+ <span class="ruby-keyword kw">else</span>
23
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">HistogramException</span>, <span class="ruby-value str">&quot;add cannot interpret Array to add&quot;</span>
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-keyword kw">else</span>
26
+ <span class="ruby-identifier">add</span> <span class="ruby-identifier">member</span>
27
+ <span class="ruby-keyword kw">end</span>
28
+ }
29
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Histogram</span>
30
+ <span class="ruby-identifier">key</span>.<span class="ruby-identifier">each_pair</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">add</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) }
31
+ <span class="ruby-keyword kw">else</span>
32
+ <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key</span>] = ((<span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key</span>]) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">value</span><span class="ruby-operator">+</span><span class="ruby-identifier">count</span>
33
+ <span class="ruby-keyword kw">end</span>
34
+ <span class="ruby-keyword kw">self</span>
35
+ <span class="ruby-keyword kw">end</span></pre>
36
+ </body>
37
+ </html>
@@ -0,0 +1,18 @@
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>key_count (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 60</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">key_count</span>
15
+ <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">size</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -5,20 +5,16 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>== (Histogram)</title>
8
+ <title>&gt;= (Eymiha::Histogram)</title>
9
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" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/histogram.rb, line 99</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">count</span>)
15
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">count</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Numeric</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/eymiha/util/histogram.rb, line 66</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&gt;=</span>(<span class="ruby-identifier">count</span>)
16
15
  <span class="ruby-identifier">result</span> = <span class="ruby-constant">Histogram</span>.<span class="ruby-identifier">new</span>
17
16
  <span class="ruby-identifier">each_pair</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">result</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-identifier">count</span> }
18
17
  <span class="ruby-identifier">result</span>
19
- <span class="ruby-keyword kw">else</span>
20
- <span class="ruby-keyword kw">super</span>
21
- <span class="ruby-keyword kw">end</span>
22
- <span class="ruby-keyword kw">end</span></pre>
18
+ <span class="ruby-keyword kw">end</span></pre>
23
19
  </body>
24
20
  </html>
@@ -0,0 +1,20 @@
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>&gt; (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 74</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&gt;</span>(<span class="ruby-identifier">count</span>)
15
+ <span class="ruby-identifier">result</span> = <span class="ruby-constant">Histogram</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-identifier">each_pair</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">result</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">count</span> }
17
+ <span class="ruby-identifier">result</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,20 @@
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>&lt;= (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 82</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;=</span>(<span class="ruby-identifier">count</span>)
15
+ <span class="ruby-identifier">result</span> = <span class="ruby-constant">Histogram</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-identifier">each_pair</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">result</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">count</span> }
17
+ <span class="ruby-identifier">result</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,20 @@
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>&lt; (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 90</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;</span>(<span class="ruby-identifier">count</span>)
15
+ <span class="ruby-identifier">result</span> = <span class="ruby-constant">Histogram</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-identifier">each_pair</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">result</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">count</span> }
17
+ <span class="ruby-identifier">result</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,24 @@
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>== (Eymiha::Histogram)</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/eymiha/util/histogram.rb, line 100</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">count</span>)
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">count</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Numeric</span>
16
+ <span class="ruby-identifier">result</span> = <span class="ruby-constant">Histogram</span>.<span class="ruby-identifier">new</span>
17
+ <span class="ruby-identifier">each_pair</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">result</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-identifier">count</span> }
18
+ <span class="ruby-identifier">result</span>
19
+ <span class="ruby-keyword kw">else</span>
20
+ <span class="ruby-keyword kw">super</span>
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -5,10 +5,10 @@
5
5
 
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
- <title>Class: HistogramException</title>
8
+ <title>Class: Eymiha::HistogramException</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
13
13
  // <![CDATA[
14
14
 
@@ -50,13 +50,13 @@
50
50
  <table class="header-table">
51
51
  <tr class="top-aligned-row">
52
52
  <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">HistogramException</td>
53
+ <td class="class-name-in-header">Eymiha::HistogramException</td>
54
54
  </tr>
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
57
57
  <td>
58
- <a href="../files/lib/histogram_rb.html">
59
- lib/histogram.rb
58
+ <a href="../../files/lib/eymiha/util/histogram_rb.html">
59
+ lib/eymiha/util/histogram.rb
60
60
  </a>
61
61
  <br />
62
62
  </td>
@@ -5,10 +5,10 @@
5
5
 
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
- <title>Class: MethodicHash</title>
8
+ <title>Class: Eymiha::MethodicHash</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
13
13
  // <![CDATA[
14
14
 
@@ -50,13 +50,13 @@
50
50
  <table class="header-table">
51
51
  <tr class="top-aligned-row">
52
52
  <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">MethodicHash</td>
53
+ <td class="class-name-in-header">Eymiha::MethodicHash</td>
54
54
  </tr>
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
57
57
  <td>
58
- <a href="../files/lib/methodic_hash_rb.html">
59
- lib/methodic_hash.rb
58
+ <a href="../../files/lib/eymiha/util/methodic_hash_rb.html">
59
+ lib/eymiha/util/methodic_hash.rb
60
60
  </a>
61
61
  <br />
62
62
  </td>
@@ -81,7 +81,7 @@
81
81
  <div id="description">
82
82
  <p>
83
83
  The <a href="MethodicHash.html">MethodicHash</a> is some <a
84
- href="MethodicHash.html#M000006">method_missing</a> magic that uses method
84
+ href="MethodicHash.html#M000015">method_missing</a> magic that uses method
85
85
  names as hash keys, so hash assignment and lookup appear to be attribute
86
86
  writing and reading. For instance, if
87
87
  </p>
@@ -125,9 +125,9 @@ bizarre manner. Note also that methods of the Hash cannot be used as
125
125
  <h3 class="section-bar">Methods</h3>
126
126
 
127
127
  <div class="name-list">
128
- <a href="#M000004">[]</a>&nbsp;&nbsp;
129
- <a href="#M000005">delete</a>&nbsp;&nbsp;
130
- <a href="#M000006">method_missing</a>&nbsp;&nbsp;
128
+ <a href="#M000013">[]</a>&nbsp;&nbsp;
129
+ <a href="#M000014">delete</a>&nbsp;&nbsp;
130
+ <a href="#M000015">method_missing</a>&nbsp;&nbsp;
131
131
  </div>
132
132
  </div>
133
133
 
@@ -149,12 +149,12 @@ bizarre manner. Note also that methods of the Hash cannot be used as
149
149
  <div id="methods">
150
150
  <h3 class="section-bar">Public Instance methods</h3>
151
151
 
152
- <div id="method-M000004" class="method-detail">
153
- <a name="M000004"></a>
152
+ <div id="method-M000013" class="method-detail">
153
+ <a name="M000013"></a>
154
154
 
155
155
  <div class="method-heading">
156
- <a href="MethodicHash.src/M000004.html" target="Code" class="method-signature"
157
- onclick="popupCode('MethodicHash.src/M000004.html');return false;">
156
+ <a href="MethodicHash.src/M000013.html" target="Code" class="method-signature"
157
+ onclick="popupCode('MethodicHash.src/M000013.html');return false;">
158
158
  <span class="method-name">[]</span><span class="method-args">(key)</span>
159
159
  </a>
160
160
  </div>
@@ -168,12 +168,12 @@ with a nil.
168
168
  </div>
169
169
  </div>
170
170
 
171
- <div id="method-M000005" class="method-detail">
172
- <a name="M000005"></a>
171
+ <div id="method-M000014" class="method-detail">
172
+ <a name="M000014"></a>
173
173
 
174
174
  <div class="method-heading">
175
- <a href="MethodicHash.src/M000005.html" target="Code" class="method-signature"
176
- onclick="popupCode('MethodicHash.src/M000005.html');return false;">
175
+ <a href="MethodicHash.src/M000014.html" target="Code" class="method-signature"
176
+ onclick="popupCode('MethodicHash.src/M000014.html');return false;">
177
177
  <span class="method-name">delete</span><span class="method-args">(key,&amp;block)</span>
178
178
  </a>
179
179
  </div>
@@ -183,18 +183,18 @@ with a nil.
183
183
  Deletes and returns the key-value pairs from hash whose keys are equal to
184
184
  key.to_s or key.to_sym. If both key.to_s and key.to_sym are in the hash,
185
185
  then both values are returned in an Array, respectively. If neither key is
186
- found, the <a href="MethodicHash.html#M000005">delete</a> is deferred to
186
+ found, the <a href="MethodicHash.html#M000014">delete</a> is deferred to
187
187
  the Hash.
188
188
  </p>
189
189
  </div>
190
190
  </div>
191
191
 
192
- <div id="method-M000006" class="method-detail">
193
- <a name="M000006"></a>
192
+ <div id="method-M000015" class="method-detail">
193
+ <a name="M000015"></a>
194
194
 
195
195
  <div class="method-heading">
196
- <a href="MethodicHash.src/M000006.html" target="Code" class="method-signature"
197
- onclick="popupCode('MethodicHash.src/M000006.html');return false;">
196
+ <a href="MethodicHash.src/M000015.html" target="Code" class="method-signature"
197
+ onclick="popupCode('MethodicHash.src/M000015.html');return false;">
198
198
  <span class="method-name">method_missing</span><span class="method-args">(method,*args)</span>
199
199
  </a>
200
200
  </div>
@@ -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>[] (Eymiha::MethodicHash)</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/eymiha/util/methodic_hash.rb, line 36</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
15
+ <span class="ruby-keyword kw">begin</span>
16
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>)
17
+ <span class="ruby-keyword kw">rescue</span>
18
+ <span class="ruby-keyword kw">nil</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,23 @@
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 (Eymiha::MethodicHash)</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/eymiha/util/methodic_hash.rb, line 48</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">values</span> = [<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>].<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">k</span>){ <span class="ruby-keyword kw">nil</span> } }.<span class="ruby-identifier">compact</span>
16
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span>
17
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
18
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">values</span>[<span class="ruby-value">0</span>]
19
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">values</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,23 @@
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>method_missing (Eymiha::MethodicHash)</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/eymiha/util/methodic_hash.rb, line 59</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
+ <span class="ruby-identifier">string</span> = <span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>
16
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">string</span>[<span class="ruby-identifier">string</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'='</span>
17
+ <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">string</span>[<span class="ruby-value">0</span>,<span class="ruby-identifier">string</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
18
+ <span class="ruby-keyword kw">else</span>
19
+ <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">method</span>]
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
data/html/created.rid CHANGED
@@ -1 +1 @@
1
- Tue, 08 Apr 2008 15:43:09 -0400
1
+ Thu, 08 May 2008 08:24:54 -0400
@@ -8,7 +8,7 @@
8
8
  <title>File: enum.rb</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
13
13
  // <![CDATA[
14
14
 
@@ -51,12 +51,12 @@
51
51
  <table class="header-table">
52
52
  <tr class="top-aligned-row">
53
53
  <td><strong>Path:</strong></td>
54
- <td>lib/enum.rb
54
+ <td>lib/eymiha/util/enum.rb
55
55
  </td>
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Apr 08 15:43:00 -0400 2008</td>
59
+ <td>Wed May 07 15:12:04 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>