simplemapper 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. data/LICENSE +16 -0
  2. data/README +0 -0
  3. data/Rakefile +78 -0
  4. data/doc/classes/Array.html +139 -0
  5. data/doc/classes/Array.src/M000001.html +34 -0
  6. data/doc/classes/Callbacks.html +161 -0
  7. data/doc/classes/Callbacks.src/M000037.html +18 -0
  8. data/doc/classes/Callbacks.src/M000038.html +18 -0
  9. data/doc/classes/Callbacks.src/M000039.html +19 -0
  10. data/doc/classes/Enumerable.html +131 -0
  11. data/doc/classes/Enumerable.src/M000040.html +21 -0
  12. data/doc/classes/Hash.html +154 -0
  13. data/doc/classes/Hash.src/M000002.html +18 -0
  14. data/doc/classes/Hash.src/M000003.html +34 -0
  15. data/doc/classes/Inflector/Inflections.html +323 -0
  16. data/doc/classes/Inflector/Inflections.src/M000031.html +18 -0
  17. data/doc/classes/Inflector/Inflections.src/M000032.html +18 -0
  18. data/doc/classes/Inflector/Inflections.src/M000033.html +18 -0
  19. data/doc/classes/Inflector/Inflections.src/M000034.html +19 -0
  20. data/doc/classes/Inflector/Inflections.src/M000035.html +18 -0
  21. data/doc/classes/Inflector/Inflections.src/M000036.html +23 -0
  22. data/doc/classes/Inflector.html +516 -0
  23. data/doc/classes/Inflector.src/M000017.html +22 -0
  24. data/doc/classes/Inflector.src/M000018.html +25 -0
  25. data/doc/classes/Inflector.src/M000019.html +25 -0
  26. data/doc/classes/Inflector.src/M000020.html +22 -0
  27. data/doc/classes/Inflector.src/M000021.html +18 -0
  28. data/doc/classes/Inflector.src/M000022.html +22 -0
  29. data/doc/classes/Inflector.src/M000023.html +18 -0
  30. data/doc/classes/Inflector.src/M000024.html +18 -0
  31. data/doc/classes/Inflector.src/M000025.html +18 -0
  32. data/doc/classes/Inflector.src/M000026.html +18 -0
  33. data/doc/classes/Inflector.src/M000027.html +19 -0
  34. data/doc/classes/Inflector.src/M000028.html +18 -0
  35. data/doc/classes/Inflector.src/M000029.html +22 -0
  36. data/doc/classes/Inflector.src/M000030.html +27 -0
  37. data/doc/classes/Merb/Request.html +139 -0
  38. data/doc/classes/Merb/Request.src/M000041.html +22 -0
  39. data/doc/classes/Merb.html +111 -0
  40. data/doc/classes/OAuth/RequestProxy/Base.html +139 -0
  41. data/doc/classes/OAuth/RequestProxy/Base.src/M000012.html +18 -0
  42. data/doc/classes/OAuth/RequestProxy.html +111 -0
  43. data/doc/classes/OAuth/Signature/Base.html +139 -0
  44. data/doc/classes/OAuth/Signature/Base.src/M000011.html +25 -0
  45. data/doc/classes/OAuth/Signature.html +111 -0
  46. data/doc/classes/OAuth.html +112 -0
  47. data/doc/classes/OAuthController.html +243 -0
  48. data/doc/classes/OAuthController.src/M000005.html +22 -0
  49. data/doc/classes/OAuthController.src/M000006.html +18 -0
  50. data/doc/classes/OAuthController.src/M000007.html +18 -0
  51. data/doc/classes/OAuthController.src/M000008.html +25 -0
  52. data/doc/classes/OAuthController.src/M000009.html +19 -0
  53. data/doc/classes/Object.html +142 -0
  54. data/doc/classes/Object.src/M000010.html +19 -0
  55. data/doc/classes/Proc.html +143 -0
  56. data/doc/classes/Proc.src/M000004.html +18 -0
  57. data/doc/classes/Serialize.html +189 -0
  58. data/doc/classes/Serialize.src/M000013.html +21 -0
  59. data/doc/classes/Serialize.src/M000014.html +39 -0
  60. data/doc/classes/Serialize.src/M000015.html +16 -0
  61. data/doc/classes/Serialize.src/M000016.html +46 -0
  62. data/doc/classes/SimpleMapper/Base.html +528 -0
  63. data/doc/classes/SimpleMapper/Base.src/M000064.html +16 -0
  64. data/doc/classes/SimpleMapper/Base.src/M000065.html +16 -0
  65. data/doc/classes/SimpleMapper/Base.src/M000066.html +22 -0
  66. data/doc/classes/SimpleMapper/Base.src/M000067.html +21 -0
  67. data/doc/classes/SimpleMapper/Base.src/M000068.html +26 -0
  68. data/doc/classes/SimpleMapper/Base.src/M000069.html +18 -0
  69. data/doc/classes/SimpleMapper/Base.src/M000070.html +18 -0
  70. data/doc/classes/SimpleMapper/Base.src/M000071.html +18 -0
  71. data/doc/classes/SimpleMapper/Base.src/M000072.html +19 -0
  72. data/doc/classes/SimpleMapper/Base.src/M000073.html +23 -0
  73. data/doc/classes/SimpleMapper/Base.src/M000074.html +18 -0
  74. data/doc/classes/SimpleMapper/Base.src/M000075.html +20 -0
  75. data/doc/classes/SimpleMapper/Base.src/M000076.html +18 -0
  76. data/doc/classes/SimpleMapper/Base.src/M000077.html +18 -0
  77. data/doc/classes/SimpleMapper/Base.src/M000078.html +19 -0
  78. data/doc/classes/SimpleMapper/Base.src/M000079.html +18 -0
  79. data/doc/classes/SimpleMapper/Base.src/M000080.html +18 -0
  80. data/doc/classes/SimpleMapper/Base.src/M000081.html +19 -0
  81. data/doc/classes/SimpleMapper/Base.src/M000082.html +20 -0
  82. data/doc/classes/SimpleMapper/Base.src/M000083.html +24 -0
  83. data/doc/classes/SimpleMapper/Base.src/M000084.html +18 -0
  84. data/doc/classes/SimpleMapper/HttpAdapter.html +280 -0
  85. data/doc/classes/SimpleMapper/HttpAdapter.src/M000056.html +18 -0
  86. data/doc/classes/SimpleMapper/HttpAdapter.src/M000057.html +18 -0
  87. data/doc/classes/SimpleMapper/HttpAdapter.src/M000058.html +19 -0
  88. data/doc/classes/SimpleMapper/HttpAdapter.src/M000060.html +18 -0
  89. data/doc/classes/SimpleMapper/HttpAdapter.src/M000061.html +18 -0
  90. data/doc/classes/SimpleMapper/HttpAdapter.src/M000062.html +18 -0
  91. data/doc/classes/SimpleMapper/HttpAdapter.src/M000063.html +18 -0
  92. data/doc/classes/SimpleMapper/HttpOAuthExtension.html +188 -0
  93. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000048.html +49 -0
  94. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000049.html +23 -0
  95. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000050.html +18 -0
  96. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000051.html +24 -0
  97. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.html +146 -0
  98. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/M000046.html +19 -0
  99. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/M000047.html +19 -0
  100. data/doc/classes/SimpleMapper/SimpleModel.html +184 -0
  101. data/doc/classes/SimpleMapper/SimpleModel.src/M000042.html +18 -0
  102. data/doc/classes/SimpleMapper/SimpleModel.src/M000043.html +18 -0
  103. data/doc/classes/SimpleMapper/SimpleModel.src/M000044.html +18 -0
  104. data/doc/classes/SimpleMapper/SimpleModel.src/M000045.html +24 -0
  105. data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.html +152 -0
  106. data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.src/M000055.html +30 -0
  107. data/doc/classes/SimpleMapper/XmlFormat.html +169 -0
  108. data/doc/classes/SimpleMapper/XmlFormat.src/M000052.html +18 -0
  109. data/doc/classes/SimpleMapper/XmlFormat.src/M000053.html +18 -0
  110. data/doc/classes/SimpleMapper/XmlFormat.src/M000054.html +18 -0
  111. data/doc/classes/SimpleMapper.html +146 -0
  112. data/doc/classes/String.html +120 -0
  113. data/doc/created.rid +1 -0
  114. data/doc/files/lib/simple_mapper/adapters/http_adapter_rb.html +110 -0
  115. data/doc/files/lib/simple_mapper/base_rb.html +108 -0
  116. data/doc/files/lib/simple_mapper/default_plugins/callbacks_rb.html +101 -0
  117. data/doc/files/lib/simple_mapper/default_plugins/oauth_rb.html +116 -0
  118. data/doc/files/lib/simple_mapper/default_plugins/simple_model_rb.html +101 -0
  119. data/doc/files/lib/simple_mapper/formats/xml_format_rb.html +108 -0
  120. data/doc/files/lib/simple_mapper/support/bliss_serializer_rb.html +109 -0
  121. data/doc/files/lib/simple_mapper/support/core_ext_rb.html +108 -0
  122. data/doc/files/lib/simple_mapper/support/inflections_rb.html +101 -0
  123. data/doc/files/lib/simple_mapper/support/inflector_rb.html +108 -0
  124. data/doc/files/lib/simple_mapper/support_rb.html +109 -0
  125. data/doc/files/lib/simple_mapper_rb.html +137 -0
  126. data/doc/fr_class_index.html +52 -0
  127. data/doc/fr_file_index.html +38 -0
  128. data/doc/fr_method_index.html +110 -0
  129. data/doc/index.html +24 -0
  130. data/doc/rdoc-style.css +208 -0
  131. data/lib/simple_mapper/adapters/http_adapter.rb +64 -0
  132. data/lib/simple_mapper/base.rb +138 -0
  133. data/lib/simple_mapper/default_plugins/callbacks.rb +12 -0
  134. data/lib/simple_mapper/default_plugins/oauth.rb +167 -0
  135. data/lib/simple_mapper/default_plugins/simple_model.rb +36 -0
  136. data/lib/simple_mapper/formats/xml_format.rb +48 -0
  137. data/lib/simple_mapper/support/bliss_serializer.rb +168 -0
  138. data/lib/simple_mapper/support/core_ext.rb +73 -0
  139. data/lib/simple_mapper/support/inflections.rb +112 -0
  140. data/lib/simple_mapper/support/inflector.rb +275 -0
  141. data/lib/simple_mapper/support.rb +2 -0
  142. data/lib/simple_mapper.rb +16 -0
  143. metadata +236 -0
@@ -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>add_callback (Callbacks)</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/simple_mapper/default_plugins/callbacks.rb, line 5</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_callback</span>(<span class="ruby-identifier">name</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-identifier">callbacks</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">block</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -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>run_callback (Callbacks)</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/simple_mapper/default_plugins/callbacks.rb, line 8</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_callback</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
+ <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
16
+ <span class="ruby-identifier">callbacks</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">args</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">args</span>,<span class="ruby-identifier">cb</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cb</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)}
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,131 @@
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/simple_mapper/support/core_ext_rb.html">
59
+ lib/simple_mapper/support/core_ext.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="#M000040">group_by</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+ <div id="methods">
103
+ <h3 class="section-bar">Public Instance methods</h3>
104
+
105
+ <div id="method-M000040" class="method-detail">
106
+ <a name="M000040"></a>
107
+
108
+ <div class="method-heading">
109
+ <a href="Enumerable.src/M000040.html" target="Code" class="method-signature"
110
+ onclick="popupCode('Enumerable.src/M000040.html');return false;">
111
+ <span class="method-name">group_by</span><span class="method-args">() {|element| ...}</span>
112
+ </a>
113
+ </div>
114
+
115
+ <div class="method-description">
116
+ </div>
117
+ </div>
118
+
119
+
120
+ </div>
121
+
122
+
123
+ </div>
124
+
125
+
126
+ <div id="validator-badges">
127
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
128
+ </div>
129
+
130
+ </body>
131
+ </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/simple_mapper/support/core_ext.rb, line 67</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,154 @@
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: Hash</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">Hash</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/simple_mapper/support/core_ext_rb.html">
59
+ lib/simple_mapper/support/core_ext.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
+ <a href="Object.html">
69
+ Object
70
+ </a>
71
+ </td>
72
+ </tr>
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
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000003">crawl</a>&nbsp;&nbsp;
92
+ <a href="#M000002">stringify_keys!</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+ <div id="methods">
112
+ <h3 class="section-bar">Public Instance methods</h3>
113
+
114
+ <div id="method-M000003" class="method-detail">
115
+ <a name="M000003"></a>
116
+
117
+ <div class="method-heading">
118
+ <a href="Hash.src/M000003.html" target="Code" class="method-signature"
119
+ onclick="popupCode('Hash.src/M000003.html');return false;">
120
+ <span class="method-name">crawl</span><span class="method-args">() {|v| ...}</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ </div>
126
+ </div>
127
+
128
+ <div id="method-M000002" class="method-detail">
129
+ <a name="M000002"></a>
130
+
131
+ <div class="method-heading">
132
+ <a href="Hash.src/M000002.html" target="Code" class="method-signature"
133
+ onclick="popupCode('Hash.src/M000002.html');return false;">
134
+ <span class="method-name">stringify_keys!</span><span class="method-args">()</span>
135
+ </a>
136
+ </div>
137
+
138
+ <div class="method-description">
139
+ </div>
140
+ </div>
141
+
142
+
143
+ </div>
144
+
145
+
146
+ </div>
147
+
148
+
149
+ <div id="validator-badges">
150
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
151
+ </div>
152
+
153
+ </body>
154
+ </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>stringify_keys! (Hash)</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/simple_mapper/support/core_ext.rb, line 19</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys!</span>
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)}
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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 (Hash)</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/simple_mapper/support/core_ext.rb, line 23</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">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">arity</span>
18
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
19
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">v</span>)
20
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span>
21
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
22
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span>
23
+ <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>)
24
+ <span class="ruby-identifier">v</span> = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</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,323 @@
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: Inflector::Inflections</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">Inflector::Inflections</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/simple_mapper/support/inflector_rb.html">
59
+ lib/simple_mapper/support/inflector.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
+ <a href="../Object.html">
69
+ Object
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ A singleton instance of this class is yielded by <a
86
+ href="../Inflector.html#M000017">Inflector.inflections</a>, which can then
87
+ be used to specify additional inflection rules. Examples:
88
+ </p>
89
+ <pre>
90
+ Inflector.inflections do |inflect|
91
+ inflect.plural /^(ox)$/i, '\1\2en'
92
+ inflect.singular /^(ox)en/i, '\1'
93
+
94
+ inflect.irregular 'octopus', 'octopi'
95
+
96
+ inflect.uncountable &quot;equipment&quot;
97
+ end
98
+ </pre>
99
+ <p>
100
+ New rules are added at the top. So in the example above, the <a
101
+ href="Inflections.html#M000034">irregular</a> rule for octopus will now be
102
+ the first of the pluralization and singularization rules that is runs. This
103
+ guarantees that your rules run before any of the rules that may already
104
+ have been loaded.
105
+ </p>
106
+
107
+ </div>
108
+
109
+
110
+ </div>
111
+
112
+ <div id="method-list">
113
+ <h3 class="section-bar">Methods</h3>
114
+
115
+ <div class="name-list">
116
+ <a href="#M000036">clear</a>&nbsp;&nbsp;
117
+ <a href="#M000034">irregular</a>&nbsp;&nbsp;
118
+ <a href="#M000031">new</a>&nbsp;&nbsp;
119
+ <a href="#M000032">plural</a>&nbsp;&nbsp;
120
+ <a href="#M000033">singular</a>&nbsp;&nbsp;
121
+ <a href="#M000035">uncountable</a>&nbsp;&nbsp;
122
+ </div>
123
+ </div>
124
+
125
+ </div>
126
+
127
+
128
+ <!-- if includes -->
129
+ <div id="includes">
130
+ <h3 class="section-bar">Included Modules</h3>
131
+
132
+ <div id="includes-list">
133
+ <span class="include-name">Singleton</span>
134
+ </div>
135
+ </div>
136
+
137
+ <div id="section">
138
+
139
+
140
+
141
+
142
+
143
+ <div id="attribute-list">
144
+ <h3 class="section-bar">Attributes</h3>
145
+
146
+ <div class="name-list">
147
+ <table>
148
+ <tr class="top-aligned-row context-row">
149
+ <td class="context-item-name">plurals</td>
150
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
151
+ <td class="context-item-desc"></td>
152
+ </tr>
153
+ <tr class="top-aligned-row context-row">
154
+ <td class="context-item-name">singulars</td>
155
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
156
+ <td class="context-item-desc"></td>
157
+ </tr>
158
+ <tr class="top-aligned-row context-row">
159
+ <td class="context-item-name">uncountables</td>
160
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
161
+ <td class="context-item-desc"></td>
162
+ </tr>
163
+ </table>
164
+ </div>
165
+ </div>
166
+
167
+
168
+
169
+ <!-- if method_list -->
170
+ <div id="methods">
171
+ <h3 class="section-bar">Public Class methods</h3>
172
+
173
+ <div id="method-M000031" class="method-detail">
174
+ <a name="M000031"></a>
175
+
176
+ <div class="method-heading">
177
+ <a href="Inflections.src/M000031.html" target="Code" class="method-signature"
178
+ onclick="popupCode('Inflections.src/M000031.html');return false;">
179
+ <span class="method-name">new</span><span class="method-args">()</span>
180
+ </a>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+ </div>
185
+ </div>
186
+
187
+ <h3 class="section-bar">Public Instance methods</h3>
188
+
189
+ <div id="method-M000036" class="method-detail">
190
+ <a name="M000036"></a>
191
+
192
+ <div class="method-heading">
193
+ <a href="Inflections.src/M000036.html" target="Code" class="method-signature"
194
+ onclick="popupCode('Inflections.src/M000036.html');return false;">
195
+ <span class="method-name">clear</span><span class="method-args">(scope = :all)</span>
196
+ </a>
197
+ </div>
198
+
199
+ <div class="method-description">
200
+ <p>
201
+ Clears the loaded inflections within a given scope (default is :all). Give
202
+ the scope as a symbol of the inflection type, the options are: :plurals,
203
+ :singulars, :uncountables
204
+ </p>
205
+ <p>
206
+ Examples:
207
+ </p>
208
+ <pre>
209
+ clear :all
210
+ clear :plurals
211
+ </pre>
212
+ </div>
213
+ </div>
214
+
215
+ <div id="method-M000034" class="method-detail">
216
+ <a name="M000034"></a>
217
+
218
+ <div class="method-heading">
219
+ <a href="Inflections.src/M000034.html" target="Code" class="method-signature"
220
+ onclick="popupCode('Inflections.src/M000034.html');return false;">
221
+ <span class="method-name">irregular</span><span class="method-args">(singular, plural)</span>
222
+ </a>
223
+ </div>
224
+
225
+ <div class="method-description">
226
+ <p>
227
+ Specifies a <a href="Inflections.html#M000031">new</a> <a
228
+ href="Inflections.html#M000034">irregular</a> that applies to both
229
+ pluralization and singularization at the same time. This can only be used
230
+ for strings, not regular expressions. You simply pass the <a
231
+ href="Inflections.html#M000034">irregular</a> in <a
232
+ href="Inflections.html#M000033">singular</a> and <a
233
+ href="Inflections.html#M000032">plural</a> form.
234
+ </p>
235
+ <p>
236
+ Examples:
237
+ </p>
238
+ <pre>
239
+ irregular 'octopus', 'octopi'
240
+ irregular 'person', 'people'
241
+ </pre>
242
+ </div>
243
+ </div>
244
+
245
+ <div id="method-M000032" class="method-detail">
246
+ <a name="M000032"></a>
247
+
248
+ <div class="method-heading">
249
+ <a href="Inflections.src/M000032.html" target="Code" class="method-signature"
250
+ onclick="popupCode('Inflections.src/M000032.html');return false;">
251
+ <span class="method-name">plural</span><span class="method-args">(rule, replacement)</span>
252
+ </a>
253
+ </div>
254
+
255
+ <div class="method-description">
256
+ <p>
257
+ Specifies a <a href="Inflections.html#M000031">new</a> pluralization rule
258
+ and its replacement. The rule can either be a string or a regular
259
+ expression. The replacement should always be a string that may include
260
+ references to the matched data from the rule.
261
+ </p>
262
+ </div>
263
+ </div>
264
+
265
+ <div id="method-M000033" class="method-detail">
266
+ <a name="M000033"></a>
267
+
268
+ <div class="method-heading">
269
+ <a href="Inflections.src/M000033.html" target="Code" class="method-signature"
270
+ onclick="popupCode('Inflections.src/M000033.html');return false;">
271
+ <span class="method-name">singular</span><span class="method-args">(rule, replacement)</span>
272
+ </a>
273
+ </div>
274
+
275
+ <div class="method-description">
276
+ <p>
277
+ Specifies a <a href="Inflections.html#M000031">new</a> singularization rule
278
+ and its replacement. The rule can either be a string or a regular
279
+ expression. The replacement should always be a string that may include
280
+ references to the matched data from the rule.
281
+ </p>
282
+ </div>
283
+ </div>
284
+
285
+ <div id="method-M000035" class="method-detail">
286
+ <a name="M000035"></a>
287
+
288
+ <div class="method-heading">
289
+ <a href="Inflections.src/M000035.html" target="Code" class="method-signature"
290
+ onclick="popupCode('Inflections.src/M000035.html');return false;">
291
+ <span class="method-name">uncountable</span><span class="method-args">(*words)</span>
292
+ </a>
293
+ </div>
294
+
295
+ <div class="method-description">
296
+ <p>
297
+ Add <a href="Inflections.html#M000035">uncountable</a> words that
298
+ shouldn&#8216;t be attempted inflected.
299
+ </p>
300
+ <p>
301
+ Examples:
302
+ </p>
303
+ <pre>
304
+ uncountable &quot;money&quot;
305
+ uncountable &quot;money&quot;, &quot;information&quot;
306
+ uncountable %w( money information rice )
307
+ </pre>
308
+ </div>
309
+ </div>
310
+
311
+
312
+ </div>
313
+
314
+
315
+ </div>
316
+
317
+
318
+ <div id="validator-badges">
319
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
320
+ </div>
321
+
322
+ </body>
323
+ </html>