simplemapper 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. data/LICENSE +1 -1
  2. data/README +16 -0
  3. data/Rakefile +1 -1
  4. data/doc/classes/Array.html +24 -5
  5. data/doc/classes/{Inflector.src/M000017.html → Array.src/M000005.html} +4 -8
  6. data/doc/classes/Array.src/{M000001.html → M000006.html} +1 -1
  7. data/doc/classes/Callbacks.html +15 -15
  8. data/doc/classes/Callbacks.src/{M000037.html → M000040.html} +0 -0
  9. data/doc/classes/Callbacks.src/{M000038.html → M000041.html} +0 -0
  10. data/doc/classes/Callbacks.src/{M000039.html → M000042.html} +0 -0
  11. data/doc/classes/Enumerable.html +5 -5
  12. data/doc/classes/Enumerable.src/{M000040.html → M000043.html} +1 -1
  13. data/doc/classes/Hash.html +23 -4
  14. data/doc/classes/Hash.src/M000002.html +6 -4
  15. data/doc/classes/Hash.src/M000003.html +4 -20
  16. data/doc/classes/Hash.src/M000004.html +34 -0
  17. data/doc/classes/Inflector/Inflections.html +40 -40
  18. data/doc/classes/Inflector/Inflections.src/M000034.html +4 -5
  19. data/doc/classes/Inflector/Inflections.src/M000035.html +4 -4
  20. data/doc/classes/Inflector/Inflections.src/M000036.html +4 -9
  21. data/doc/classes/Inflector/Inflections.src/M000037.html +19 -0
  22. data/doc/classes/Inflector/Inflections.src/{M000031.html → M000038.html} +4 -4
  23. data/doc/classes/Inflector/Inflections.src/M000039.html +23 -0
  24. data/doc/classes/Inflector.html +82 -82
  25. data/doc/classes/Inflector.src/M000020.html +6 -6
  26. data/doc/classes/Inflector.src/M000021.html +11 -4
  27. data/doc/classes/Inflector.src/M000022.html +11 -8
  28. data/doc/classes/Inflector.src/M000023.html +8 -4
  29. data/doc/classes/Inflector.src/M000024.html +4 -4
  30. data/doc/classes/Inflector.src/M000025.html +8 -4
  31. data/doc/classes/Inflector.src/M000026.html +4 -4
  32. data/doc/classes/Inflector.src/M000027.html +4 -5
  33. data/doc/classes/Inflector.src/M000028.html +4 -4
  34. data/doc/classes/Inflector.src/M000029.html +4 -8
  35. data/doc/classes/Inflector.src/M000030.html +5 -13
  36. data/doc/classes/Inflector.src/M000031.html +18 -0
  37. data/doc/classes/Inflector.src/M000032.html +22 -0
  38. data/doc/classes/Inflector.src/M000033.html +27 -0
  39. data/doc/classes/Merb/Request.html +5 -5
  40. data/doc/classes/Merb/Request.src/{M000041.html → M000044.html} +1 -1
  41. data/doc/classes/OAuth/RequestProxy/Base.html +5 -5
  42. data/doc/classes/OAuth/RequestProxy/Base.src/{M000012.html → M000015.html} +1 -1
  43. data/doc/classes/OAuth/Signature/Base.html +5 -5
  44. data/doc/classes/OAuth/Signature/Base.src/{M000011.html → M000014.html} +1 -1
  45. data/doc/classes/OAuthController.html +25 -25
  46. data/doc/classes/OAuthController.src/M000008.html +8 -11
  47. data/doc/classes/OAuthController.src/M000009.html +4 -5
  48. data/doc/classes/OAuthController.src/{M000007.html → M000010.html} +1 -1
  49. data/doc/classes/OAuthController.src/M000011.html +25 -0
  50. data/doc/classes/OAuthController.src/M000012.html +19 -0
  51. data/doc/classes/Object.html +18 -6
  52. data/doc/classes/Object.src/{M000010.html → M000013.html} +2 -2
  53. data/doc/classes/Proc.html +5 -5
  54. data/doc/classes/Proc.src/{M000004.html → M000007.html} +0 -0
  55. data/doc/classes/Serialize.html +20 -20
  56. data/doc/classes/Serialize.src/M000016.html +7 -32
  57. data/doc/classes/Serialize.src/{M000014.html → M000017.html} +1 -1
  58. data/doc/classes/Serialize.src/{M000015.html → M000018.html} +1 -1
  59. data/doc/classes/Serialize.src/M000019.html +18 -0
  60. data/doc/classes/SimpleMapper/Base.html +149 -124
  61. data/doc/classes/SimpleMapper/Base.src/M000067.html +3 -8
  62. data/doc/classes/SimpleMapper/Base.src/M000068.html +3 -13
  63. data/doc/classes/SimpleMapper/Base.src/M000069.html +4 -4
  64. data/doc/classes/SimpleMapper/Base.src/M000070.html +15 -4
  65. data/doc/classes/SimpleMapper/Base.src/M000071.html +7 -4
  66. data/doc/classes/SimpleMapper/Base.src/M000072.html +4 -5
  67. data/doc/classes/SimpleMapper/Base.src/M000073.html +12 -9
  68. data/doc/classes/SimpleMapper/Base.src/M000074.html +8 -5
  69. data/doc/classes/SimpleMapper/Base.src/M000075.html +5 -7
  70. data/doc/classes/SimpleMapper/Base.src/M000076.html +5 -5
  71. data/doc/classes/SimpleMapper/Base.src/M000077.html +6 -5
  72. data/doc/classes/SimpleMapper/Base.src/M000078.html +10 -6
  73. data/doc/classes/SimpleMapper/Base.src/M000079.html +4 -4
  74. data/doc/classes/SimpleMapper/Base.src/M000080.html +6 -4
  75. data/doc/classes/SimpleMapper/Base.src/M000081.html +4 -5
  76. data/doc/classes/SimpleMapper/Base.src/M000082.html +4 -6
  77. data/doc/classes/SimpleMapper/Base.src/M000083.html +5 -10
  78. data/doc/classes/SimpleMapper/Base.src/M000084.html +4 -4
  79. data/doc/classes/SimpleMapper/{HttpAdapter.src/M000057.html → Base.src/M000085.html} +4 -4
  80. data/doc/classes/SimpleMapper/Base.src/M000086.html +19 -0
  81. data/doc/classes/SimpleMapper/Base.src/M000087.html +20 -0
  82. data/doc/classes/SimpleMapper/Base.src/M000088.html +24 -0
  83. data/doc/classes/SimpleMapper/Base.src/M000089.html +18 -0
  84. data/doc/classes/SimpleMapper/HttpAdapter.html +40 -40
  85. data/doc/classes/SimpleMapper/HttpAdapter.src/{M000056.html → M000059.html} +1 -1
  86. data/doc/classes/SimpleMapper/HttpAdapter.src/M000060.html +4 -4
  87. data/doc/classes/SimpleMapper/HttpAdapter.src/M000061.html +5 -4
  88. data/doc/classes/SimpleMapper/HttpAdapter.src/M000063.html +5 -4
  89. data/doc/classes/SimpleMapper/HttpAdapter.src/M000064.html +18 -0
  90. data/doc/classes/SimpleMapper/HttpAdapter.src/{M000062.html → M000065.html} +1 -1
  91. data/doc/classes/SimpleMapper/HttpAdapter.src/M000066.html +18 -0
  92. data/doc/classes/SimpleMapper/HttpOAuthExtension.html +22 -22
  93. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000051.html +27 -4
  94. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000049.html → M000052.html} +1 -3
  95. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000050.html → M000053.html} +1 -1
  96. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000054.html +24 -0
  97. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.html +10 -10
  98. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000046.html → M000049.html} +0 -0
  99. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000047.html → M000050.html} +0 -0
  100. data/doc/classes/SimpleMapper/SimpleModel.html +20 -20
  101. data/doc/classes/SimpleMapper/SimpleModel.src/M000045.html +4 -10
  102. data/doc/classes/SimpleMapper/SimpleModel.src/{M000043.html → M000046.html} +0 -0
  103. data/doc/classes/SimpleMapper/SimpleModel.src/{M000044.html → M000047.html} +0 -0
  104. data/doc/classes/SimpleMapper/SimpleModel.src/M000048.html +24 -0
  105. data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.html +5 -5
  106. data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.src/{M000055.html → M000058.html} +5 -3
  107. data/doc/classes/SimpleMapper/XmlFormat.html +15 -15
  108. data/doc/classes/SimpleMapper/XmlFormat.src/{M000052.html → M000055.html} +1 -1
  109. data/doc/classes/SimpleMapper/XmlFormat.src/{M000053.html → M000056.html} +1 -1
  110. data/doc/classes/SimpleMapper/XmlFormat.src/{M000054.html → M000057.html} +4 -2
  111. data/doc/classes/Time.html +139 -0
  112. data/doc/classes/{OAuthController.src/M000006.html → Time.src/M000001.html} +4 -4
  113. data/doc/created.rid +1 -1
  114. data/doc/files/lib/simple_mapper/adapters/http_adapter_rb.html +2 -1
  115. data/doc/files/lib/simple_mapper/base_rb.html +1 -1
  116. data/doc/files/lib/simple_mapper/default_plugins/callbacks_rb.html +1 -1
  117. data/doc/files/lib/simple_mapper/default_plugins/oauth_rb.html +1 -7
  118. data/doc/files/lib/simple_mapper/default_plugins/options_to_query_rb.html +116 -0
  119. data/doc/files/lib/simple_mapper/default_plugins/simple_model_rb.html +1 -1
  120. data/doc/files/lib/simple_mapper/formats/xml_format_rb.html +3 -1
  121. data/doc/files/lib/simple_mapper/support/bliss_serializer_rb.html +2 -1
  122. data/doc/files/lib/simple_mapper/support/core_ext_rb.html +1 -1
  123. data/doc/files/lib/simple_mapper/support/inflections_rb.html +1 -1
  124. data/doc/files/lib/simple_mapper/support/inflector_rb.html +1 -1
  125. data/doc/files/lib/simple_mapper/support_rb.html +1 -1
  126. data/doc/files/lib/simple_mapper_rb.html +1 -1
  127. data/doc/fr_class_index.html +1 -0
  128. data/doc/fr_file_index.html +1 -0
  129. data/doc/fr_method_index.html +89 -84
  130. data/lib/simple_mapper/adapters/http_adapter.rb +4 -2
  131. data/lib/simple_mapper/base.rb +46 -23
  132. data/lib/simple_mapper/default_plugins/oauth.rb +3 -6
  133. data/lib/simple_mapper/default_plugins/options_to_query.rb +31 -0
  134. data/lib/simple_mapper/formats/xml_format.rb +10 -3
  135. data/lib/simple_mapper/support/bliss_serializer.rb +3 -113
  136. data/lib/simple_mapper/support/core_ext.rb +6 -2
  137. data/lib/simple_mapper/support/inflections.rb +1 -1
  138. metadata +52 -43
  139. data/doc/classes/Inflector/Inflections.src/M000032.html +0 -18
  140. data/doc/classes/Inflector/Inflections.src/M000033.html +0 -18
  141. data/doc/classes/Inflector.src/M000018.html +0 -25
  142. data/doc/classes/Inflector.src/M000019.html +0 -25
  143. data/doc/classes/OAuthController.src/M000005.html +0 -22
  144. data/doc/classes/Serialize.src/M000013.html +0 -21
  145. data/doc/classes/SimpleMapper/Base.src/M000064.html +0 -16
  146. data/doc/classes/SimpleMapper/Base.src/M000065.html +0 -16
  147. data/doc/classes/SimpleMapper/Base.src/M000066.html +0 -22
  148. data/doc/classes/SimpleMapper/HttpAdapter.src/M000058.html +0 -19
  149. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000048.html +0 -49
  150. data/doc/classes/SimpleMapper/SimpleModel.src/M000042.html +0 -18
@@ -88,27 +88,29 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000068">connection</a>&nbsp;&nbsp;
92
- <a href="#M000066">connection_adapter=</a>&nbsp;&nbsp;
93
- <a href="#M000070">create</a>&nbsp;&nbsp;
94
- <a href="#M000077">data</a>&nbsp;&nbsp;
95
- <a href="#M000076">data=</a>&nbsp;&nbsp;
96
- <a href="#M000065">debug!</a>&nbsp;&nbsp;
97
- <a href="#M000064">debug?</a>&nbsp;&nbsp;
98
- <a href="#M000083">delete</a>&nbsp;&nbsp;
99
- <a href="#M000072">extract_from</a>&nbsp;&nbsp;
100
- <a href="#M000073">extract_one</a>&nbsp;&nbsp;
101
- <a href="#M000067">format=</a>&nbsp;&nbsp;
102
- <a href="#M000079">formatted_data</a>&nbsp;&nbsp;
103
- <a href="#M000069">get</a>&nbsp;&nbsp;
104
- <a href="#M000078">instantiate</a>&nbsp;&nbsp;
105
- <a href="#M000074">new</a>&nbsp;&nbsp;
106
- <a href="#M000075">original_data=</a>&nbsp;&nbsp;
107
- <a href="#M000084">persisted?</a>&nbsp;&nbsp;
108
- <a href="#M000071">persistent?</a>&nbsp;&nbsp;
109
- <a href="#M000082">post</a>&nbsp;&nbsp;
110
- <a href="#M000081">put</a>&nbsp;&nbsp;
111
- <a href="#M000080">save</a>&nbsp;&nbsp;
91
+ <a href="#M000070">add_connection_adapter</a>&nbsp;&nbsp;
92
+ <a href="#M000073">connection</a>&nbsp;&nbsp;
93
+ <a href="#M000069">connection_adapters</a>&nbsp;&nbsp;
94
+ <a href="#M000072">connections</a>&nbsp;&nbsp;
95
+ <a href="#M000075">create</a>&nbsp;&nbsp;
96
+ <a href="#M000082">data</a>&nbsp;&nbsp;
97
+ <a href="#M000081">data=</a>&nbsp;&nbsp;
98
+ <a href="#M000068">debug!</a>&nbsp;&nbsp;
99
+ <a href="#M000067">debug?</a>&nbsp;&nbsp;
100
+ <a href="#M000088">delete</a>&nbsp;&nbsp;
101
+ <a href="#M000077">extract_from</a>&nbsp;&nbsp;
102
+ <a href="#M000078">extract_one</a>&nbsp;&nbsp;
103
+ <a href="#M000071">format=</a>&nbsp;&nbsp;
104
+ <a href="#M000084">formatted_data</a>&nbsp;&nbsp;
105
+ <a href="#M000074">get</a>&nbsp;&nbsp;
106
+ <a href="#M000083">instantiate</a>&nbsp;&nbsp;
107
+ <a href="#M000079">new</a>&nbsp;&nbsp;
108
+ <a href="#M000080">original_data=</a>&nbsp;&nbsp;
109
+ <a href="#M000089">persisted?</a>&nbsp;&nbsp;
110
+ <a href="#M000076">persistent?</a>&nbsp;&nbsp;
111
+ <a href="#M000087">post</a>&nbsp;&nbsp;
112
+ <a href="#M000086">put</a>&nbsp;&nbsp;
113
+ <a href="#M000085">save</a>&nbsp;&nbsp;
112
114
  </div>
113
115
  </div>
114
116
 
@@ -126,11 +128,6 @@
126
128
 
127
129
  <div class="name-list">
128
130
  <table summary="aliases">
129
- <tr class="top-aligned-row context-row">
130
- <td class="context-item-name">connection_adapter=</td>
131
- <td>-&gt;</td>
132
- <td class="context-item-value">set_connection_adapter</td>
133
- </tr>
134
131
  <tr class="top-aligned-row context-row">
135
132
  <td class="context-item-name">format=</td>
136
133
  <td>-&gt;</td>
@@ -181,13 +178,13 @@
181
178
  <div id="methods">
182
179
  <h3 class="section-bar">Public Class methods</h3>
183
180
 
184
- <div id="method-M000068" class="method-detail">
185
- <a name="M000068"></a>
181
+ <div id="method-M000070" class="method-detail">
182
+ <a name="M000070"></a>
186
183
 
187
184
  <div class="method-heading">
188
- <a href="Base.src/M000068.html" target="Code" class="method-signature"
189
- onclick="popupCode('Base.src/M000068.html');return false;">
190
- <span class="method-name">connection</span><span class="method-args">(refresh=false)</span>
185
+ <a href="Base.src/M000070.html" target="Code" class="method-signature"
186
+ onclick="popupCode('Base.src/M000070.html');return false;">
187
+ <span class="method-name">add_connection_adapter</span><span class="method-args">(name_or_adapter,adapter=nil,&amp;block)</span>
191
188
  </a>
192
189
  </div>
193
190
 
@@ -195,13 +192,13 @@
195
192
  </div>
196
193
  </div>
197
194
 
198
- <div id="method-M000066" class="method-detail">
199
- <a name="M000066"></a>
195
+ <div id="method-M000073" class="method-detail">
196
+ <a name="M000073"></a>
200
197
 
201
198
  <div class="method-heading">
202
- <a href="Base.src/M000066.html" target="Code" class="method-signature"
203
- onclick="popupCode('Base.src/M000066.html');return false;">
204
- <span class="method-name">connection_adapter=</span><span class="method-args">(adapter,debug=nil,&amp;block)</span>
199
+ <a href="Base.src/M000073.html" target="Code" class="method-signature"
200
+ onclick="popupCode('Base.src/M000073.html');return false;">
201
+ <span class="method-name">connection</span><span class="method-args">(name=:default,refresh=false)</span>
205
202
  </a>
206
203
  </div>
207
204
 
@@ -209,12 +206,40 @@
209
206
  </div>
210
207
  </div>
211
208
 
212
- <div id="method-M000070" class="method-detail">
213
- <a name="M000070"></a>
209
+ <div id="method-M000069" class="method-detail">
210
+ <a name="M000069"></a>
214
211
 
215
212
  <div class="method-heading">
216
- <a href="Base.src/M000070.html" target="Code" class="method-signature"
217
- onclick="popupCode('Base.src/M000070.html');return false;">
213
+ <a href="Base.src/M000069.html" target="Code" class="method-signature"
214
+ onclick="popupCode('Base.src/M000069.html');return false;">
215
+ <span class="method-name">connection_adapters</span><span class="method-args">()</span>
216
+ </a>
217
+ </div>
218
+
219
+ <div class="method-description">
220
+ </div>
221
+ </div>
222
+
223
+ <div id="method-M000072" class="method-detail">
224
+ <a name="M000072"></a>
225
+
226
+ <div class="method-heading">
227
+ <a href="Base.src/M000072.html" target="Code" class="method-signature"
228
+ onclick="popupCode('Base.src/M000072.html');return false;">
229
+ <span class="method-name">connections</span><span class="method-args">()</span>
230
+ </a>
231
+ </div>
232
+
233
+ <div class="method-description">
234
+ </div>
235
+ </div>
236
+
237
+ <div id="method-M000075" class="method-detail">
238
+ <a name="M000075"></a>
239
+
240
+ <div class="method-heading">
241
+ <a href="Base.src/M000075.html" target="Code" class="method-signature"
242
+ onclick="popupCode('Base.src/M000075.html');return false;">
218
243
  <span class="method-name">create</span><span class="method-args">(*args)</span>
219
244
  </a>
220
245
  </div>
@@ -226,12 +251,12 @@ new.save
226
251
  </div>
227
252
  </div>
228
253
 
229
- <div id="method-M000065" class="method-detail">
230
- <a name="M000065"></a>
254
+ <div id="method-M000068" class="method-detail">
255
+ <a name="M000068"></a>
231
256
 
232
257
  <div class="method-heading">
233
- <a href="Base.src/M000065.html" target="Code" class="method-signature"
234
- onclick="popupCode('Base.src/M000065.html');return false;">
258
+ <a href="Base.src/M000068.html" target="Code" class="method-signature"
259
+ onclick="popupCode('Base.src/M000068.html');return false;">
235
260
  <span class="method-name">debug!</span><span class="method-args">()</span>
236
261
  </a>
237
262
  </div>
@@ -240,12 +265,12 @@ new.save
240
265
  </div>
241
266
  </div>
242
267
 
243
- <div id="method-M000064" class="method-detail">
244
- <a name="M000064"></a>
268
+ <div id="method-M000067" class="method-detail">
269
+ <a name="M000067"></a>
245
270
 
246
271
  <div class="method-heading">
247
- <a href="Base.src/M000064.html" target="Code" class="method-signature"
248
- onclick="popupCode('Base.src/M000064.html');return false;">
272
+ <a href="Base.src/M000067.html" target="Code" class="method-signature"
273
+ onclick="popupCode('Base.src/M000067.html');return false;">
249
274
  <span class="method-name">debug?</span><span class="method-args">()</span>
250
275
  </a>
251
276
  </div>
@@ -254,12 +279,12 @@ new.save
254
279
  </div>
255
280
  </div>
256
281
 
257
- <div id="method-M000072" class="method-detail">
258
- <a name="M000072"></a>
282
+ <div id="method-M000077" class="method-detail">
283
+ <a name="M000077"></a>
259
284
 
260
285
  <div class="method-heading">
261
- <a href="Base.src/M000072.html" target="Code" class="method-signature"
262
- onclick="popupCode('Base.src/M000072.html');return false;">
286
+ <a href="Base.src/M000077.html" target="Code" class="method-signature"
287
+ onclick="popupCode('Base.src/M000077.html');return false;">
263
288
  <span class="method-name">extract_from</span><span class="method-args">(formatted_data)</span>
264
289
  </a>
265
290
  </div>
@@ -268,12 +293,12 @@ new.save
268
293
  </div>
269
294
  </div>
270
295
 
271
- <div id="method-M000073" class="method-detail">
272
- <a name="M000073"></a>
296
+ <div id="method-M000078" class="method-detail">
297
+ <a name="M000078"></a>
273
298
 
274
299
  <div class="method-heading">
275
- <a href="Base.src/M000073.html" target="Code" class="method-signature"
276
- onclick="popupCode('Base.src/M000073.html');return false;">
300
+ <a href="Base.src/M000078.html" target="Code" class="method-signature"
301
+ onclick="popupCode('Base.src/M000078.html');return false;">
277
302
  <span class="method-name">extract_one</span><span class="method-args">(formatted_data, identifier=nil)</span>
278
303
  </a>
279
304
  </div>
@@ -282,12 +307,12 @@ new.save
282
307
  </div>
283
308
  </div>
284
309
 
285
- <div id="method-M000067" class="method-detail">
286
- <a name="M000067"></a>
310
+ <div id="method-M000071" class="method-detail">
311
+ <a name="M000071"></a>
287
312
 
288
313
  <div class="method-heading">
289
- <a href="Base.src/M000067.html" target="Code" class="method-signature"
290
- onclick="popupCode('Base.src/M000067.html');return false;">
314
+ <a href="Base.src/M000071.html" target="Code" class="method-signature"
315
+ onclick="popupCode('Base.src/M000071.html');return false;">
291
316
  <span class="method-name">format=</span><span class="method-args">(format)</span>
292
317
  </a>
293
318
  </div>
@@ -299,29 +324,29 @@ set_format :xml self.format = :json
299
324
  </div>
300
325
  </div>
301
326
 
302
- <div id="method-M000069" class="method-detail">
303
- <a name="M000069"></a>
327
+ <div id="method-M000074" class="method-detail">
328
+ <a name="M000074"></a>
304
329
 
305
330
  <div class="method-heading">
306
- <a href="Base.src/M000069.html" target="Code" class="method-signature"
307
- onclick="popupCode('Base.src/M000069.html');return false;">
331
+ <a href="Base.src/M000074.html" target="Code" class="method-signature"
332
+ onclick="popupCode('Base.src/M000074.html');return false;">
308
333
  <span class="method-name">get</span><span class="method-args">(*args)</span>
309
334
  </a>
310
335
  </div>
311
336
 
312
337
  <div class="method-description">
313
338
  <p>
314
- <a href="Base.html#M000069">get</a>
339
+ <a href="Base.html#M000074">get</a>
315
340
  </p>
316
341
  </div>
317
342
  </div>
318
343
 
319
- <div id="method-M000074" class="method-detail">
320
- <a name="M000074"></a>
344
+ <div id="method-M000079" class="method-detail">
345
+ <a name="M000079"></a>
321
346
 
322
347
  <div class="method-heading">
323
- <a href="Base.src/M000074.html" target="Code" class="method-signature"
324
- onclick="popupCode('Base.src/M000074.html');return false;">
348
+ <a href="Base.src/M000079.html" target="Code" class="method-signature"
349
+ onclick="popupCode('Base.src/M000079.html');return false;">
325
350
  <span class="method-name">new</span><span class="method-args">(data=nil)</span>
326
351
  </a>
327
352
  </div>
@@ -330,12 +355,12 @@ set_format :xml self.format = :json
330
355
  </div>
331
356
  </div>
332
357
 
333
- <div id="method-M000071" class="method-detail">
334
- <a name="M000071"></a>
358
+ <div id="method-M000076" class="method-detail">
359
+ <a name="M000076"></a>
335
360
 
336
361
  <div class="method-heading">
337
- <a href="Base.src/M000071.html" target="Code" class="method-signature"
338
- onclick="popupCode('Base.src/M000071.html');return false;">
362
+ <a href="Base.src/M000076.html" target="Code" class="method-signature"
363
+ onclick="popupCode('Base.src/M000076.html');return false;">
339
364
  <span class="method-name">persistent?</span><span class="method-args">()</span>
340
365
  </a>
341
366
  </div>
@@ -346,12 +371,12 @@ set_format :xml self.format = :json
346
371
 
347
372
  <h3 class="section-bar">Public Instance methods</h3>
348
373
 
349
- <div id="method-M000077" class="method-detail">
350
- <a name="M000077"></a>
374
+ <div id="method-M000082" class="method-detail">
375
+ <a name="M000082"></a>
351
376
 
352
377
  <div class="method-heading">
353
- <a href="Base.src/M000077.html" target="Code" class="method-signature"
354
- onclick="popupCode('Base.src/M000077.html');return false;">
378
+ <a href="Base.src/M000082.html" target="Code" class="method-signature"
379
+ onclick="popupCode('Base.src/M000082.html');return false;">
355
380
  <span class="method-name">data</span><span class="method-args">()</span>
356
381
  </a>
357
382
  </div>
@@ -360,12 +385,12 @@ set_format :xml self.format = :json
360
385
  </div>
361
386
  </div>
362
387
 
363
- <div id="method-M000076" class="method-detail">
364
- <a name="M000076"></a>
388
+ <div id="method-M000081" class="method-detail">
389
+ <a name="M000081"></a>
365
390
 
366
391
  <div class="method-heading">
367
- <a href="Base.src/M000076.html" target="Code" class="method-signature"
368
- onclick="popupCode('Base.src/M000076.html');return false;">
392
+ <a href="Base.src/M000081.html" target="Code" class="method-signature"
393
+ onclick="popupCode('Base.src/M000081.html');return false;">
369
394
  <span class="method-name">data=</span><span class="method-args">(data)</span>
370
395
  </a>
371
396
  </div>
@@ -374,71 +399,71 @@ set_format :xml self.format = :json
374
399
  </div>
375
400
  </div>
376
401
 
377
- <div id="method-M000083" class="method-detail">
378
- <a name="M000083"></a>
402
+ <div id="method-M000088" class="method-detail">
403
+ <a name="M000088"></a>
379
404
 
380
405
  <div class="method-heading">
381
- <a href="Base.src/M000083.html" target="Code" class="method-signature"
382
- onclick="popupCode('Base.src/M000083.html');return false;">
406
+ <a href="Base.src/M000088.html" target="Code" class="method-signature"
407
+ onclick="popupCode('Base.src/M000088.html');return false;">
383
408
  <span class="method-name">delete</span><span class="method-args">()</span>
384
409
  </a>
385
410
  </div>
386
411
 
387
412
  <div class="method-description">
388
413
  <p>
389
- <a href="Base.html#M000083">delete</a>
414
+ <a href="Base.html#M000088">delete</a>
390
415
  </p>
391
416
  </div>
392
417
  </div>
393
418
 
394
- <div id="method-M000079" class="method-detail">
395
- <a name="M000079"></a>
419
+ <div id="method-M000084" class="method-detail">
420
+ <a name="M000084"></a>
396
421
 
397
422
  <div class="method-heading">
398
- <a href="Base.src/M000079.html" target="Code" class="method-signature"
399
- onclick="popupCode('Base.src/M000079.html');return false;">
423
+ <a href="Base.src/M000084.html" target="Code" class="method-signature"
424
+ onclick="popupCode('Base.src/M000084.html');return false;">
400
425
  <span class="method-name">formatted_data</span><span class="method-args">()</span>
401
426
  </a>
402
427
  </div>
403
428
 
404
429
  <div class="method-description">
405
430
  <p>
406
- Reads the <a href="Base.html#M000077">data</a> from the object for saving
431
+ Reads the <a href="Base.html#M000082">data</a> from the object for saving
407
432
  back to the persisted store. This is provided as a default method, but you
408
433
  can overwrite it in your model.
409
434
  </p>
410
435
  </div>
411
436
  </div>
412
437
 
413
- <div id="method-M000078" class="method-detail">
414
- <a name="M000078"></a>
438
+ <div id="method-M000083" class="method-detail">
439
+ <a name="M000083"></a>
415
440
 
416
441
  <div class="method-heading">
417
- <a href="Base.src/M000078.html" target="Code" class="method-signature"
418
- onclick="popupCode('Base.src/M000078.html');return false;">
442
+ <a href="Base.src/M000083.html" target="Code" class="method-signature"
443
+ onclick="popupCode('Base.src/M000083.html');return false;">
419
444
  <span class="method-name">instantiate</span><span class="method-args">(data)</span>
420
445
  </a>
421
446
  </div>
422
447
 
423
448
  <div class="method-description">
424
449
  <p>
425
- Sets the <a href="Base.html#M000077">data</a> into the object. This is
450
+ Sets the <a href="Base.html#M000082">data</a> into the object. This is
426
451
  provided as a default method, but your model can overwrite it any way you
427
- want. For example, you could set the <a href="Base.html#M000077">data</a>
452
+ want. For example, you could set the <a href="Base.html#M000082">data</a>
428
453
  to some other object type, or to a Marshalled storage. The type of <a
429
- href="Base.html#M000077">data</a> you receive will depend on the format and
454
+ href="Base.html#M000082">data</a> you receive will depend on the format and
430
455
  parser you use. Of course you could make up your own spin-off of one of
431
456
  those, too.
432
457
  </p>
433
458
  </div>
434
459
  </div>
435
460
 
436
- <div id="method-M000075" class="method-detail">
437
- <a name="M000075"></a>
461
+ <div id="method-M000080" class="method-detail">
462
+ <a name="M000080"></a>
438
463
 
439
464
  <div class="method-heading">
440
- <a href="Base.src/M000075.html" target="Code" class="method-signature"
441
- onclick="popupCode('Base.src/M000075.html');return false;">
465
+ <a href="Base.src/M000080.html" target="Code" class="method-signature"
466
+ onclick="popupCode('Base.src/M000080.html');return false;">
442
467
  <span class="method-name">original_data=</span><span class="method-args">(data)</span>
443
468
  </a>
444
469
  </div>
@@ -447,12 +472,12 @@ those, too.
447
472
  </div>
448
473
  </div>
449
474
 
450
- <div id="method-M000084" class="method-detail">
451
- <a name="M000084"></a>
475
+ <div id="method-M000089" class="method-detail">
476
+ <a name="M000089"></a>
452
477
 
453
478
  <div class="method-heading">
454
- <a href="Base.src/M000084.html" target="Code" class="method-signature"
455
- onclick="popupCode('Base.src/M000084.html');return false;">
479
+ <a href="Base.src/M000089.html" target="Code" class="method-signature"
480
+ onclick="popupCode('Base.src/M000089.html');return false;">
456
481
  <span class="method-name">persisted?</span><span class="method-args">()</span>
457
482
  </a>
458
483
  </div>
@@ -461,54 +486,54 @@ those, too.
461
486
  </div>
462
487
  </div>
463
488
 
464
- <div id="method-M000082" class="method-detail">
465
- <a name="M000082"></a>
489
+ <div id="method-M000087" class="method-detail">
490
+ <a name="M000087"></a>
466
491
 
467
492
  <div class="method-heading">
468
- <a href="Base.src/M000082.html" target="Code" class="method-signature"
469
- onclick="popupCode('Base.src/M000082.html');return false;">
470
- <span class="method-name">post</span><span class="method-args">()</span>
493
+ <a href="Base.src/M000087.html" target="Code" class="method-signature"
494
+ onclick="popupCode('Base.src/M000087.html');return false;">
495
+ <span class="method-name">post</span><span class="method-args">(*args)</span>
471
496
  </a>
472
497
  </div>
473
498
 
474
499
  <div class="method-description">
475
500
  <p>
476
- sends a <a href="Base.html#M000082">post</a> request with self.data
501
+ sends a <a href="Base.html#M000087">post</a> request with self.data
477
502
  </p>
478
503
  </div>
479
504
  </div>
480
505
 
481
- <div id="method-M000081" class="method-detail">
482
- <a name="M000081"></a>
506
+ <div id="method-M000086" class="method-detail">
507
+ <a name="M000086"></a>
483
508
 
484
509
  <div class="method-heading">
485
- <a href="Base.src/M000081.html" target="Code" class="method-signature"
486
- onclick="popupCode('Base.src/M000081.html');return false;">
487
- <span class="method-name">put</span><span class="method-args">()</span>
510
+ <a href="Base.src/M000086.html" target="Code" class="method-signature"
511
+ onclick="popupCode('Base.src/M000086.html');return false;">
512
+ <span class="method-name">put</span><span class="method-args">(*args)</span>
488
513
  </a>
489
514
  </div>
490
515
 
491
516
  <div class="method-description">
492
517
  <p>
493
- sends a <a href="Base.html#M000081">put</a> request with self.data
518
+ sends a <a href="Base.html#M000086">put</a> request with self.data
494
519
  </p>
495
520
  </div>
496
521
  </div>
497
522
 
498
- <div id="method-M000080" class="method-detail">
499
- <a name="M000080"></a>
523
+ <div id="method-M000085" class="method-detail">
524
+ <a name="M000085"></a>
500
525
 
501
526
  <div class="method-heading">
502
- <a href="Base.src/M000080.html" target="Code" class="method-signature"
503
- onclick="popupCode('Base.src/M000080.html');return false;">
527
+ <a href="Base.src/M000085.html" target="Code" class="method-signature"
528
+ onclick="popupCode('Base.src/M000085.html');return false;">
504
529
  <span class="method-name">save</span><span class="method-args">()</span>
505
530
  </a>
506
531
  </div>
507
532
 
508
533
  <div class="method-description">
509
534
  <p>
510
- <a href="Base.html#M000084">persisted?</a> ? <a
511
- href="Base.html#M000081">put</a> : <a href="Base.html#M000082">post</a>
535
+ <a href="Base.html#M000089">persisted?</a> ? <a
536
+ href="Base.html#M000086">put</a> : <a href="Base.html#M000087">post</a>
512
537
  </p>
513
538
  </div>
514
539
  </div>
@@ -5,17 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>format= (SimpleMapper::Base)</title>
8
+ <title>debug? (SimpleMapper::Base)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
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/simple_mapper/base.rb, line 21</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format=</span>(<span class="ruby-identifier">format</span>)
15
- <span class="ruby-ivar">@format_name</span> = <span class="ruby-identifier">format</span>.<span class="ruby-identifier">to_s</span>
16
- <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{File.dirname(__FILE__)}/formats/#{@format_name}_format&quot;</span>
17
- <span class="ruby-ivar">@format</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">&quot;::SimpleMapper::#{@format_name.camelize}Format&quot;</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>)
18
- <span class="ruby-identifier">include</span> <span class="ruby-ivar">@format</span>
19
- <span class="ruby-keyword kw">end</span></pre>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 7</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debug?</span>; <span class="ruby-ivar">@debug</span> <span class="ruby-keyword kw">end</span></pre>
20
15
  </body>
21
16
  </html>
@@ -5,22 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>connection (SimpleMapper::Base)</title>
8
+ <title>debug! (SimpleMapper::Base)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
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/simple_mapper/base.rb, line 30</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connection</span>(<span class="ruby-identifier">refresh</span>=<span class="ruby-keyword kw">false</span>)
15
- <span class="ruby-ivar">@connection</span> = <span class="ruby-keyword kw">begin</span>
16
- <span class="ruby-comment cmt"># Initialize the connection with the connection adapter.</span>
17
- <span class="ruby-identifier">adapter</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">&quot;::SimpleMapper::#{@connection_adapter.to_s.camelize}Adapter&quot;</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>).<span class="ruby-identifier">new</span>
18
- <span class="ruby-ivar">@connection_init</span>.<span class="ruby-identifier">in_context</span>(<span class="ruby-identifier">adapter</span>).<span class="ruby-identifier">call</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@connection_init</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Proc</span>)
19
- <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">set_headers</span> <span class="ruby-identifier">format</span>.<span class="ruby-identifier">mime_type_headers</span>
20
- <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">debug!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@connection_debug</span>
21
- <span class="ruby-identifier">adapter</span>
22
- <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@connection</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">refresh</span>
23
- <span class="ruby-ivar">@connection</span>
24
- <span class="ruby-keyword kw">end</span></pre>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 8</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debug!</span>; <span class="ruby-ivar">@debug</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">end</span></pre>
25
15
  </body>
26
16
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get (SimpleMapper::Base)</title>
8
+ <title>connection_adapters (SimpleMapper::Base)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
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/simple_mapper/base.rb, line 43</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- <span class="ruby-identifier">extract_from</span>(<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">get</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>))
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 10</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connection_adapters</span>
15
+ <span class="ruby-ivar">@connection_adapters</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = {}}
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,14 +5,25 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>create (SimpleMapper::Base)</title>
8
+ <title>add_connection_adapter (SimpleMapper::Base)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
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/simple_mapper/base.rb, line 48</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- <span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>).<span class="ruby-identifier">save</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 14</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_connection_adapter</span>(<span class="ruby-identifier">name_or_adapter</span>,<span class="ruby-identifier">adapter</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">nil?</span>
16
+ <span class="ruby-identifier">adapter</span> = <span class="ruby-identifier">name_or_adapter</span>
17
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">:default</span>
18
+ <span class="ruby-keyword kw">else</span>
19
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name_or_adapter</span>.<span class="ruby-identifier">to_sym</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-comment cmt"># Should complain if the adapter doesn't exist.</span>
22
+ <span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:adapter</span>] = <span class="ruby-identifier">adapter</span>
23
+ <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{File.dirname(__FILE__)}/adapters/#{adapter}_adapter&quot;</span>
24
+ <span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:init_block</span>] = <span class="ruby-identifier">block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
25
+ <span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:debug</span>] = <span class="ruby-ivar">@debug</span>
26
+ [<span class="ruby-identifier">name</span>, <span class="ruby-identifier">adapter</span>]
16
27
  <span class="ruby-keyword kw">end</span></pre>
17
28
  </body>
18
29
  </html>