namecase 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/README +39 -0
  2. data/doc/CVS/Entries +8 -0
  3. data/doc/CVS/Repository +1 -0
  4. data/doc/CVS/Root +1 -0
  5. data/doc/classes/CVS/Entries +6 -0
  6. data/doc/classes/CVS/Repository +1 -0
  7. data/doc/classes/CVS/Root +1 -0
  8. data/doc/classes/NameCase.html +158 -0
  9. data/doc/classes/NameCase.src/CVS/Entries +3 -0
  10. data/doc/classes/NameCase.src/CVS/Repository +1 -0
  11. data/doc/classes/NameCase.src/CVS/Root +1 -0
  12. data/doc/classes/NameCase.src/M000001.html +59 -0
  13. data/doc/classes/NameCase.src/M000002.html +18 -0
  14. data/doc/classes/String.html +159 -0
  15. data/doc/classes/String.src/CVS/Entries +3 -0
  16. data/doc/classes/String.src/CVS/Repository +1 -0
  17. data/doc/classes/String.src/CVS/Root +1 -0
  18. data/doc/classes/String.src/M000004.html +59 -0
  19. data/doc/classes/String.src/M000005.html +18 -0
  20. data/doc/classes/TestNameCase.html +167 -0
  21. data/doc/classes/TestNameCase.src/CVS/Entries +6 -0
  22. data/doc/classes/TestNameCase.src/CVS/Repository +1 -0
  23. data/doc/classes/TestNameCase.src/CVS/Root +1 -0
  24. data/doc/classes/TestNameCase.src/M000001.html +38 -0
  25. data/doc/classes/TestNameCase.src/M000002.html +20 -0
  26. data/doc/classes/TestNameCase.src/M000003.html +38 -0
  27. data/doc/classes/TestNameCase.src/M000004.html +21 -0
  28. data/doc/classes/TestNameCase.src/M000005.html +21 -0
  29. data/doc/created.rid +1 -0
  30. data/doc/files/CVS/Entries +3 -0
  31. data/doc/files/CVS/Repository +1 -0
  32. data/doc/files/CVS/Root +1 -0
  33. data/doc/files/README.html +162 -0
  34. data/doc/files/lib/CVS/Entries +2 -0
  35. data/doc/files/lib/CVS/Repository +1 -0
  36. data/doc/files/lib/CVS/Root +1 -0
  37. data/doc/files/lib/namecase_rb.html +101 -0
  38. data/doc/files/test/CVS/Entries +2 -0
  39. data/doc/files/test/CVS/Repository +1 -0
  40. data/doc/files/test/CVS/Root +1 -0
  41. data/doc/files/test/test_namecase_rb.html +109 -0
  42. data/doc/fr_class_index.html +28 -0
  43. data/doc/fr_file_index.html +28 -0
  44. data/doc/fr_method_index.html +31 -0
  45. data/doc/index.html +24 -0
  46. data/doc/rdoc-style.css +208 -0
  47. data/lib/CVS/Entries +2 -0
  48. data/lib/CVS/Repository +1 -0
  49. data/lib/CVS/Root +1 -0
  50. data/lib/namecase.rb +53 -0
  51. data/test/CVS/Entries +2 -0
  52. data/test/CVS/Repository +1 -0
  53. data/test/CVS/Root +1 -0
  54. data/test/test_namecase.rb +44 -0
  55. metadata +110 -0
@@ -0,0 +1,3 @@
1
+ /M000004.html/1.1.1.1/Mon Nov 7 23:24:12 2005//
2
+ /M000005.html/1.1.1.1/Mon Nov 7 23:24:12 2005//
3
+ D
@@ -0,0 +1 @@
1
+ namecase/doc/classes/String.src
@@ -0,0 +1 @@
1
+ :ext:aaronp@rubyforge.org:/var/cvs/namecase
@@ -0,0 +1,59 @@
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>nc (String)</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/namecase.rb, line 4</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nc</span>
15
+ <span class="ruby-identifier">localstring</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">downcase</span>
16
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\b\w/</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">first</span><span class="ruby-operator">|</span> <span class="ruby-identifier">first</span>.<span class="ruby-identifier">upcase</span> }
17
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-value str">&quot;\'\w\b&quot;</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">downcase</span> } <span class="ruby-comment cmt"># Lowercase 's</span>
18
+
19
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">localstring</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\bMac[A-Za-z]{2,}[^aciozj]\b/</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">localstring</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\bMc/</span>
20
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\b(Ma?c)([A-Za-z]+)/</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span> <span class="ruby-identifier">$1</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">$2</span>.<span class="ruby-identifier">capitalize</span> }
21
+
22
+ <span class="ruby-comment cmt"># Now fix &quot;Mac&quot; exceptions</span>
23
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacEvicius/</span>, <span class="ruby-value str">'Macevicius'</span>)
24
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacHado/</span>, <span class="ruby-value str">'Machado'</span>)
25
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacHar/</span>, <span class="ruby-value str">'Machar'</span>)
26
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacHin/</span>, <span class="ruby-value str">'Machin'</span>)
27
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacHlin/</span>, <span class="ruby-value str">'Machlin'</span>)
28
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacIas/</span>, <span class="ruby-value str">'Macias'</span>)
29
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacIulis/</span>, <span class="ruby-value str">'Maciulis'</span>)
30
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacKie/</span>, <span class="ruby-value str">'Mackie'</span>)
31
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacKle/</span>, <span class="ruby-value str">'Mackle'</span>)
32
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacKlin/</span>, <span class="ruby-value str">'Macklin'</span>)
33
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bMacQuarie/</span>, <span class="ruby-value str">'Macquarie'</span>)
34
+ <span class="ruby-keyword kw">end</span>
35
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-value str">'Macmurdo'</span>,<span class="ruby-value str">'MacMurdo'</span>)
36
+
37
+ <span class="ruby-comment cmt"># Fixes for &quot;son (daughter) of&quot; etc</span>
38
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bAl(?=\s+\w)/</span>, <span class="ruby-value str">'al'</span>) <span class="ruby-comment cmt"># al Arabic or forename Al.</span>
39
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bAp\b/</span>, <span class="ruby-value str">'ap'</span>) <span class="ruby-comment cmt"># ap Welsh.</span>
40
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bBen(?=\s+\w)/</span>,<span class="ruby-value str">'ben'</span>) <span class="ruby-comment cmt"># ben Hebrew or forename Ben.</span>
41
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bDell([ae])\b/</span>,<span class="ruby-value str">'dell\1'</span>) <span class="ruby-comment cmt"># della and delle Italian.</span>
42
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bD([aeiu])\b/</span>,<span class="ruby-value str">'d\1'</span>) <span class="ruby-comment cmt"># da, de, di Italian; du French.</span>
43
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bDe([lr])\b/</span>,<span class="ruby-value str">'de\1'</span>) <span class="ruby-comment cmt"># del Italian; der Dutch/Flemish.</span>
44
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bEl\b/</span>,<span class="ruby-value str">'el'</span>) <span class="ruby-comment cmt"># el Greek or El Spanish.</span>
45
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bLa\b/</span>,<span class="ruby-value str">'la'</span>) <span class="ruby-comment cmt"># la French or La Spanish.</span>
46
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bL([eo])\b/</span>,<span class="ruby-value str">'l\1'</span>) <span class="ruby-comment cmt"># lo Italian; le French.</span>
47
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bVan(?=\s+\w)/</span>,<span class="ruby-value str">'van'</span>) <span class="ruby-comment cmt"># van German or forename Van.</span>
48
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\bVon\b/</span>,<span class="ruby-value str">'von'</span>) <span class="ruby-comment cmt"># von Dutch/Flemish</span>
49
+
50
+ <span class="ruby-comment cmt"># Fix roman numeral names</span>
51
+ <span class="ruby-identifier">localstring</span>.<span class="ruby-identifier">gsub!</span>(
52
+ <span class="ruby-regexp re">/ \b ( (?: [Xx]{1,3} | [Xx][Ll] | [Ll][Xx]{0,3} )?
53
+ (?: [Ii]{1,3} | [Ii][VvXx] | [Vv][Ii]{0,3} )? ) \b /</span><span class="ruby-identifier">x</span>
54
+ ) { <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span> <span class="ruby-identifier">match</span>.<span class="ruby-identifier">upcase</span> }
55
+
56
+ <span class="ruby-identifier">localstring</span>
57
+ <span class="ruby-keyword kw">end</span></pre>
58
+ </body>
59
+ </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>nc! (String)</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/namecase.rb, line 50</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nc!</span>
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nc</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,167 @@
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: TestNameCase</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">TestNameCase</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/test/test_namecase_rb.html">
59
+ test/test_namecase.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
+ Test::Unit::TestCase
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="#M000003">setup</a>&nbsp;&nbsp;
90
+ <a href="#M000004">test_namecase</a>&nbsp;&nbsp;
91
+ <a href="#M000005">test_namecase_modify</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Instance methods</h3>
112
+
113
+ <div id="method-M000003" class="method-detail">
114
+ <a name="M000003"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="TestNameCase.src/M000003.html" target="Code" class="method-signature"
118
+ onclick="popupCode('TestNameCase.src/M000003.html');return false;">
119
+ <span class="method-name">setup</span><span class="method-args">()</span>
120
+ </a>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+ </div>
125
+ </div>
126
+
127
+ <div id="method-M000004" class="method-detail">
128
+ <a name="M000004"></a>
129
+
130
+ <div class="method-heading">
131
+ <a href="TestNameCase.src/M000004.html" target="Code" class="method-signature"
132
+ onclick="popupCode('TestNameCase.src/M000004.html');return false;">
133
+ <span class="method-name">test_namecase</span><span class="method-args">()</span>
134
+ </a>
135
+ </div>
136
+
137
+ <div class="method-description">
138
+ </div>
139
+ </div>
140
+
141
+ <div id="method-M000005" class="method-detail">
142
+ <a name="M000005"></a>
143
+
144
+ <div class="method-heading">
145
+ <a href="TestNameCase.src/M000005.html" target="Code" class="method-signature"
146
+ onclick="popupCode('TestNameCase.src/M000005.html');return false;">
147
+ <span class="method-name">test_namecase_modify</span><span class="method-args">()</span>
148
+ </a>
149
+ </div>
150
+
151
+ <div class="method-description">
152
+ </div>
153
+ </div>
154
+
155
+
156
+ </div>
157
+
158
+
159
+ </div>
160
+
161
+
162
+ <div id="validator-badges">
163
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
164
+ </div>
165
+
166
+ </body>
167
+ </html>
@@ -0,0 +1,6 @@
1
+ /M000001.html/1.1.1.1/Mon Nov 7 23:24:12 2005//
2
+ /M000002.html/1.1.1.1/Mon Nov 7 23:24:12 2005//
3
+ /M000003.html/1.1.1.1/Mon Nov 7 23:59:23 2005//
4
+ /M000004.html/1.1.1.1/Mon Nov 7 23:59:23 2005//
5
+ /M000005.html/1.1.1.1/Mon Nov 7 23:59:23 2005//
6
+ D
@@ -0,0 +1 @@
1
+ namecase/doc/classes/TestNameCase.src
@@ -0,0 +1 @@
1
+ :ext:aaronp@rubyforge.org:/var/cvs/namecase
@@ -0,0 +1,38 @@
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>setup (TestNameCase)</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/test_namecase.rb, line 7</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
15
+ <span class="ruby-ivar">@proper_names</span> = [
16
+ <span class="ruby-value str">&quot;Keith&quot;</span>, <span class="ruby-value str">&quot;Leigh-Williams&quot;</span>, <span class="ruby-value str">&quot;McCarthy&quot;</span>,
17
+ <span class="ruby-value str">&quot;O'Callaghan&quot;</span>, <span class="ruby-value str">&quot;St. John&quot;</span>, <span class="ruby-value str">&quot;von Streit&quot;</span>,
18
+ <span class="ruby-value str">&quot;van Dyke&quot;</span>, <span class="ruby-value str">&quot;Van&quot;</span>, <span class="ruby-value str">&quot;ap Llwyd Dafydd&quot;</span>,
19
+ <span class="ruby-value str">&quot;al Fahd&quot;</span>, <span class="ruby-value str">&quot;Al&quot;</span>,
20
+ <span class="ruby-value str">&quot;el Grecco&quot;</span>,
21
+ <span class="ruby-value str">&quot;ben Gurion&quot;</span>, <span class="ruby-value str">&quot;Ben&quot;</span>,
22
+ <span class="ruby-value str">&quot;da Vinci&quot;</span>,
23
+ <span class="ruby-value str">&quot;di Caprio&quot;</span>, <span class="ruby-value str">&quot;du Pont&quot;</span>, <span class="ruby-value str">&quot;de Legate&quot;</span>,
24
+ <span class="ruby-value str">&quot;del Crond&quot;</span>, <span class="ruby-value str">&quot;der Sind&quot;</span>, <span class="ruby-value str">&quot;van der Post&quot;</span>,
25
+ <span class="ruby-value str">&quot;von Trapp&quot;</span>, <span class="ruby-value str">&quot;la Poisson&quot;</span>, <span class="ruby-value str">&quot;le Figaro&quot;</span>,
26
+ <span class="ruby-value str">&quot;Mack Knife&quot;</span>, <span class="ruby-value str">&quot;Dougal MacDonald&quot;</span>,
27
+ <span class="ruby-comment cmt"># Mac exceptions</span>
28
+ <span class="ruby-value str">&quot;Machin&quot;</span>, <span class="ruby-value str">&quot;Machlin&quot;</span>, <span class="ruby-value str">&quot;Machar&quot;</span>,
29
+ <span class="ruby-value str">&quot;Mackle&quot;</span>, <span class="ruby-value str">&quot;Macklin&quot;</span>, <span class="ruby-value str">&quot;Mackie&quot;</span>,
30
+ <span class="ruby-value str">&quot;Macquarie&quot;</span>, <span class="ruby-value str">&quot;Machado&quot;</span>, <span class="ruby-value str">&quot;Macevicius&quot;</span>,
31
+ <span class="ruby-value str">&quot;Maciulis&quot;</span>, <span class="ruby-value str">&quot;Macias&quot;</span>, <span class="ruby-value str">&quot;MacMurdo&quot;</span>,
32
+ <span class="ruby-comment cmt"># Roman numerals</span>
33
+ <span class="ruby-value str">&quot;Henry VIII&quot;</span>, <span class="ruby-value str">&quot;Louis III&quot;</span>, <span class="ruby-value str">&quot;Louis XIV&quot;</span>,
34
+ <span class="ruby-value str">&quot;Charles II&quot;</span>, <span class="ruby-value str">&quot;Fred XLIX&quot;</span>,
35
+ ]
36
+ <span class="ruby-keyword kw">end</span></pre>
37
+ </body>
38
+ </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>test_namecase (TestNameCase)</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/test_namecase.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_namecase</span>
15
+ <span class="ruby-ivar">@proper_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">nc</span>)
17
+ <span class="ruby-keyword kw">end</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,38 @@
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>setup (TestNameCase)</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/test_namecase.rb, line 7</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
15
+ <span class="ruby-ivar">@proper_names</span> = [
16
+ <span class="ruby-value str">&quot;Keith&quot;</span>, <span class="ruby-value str">&quot;Leigh-Williams&quot;</span>, <span class="ruby-value str">&quot;McCarthy&quot;</span>,
17
+ <span class="ruby-value str">&quot;O'Callaghan&quot;</span>, <span class="ruby-value str">&quot;St. John&quot;</span>, <span class="ruby-value str">&quot;von Streit&quot;</span>,
18
+ <span class="ruby-value str">&quot;van Dyke&quot;</span>, <span class="ruby-value str">&quot;Van&quot;</span>, <span class="ruby-value str">&quot;ap Llwyd Dafydd&quot;</span>,
19
+ <span class="ruby-value str">&quot;al Fahd&quot;</span>, <span class="ruby-value str">&quot;Al&quot;</span>,
20
+ <span class="ruby-value str">&quot;el Grecco&quot;</span>,
21
+ <span class="ruby-value str">&quot;ben Gurion&quot;</span>, <span class="ruby-value str">&quot;Ben&quot;</span>,
22
+ <span class="ruby-value str">&quot;da Vinci&quot;</span>,
23
+ <span class="ruby-value str">&quot;di Caprio&quot;</span>, <span class="ruby-value str">&quot;du Pont&quot;</span>, <span class="ruby-value str">&quot;de Legate&quot;</span>,
24
+ <span class="ruby-value str">&quot;del Crond&quot;</span>, <span class="ruby-value str">&quot;der Sind&quot;</span>, <span class="ruby-value str">&quot;van der Post&quot;</span>,
25
+ <span class="ruby-value str">&quot;von Trapp&quot;</span>, <span class="ruby-value str">&quot;la Poisson&quot;</span>, <span class="ruby-value str">&quot;le Figaro&quot;</span>,
26
+ <span class="ruby-value str">&quot;Mack Knife&quot;</span>, <span class="ruby-value str">&quot;Dougal MacDonald&quot;</span>,
27
+ <span class="ruby-comment cmt"># Mac exceptions</span>
28
+ <span class="ruby-value str">&quot;Machin&quot;</span>, <span class="ruby-value str">&quot;Machlin&quot;</span>, <span class="ruby-value str">&quot;Machar&quot;</span>,
29
+ <span class="ruby-value str">&quot;Mackle&quot;</span>, <span class="ruby-value str">&quot;Macklin&quot;</span>, <span class="ruby-value str">&quot;Mackie&quot;</span>,
30
+ <span class="ruby-value str">&quot;Macquarie&quot;</span>, <span class="ruby-value str">&quot;Machado&quot;</span>, <span class="ruby-value str">&quot;Macevicius&quot;</span>,
31
+ <span class="ruby-value str">&quot;Maciulis&quot;</span>, <span class="ruby-value str">&quot;Macias&quot;</span>, <span class="ruby-value str">&quot;MacMurdo&quot;</span>,
32
+ <span class="ruby-comment cmt"># Roman numerals</span>
33
+ <span class="ruby-value str">&quot;Henry VIII&quot;</span>, <span class="ruby-value str">&quot;Louis III&quot;</span>, <span class="ruby-value str">&quot;Louis XIV&quot;</span>,
34
+ <span class="ruby-value str">&quot;Charles II&quot;</span>, <span class="ruby-value str">&quot;Fred XLIX&quot;</span>,
35
+ ]
36
+ <span class="ruby-keyword kw">end</span></pre>
37
+ </body>
38
+ </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>test_namecase (TestNameCase)</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/test_namecase.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_namecase</span>
15
+ <span class="ruby-ivar">@proper_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">nc_name</span> = <span class="ruby-constant">NameCase</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>)
17
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">nc_name</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">nc</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </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>test_namecase_modify (TestNameCase)</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/test_namecase.rb, line 38</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_namecase_modify</span>
15
+ <span class="ruby-ivar">@proper_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">nc_name</span> = <span class="ruby-constant">NameCase</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>)
17
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">nc_name</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">nc!</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1 @@
1
+ Mon Nov 07 15:59:22 PST 2005
@@ -0,0 +1,3 @@
1
+ D/lib////
2
+ D/test////
3
+ /README.html/1.2/Mon Nov 7 23:59:18 2005//
@@ -0,0 +1 @@
1
+ namecase/doc/files
@@ -0,0 +1 @@
1
+ :ext:aaronp@rubyforge.org:/var/cvs/namecase
@@ -0,0 +1,162 @@
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: README</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>README</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Nov 07 15:56:38 PST 2005</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
+ <h2>NameCase</h2>
73
+ <p>
74
+ Version 1.0.0 - 2005/11/2
75
+ </p>
76
+ <p>
77
+ Original version by Mark Summerfield &lt;<a
78
+ href="http://search.cpan.org/~summer">search.cpan.org/~summer</a>/&gt; Ruby
79
+ port by Aaron Patterson &lt;aaronp@rubyforge.org&gt;
80
+ </p>
81
+ <p>
82
+ NameCase is a Ruby implementation of Lingua::EN::NameCase, a library for
83
+ converting strings to be properly cased. This is good for converting
84
+ denormalized data to human friendly data.
85
+ </p>
86
+ <ul>
87
+ <li>Example Usage
88
+
89
+ </li>
90
+ </ul>
91
+ <p>
92
+ NameCase is a subclass of Ruby&#8217;s <tt>String</tt>, and can be used
93
+ similarly:
94
+ </p>
95
+ <pre>
96
+ string = NameCase.new( string )
97
+ puts string.nc
98
+ puts string.nc!
99
+ </pre>
100
+ <ul>
101
+ <li>Acknowledgements
102
+
103
+ </li>
104
+ </ul>
105
+ <p>
106
+ This library is a port of the Perl library, and owes most of its
107
+ functionality to the Perl version by Mark Summerfield. Any bugs in the Ruby
108
+ port are my fault.
109
+ </p>
110
+ <ul>
111
+ <li>Author
112
+
113
+ </li>
114
+ </ul>
115
+ <p>
116
+ Original Version: Copyright &#169; Mark Summerfield 1998-2002.
117
+ &lt;summer@perlpress.com&gt; All Rights Reserved
118
+ </p>
119
+ <p>
120
+ Ruby Version: Copyright &#169; Aaron Patterson 2005
121
+ </p>
122
+ <ul>
123
+ <li>License
124
+
125
+ </li>
126
+ </ul>
127
+ <p>
128
+ NameCase is distributed under the GPL license. Please see the LICENSE file.
129
+ </p>
130
+
131
+ </div>
132
+
133
+
134
+ </div>
135
+
136
+
137
+ </div>
138
+
139
+
140
+ <!-- if includes -->
141
+
142
+ <div id="section">
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+ <!-- if method_list -->
152
+
153
+
154
+ </div>
155
+
156
+
157
+ <div id="validator-badges">
158
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
159
+ </div>
160
+
161
+ </body>
162
+ </html>