formattedstring 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/README +5 -0
  2. data/Rakefile +1 -1
  3. data/doc/classes/Enumerable.html +146 -0
  4. data/doc/classes/Enumerable.src/M000029.html +21 -0
  5. data/doc/classes/Enumerable.src/M000030.html +34 -0
  6. data/doc/classes/FormattedString.html +119 -0
  7. data/doc/classes/FormattedString/Formats.html +121 -0
  8. data/doc/classes/FormattedString/Formats/Json.html +159 -0
  9. data/doc/classes/FormattedString/Formats/Json.src/M000006.html +18 -0
  10. data/doc/classes/FormattedString/Formats/Json.src/M000007.html +18 -0
  11. data/doc/classes/FormattedString/Formats/Xml.html +159 -0
  12. data/doc/classes/FormattedString/Formats/Xml.src/M000004.html +18 -0
  13. data/doc/classes/FormattedString/Formats/Xml.src/M000005.html +52 -0
  14. data/doc/classes/FormattedString/Formats/Yaml.html +131 -0
  15. data/doc/classes/FormattedString/Formats/Yaml.src/M000008.html +18 -0
  16. data/doc/classes/Inflector.html +516 -0
  17. data/doc/classes/Inflector.src/M000009.html +22 -0
  18. data/doc/classes/Inflector.src/M000010.html +25 -0
  19. data/doc/classes/Inflector.src/M000011.html +25 -0
  20. data/doc/classes/Inflector.src/M000012.html +22 -0
  21. data/doc/classes/Inflector.src/M000013.html +18 -0
  22. data/doc/classes/Inflector.src/M000014.html +22 -0
  23. data/doc/classes/Inflector.src/M000015.html +18 -0
  24. data/doc/classes/Inflector.src/M000016.html +18 -0
  25. data/doc/classes/Inflector.src/M000017.html +18 -0
  26. data/doc/classes/Inflector.src/M000018.html +18 -0
  27. data/doc/classes/Inflector.src/M000019.html +19 -0
  28. data/doc/classes/Inflector.src/M000020.html +18 -0
  29. data/doc/classes/Inflector.src/M000021.html +22 -0
  30. data/doc/classes/Inflector.src/M000022.html +27 -0
  31. data/doc/classes/Inflector/Inflections.html +321 -0
  32. data/doc/classes/Inflector/Inflections.src/M000023.html +18 -0
  33. data/doc/classes/Inflector/Inflections.src/M000024.html +18 -0
  34. data/doc/classes/Inflector/Inflections.src/M000025.html +18 -0
  35. data/doc/classes/Inflector/Inflections.src/M000026.html +26 -0
  36. data/doc/classes/Inflector/Inflections.src/M000027.html +18 -0
  37. data/doc/classes/Inflector/Inflections.src/M000028.html +23 -0
  38. data/doc/classes/String.html +191 -0
  39. data/doc/classes/String.src/M000001.html +18 -0
  40. data/doc/classes/String.src/M000002.html +20 -0
  41. data/doc/classes/String.src/M000003.html +19 -0
  42. data/doc/created.rid +1 -0
  43. data/doc/files/LICENSE.html +129 -0
  44. data/doc/files/README.html +201 -0
  45. data/doc/files/lib/formatted_string/formats/json_rb.html +108 -0
  46. data/doc/files/lib/formatted_string/formats/xml_rb.html +119 -0
  47. data/doc/files/lib/formatted_string/formats/yaml_rb.html +101 -0
  48. data/doc/files/lib/formatted_string_rb.html +108 -0
  49. data/doc/files/lib/inflections_rb.html +101 -0
  50. data/doc/files/lib/inflector_rb.html +108 -0
  51. data/doc/fr_class_index.html +35 -0
  52. data/doc/fr_file_index.html +34 -0
  53. data/doc/fr_method_index.html +56 -0
  54. data/doc/index.html +24 -0
  55. data/doc/rdoc-style.css +208 -0
  56. data/lib/formatted_string/formats/json.rb +20 -0
  57. data/lib/formatted_string/formats/xml.rb +8 -5
  58. data/lib/formatted_string/formats/yaml.rb +9 -0
  59. metadata +72 -2
data/README CHANGED
@@ -55,3 +55,8 @@ Open to contributions. Please email gems@behindlogic.com with your suggestions,
55
55
  * Daniel Parker (mailto:gems@behindlogic.com)
56
56
 
57
57
  This library is released under the terms of the MIT License.
58
+
59
+ == Changelog
60
+
61
+ 0.1.0 Simple and Stable. Included XML and YAML formats.
62
+ 0.1.1 Adds JSON format.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'rake/gempackagetask'
6
6
  require 'rake/contrib/rubyforgepublisher'
7
7
 
8
8
  PKG_NAME = 'formattedstring'
9
- PKG_VERSION = "0.1.0"
9
+ PKG_VERSION = "0.1.1"
10
10
 
11
11
  PKG_FILES = FileList[
12
12
  "lib/**/*", "rspec/**/*", "[A-Z]*", "Rakefile", "doc/**/*"
@@ -0,0 +1,146 @@
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>Module: Enumerable</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>Module</strong></td>
53
+ <td class="class-name-in-header">Enumerable</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/formatted_string/formats/xml_rb.html">
59
+ lib/formatted_string/formats/xml.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000030">crawl</a>&nbsp;&nbsp;
84
+ <a href="#M000029">group_by</a>&nbsp;&nbsp;
85
+ </div>
86
+ </div>
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <!-- if method_list -->
103
+ <div id="methods">
104
+ <h3 class="section-bar">Public Instance methods</h3>
105
+
106
+ <div id="method-M000030" class="method-detail">
107
+ <a name="M000030"></a>
108
+
109
+ <div class="method-heading">
110
+ <a href="Enumerable.src/M000030.html" target="Code" class="method-signature"
111
+ onclick="popupCode('Enumerable.src/M000030.html');return false;">
112
+ <span class="method-name">crawl</span><span class="method-args">() {|v| ...}</span>
113
+ </a>
114
+ </div>
115
+
116
+ <div class="method-description">
117
+ </div>
118
+ </div>
119
+
120
+ <div id="method-M000029" class="method-detail">
121
+ <a name="M000029"></a>
122
+
123
+ <div class="method-heading">
124
+ <a href="Enumerable.src/M000029.html" target="Code" class="method-signature"
125
+ onclick="popupCode('Enumerable.src/M000029.html');return false;">
126
+ <span class="method-name">group_by</span><span class="method-args">() {|element| ...}</span>
127
+ </a>
128
+ </div>
129
+
130
+ <div class="method-description">
131
+ </div>
132
+ </div>
133
+
134
+
135
+ </div>
136
+
137
+
138
+ </div>
139
+
140
+
141
+ <div id="validator-badges">
142
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
143
+ </div>
144
+
145
+ </body>
146
+ </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>group_by (Enumerable)</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/formatted_string/formats/xml.rb, line 11</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group_by</span>
15
+ <span class="ruby-identifier">inject</span>({}) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">groups</span>, <span class="ruby-identifier">element</span><span class="ruby-operator">|</span>
16
+ (<span class="ruby-identifier">groups</span>[<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">element</span>)] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">element</span>
17
+ <span class="ruby-identifier">groups</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,34 @@
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>crawl (Enumerable)</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/formatted_string/formats/xml.rb, line 18</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">crawl</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;no block given&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
16
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">k</span> = <span class="ruby-keyword kw">self</span>
18
+ <span class="ruby-identifier">v</span> = <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">arity</span>
19
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
20
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">v</span>)
21
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span>
22
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
23
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span>
24
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-keyword kw">self</span>,<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
25
+ <span class="ruby-keyword kw">end</span>
26
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
27
+ <span class="ruby-identifier">v</span>.<span class="ruby-identifier">crawl</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
28
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
29
+ <span class="ruby-identifier">v</span>.<span class="ruby-identifier">crawl</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
30
+ <span class="ruby-keyword kw">end</span>
31
+ <span class="ruby-keyword kw">end</span>
32
+ <span class="ruby-keyword kw">end</span></pre>
33
+ </body>
34
+ </html>
@@ -0,0 +1,119 @@
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>Module: FormattedString</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>Module</strong></td>
53
+ <td class="class-name-in-header">FormattedString</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/formatted_string/formats/json_rb.html">
59
+ lib/formatted_string/formats/json.rb
60
+ </a>
61
+ <br />
62
+ <a href="../files/lib/formatted_string/formats/xml_rb.html">
63
+ lib/formatted_string/formats/xml.rb
64
+ </a>
65
+ <br />
66
+ <a href="../files/lib/formatted_string/formats/yaml_rb.html">
67
+ lib/formatted_string/formats/yaml.rb
68
+ </a>
69
+ <br />
70
+ </td>
71
+ </tr>
72
+
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+ <div id="class-list">
96
+ <h3 class="section-bar">Classes and Modules</h3>
97
+
98
+ Module <a href="FormattedString/Formats.html" class="link">FormattedString::Formats</a><br />
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <!-- if method_list -->
109
+
110
+
111
+ </div>
112
+
113
+
114
+ <div id="validator-badges">
115
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
116
+ </div>
117
+
118
+ </body>
119
+ </html>
@@ -0,0 +1,121 @@
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>Module: FormattedString::Formats</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>Module</strong></td>
53
+ <td class="class-name-in-header">FormattedString::Formats</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/formatted_string/formats/json_rb.html">
59
+ lib/formatted_string/formats/json.rb
60
+ </a>
61
+ <br />
62
+ <a href="../../files/lib/formatted_string/formats/xml_rb.html">
63
+ lib/formatted_string/formats/xml.rb
64
+ </a>
65
+ <br />
66
+ <a href="../../files/lib/formatted_string/formats/yaml_rb.html">
67
+ lib/formatted_string/formats/yaml.rb
68
+ </a>
69
+ <br />
70
+ </td>
71
+ </tr>
72
+
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+ <div id="class-list">
96
+ <h3 class="section-bar">Classes and Modules</h3>
97
+
98
+ Module <a href="Formats/Json.html" class="link">FormattedString::Formats::Json</a><br />
99
+ Module <a href="Formats/Xml.html" class="link">FormattedString::Formats::Xml</a><br />
100
+ Module <a href="Formats/Yaml.html" class="link">FormattedString::Formats::Yaml</a><br />
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+
112
+
113
+ </div>
114
+
115
+
116
+ <div id="validator-badges">
117
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
118
+ </div>
119
+
120
+ </body>
121
+ </html>