simplemapper 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README +16 -0
- data/Rakefile +1 -1
- data/doc/classes/Array.html +24 -5
- data/doc/classes/{Inflector.src/M000017.html → Array.src/M000005.html} +4 -8
- data/doc/classes/Array.src/{M000001.html → M000006.html} +1 -1
- data/doc/classes/Callbacks.html +15 -15
- data/doc/classes/Callbacks.src/{M000037.html → M000040.html} +0 -0
- data/doc/classes/Callbacks.src/{M000038.html → M000041.html} +0 -0
- data/doc/classes/Callbacks.src/{M000039.html → M000042.html} +0 -0
- data/doc/classes/Enumerable.html +5 -5
- data/doc/classes/Enumerable.src/{M000040.html → M000043.html} +1 -1
- data/doc/classes/Hash.html +23 -4
- data/doc/classes/Hash.src/M000002.html +6 -4
- data/doc/classes/Hash.src/M000003.html +4 -20
- data/doc/classes/Hash.src/M000004.html +34 -0
- data/doc/classes/Inflector/Inflections.html +40 -40
- data/doc/classes/Inflector/Inflections.src/M000034.html +4 -5
- data/doc/classes/Inflector/Inflections.src/M000035.html +4 -4
- data/doc/classes/Inflector/Inflections.src/M000036.html +4 -9
- data/doc/classes/Inflector/Inflections.src/M000037.html +19 -0
- data/doc/classes/Inflector/Inflections.src/{M000031.html → M000038.html} +4 -4
- data/doc/classes/Inflector/Inflections.src/M000039.html +23 -0
- data/doc/classes/Inflector.html +82 -82
- data/doc/classes/Inflector.src/M000020.html +6 -6
- data/doc/classes/Inflector.src/M000021.html +11 -4
- data/doc/classes/Inflector.src/M000022.html +11 -8
- data/doc/classes/Inflector.src/M000023.html +8 -4
- data/doc/classes/Inflector.src/M000024.html +4 -4
- data/doc/classes/Inflector.src/M000025.html +8 -4
- data/doc/classes/Inflector.src/M000026.html +4 -4
- data/doc/classes/Inflector.src/M000027.html +4 -5
- data/doc/classes/Inflector.src/M000028.html +4 -4
- data/doc/classes/Inflector.src/M000029.html +4 -8
- data/doc/classes/Inflector.src/M000030.html +5 -13
- data/doc/classes/Inflector.src/M000031.html +18 -0
- data/doc/classes/Inflector.src/M000032.html +22 -0
- data/doc/classes/Inflector.src/M000033.html +27 -0
- data/doc/classes/Merb/Request.html +5 -5
- data/doc/classes/Merb/Request.src/{M000041.html → M000044.html} +1 -1
- data/doc/classes/OAuth/RequestProxy/Base.html +5 -5
- data/doc/classes/OAuth/RequestProxy/Base.src/{M000012.html → M000015.html} +1 -1
- data/doc/classes/OAuth/Signature/Base.html +5 -5
- data/doc/classes/OAuth/Signature/Base.src/{M000011.html → M000014.html} +1 -1
- data/doc/classes/OAuthController.html +25 -25
- data/doc/classes/OAuthController.src/M000008.html +8 -11
- data/doc/classes/OAuthController.src/M000009.html +4 -5
- data/doc/classes/OAuthController.src/{M000007.html → M000010.html} +1 -1
- data/doc/classes/OAuthController.src/M000011.html +25 -0
- data/doc/classes/OAuthController.src/M000012.html +19 -0
- data/doc/classes/Object.html +18 -6
- data/doc/classes/Object.src/{M000010.html → M000013.html} +2 -2
- data/doc/classes/Proc.html +5 -5
- data/doc/classes/Proc.src/{M000004.html → M000007.html} +0 -0
- data/doc/classes/Serialize.html +20 -20
- data/doc/classes/Serialize.src/M000016.html +7 -32
- data/doc/classes/Serialize.src/{M000014.html → M000017.html} +1 -1
- data/doc/classes/Serialize.src/{M000015.html → M000018.html} +1 -1
- data/doc/classes/Serialize.src/M000019.html +18 -0
- data/doc/classes/SimpleMapper/Base.html +149 -124
- data/doc/classes/SimpleMapper/Base.src/M000067.html +3 -8
- data/doc/classes/SimpleMapper/Base.src/M000068.html +3 -13
- data/doc/classes/SimpleMapper/Base.src/M000069.html +4 -4
- data/doc/classes/SimpleMapper/Base.src/M000070.html +15 -4
- data/doc/classes/SimpleMapper/Base.src/M000071.html +7 -4
- data/doc/classes/SimpleMapper/Base.src/M000072.html +4 -5
- data/doc/classes/SimpleMapper/Base.src/M000073.html +12 -9
- data/doc/classes/SimpleMapper/Base.src/M000074.html +8 -5
- data/doc/classes/SimpleMapper/Base.src/M000075.html +5 -7
- data/doc/classes/SimpleMapper/Base.src/M000076.html +5 -5
- data/doc/classes/SimpleMapper/Base.src/M000077.html +6 -5
- data/doc/classes/SimpleMapper/Base.src/M000078.html +10 -6
- data/doc/classes/SimpleMapper/Base.src/M000079.html +4 -4
- data/doc/classes/SimpleMapper/Base.src/M000080.html +6 -4
- data/doc/classes/SimpleMapper/Base.src/M000081.html +4 -5
- data/doc/classes/SimpleMapper/Base.src/M000082.html +4 -6
- data/doc/classes/SimpleMapper/Base.src/M000083.html +5 -10
- data/doc/classes/SimpleMapper/Base.src/M000084.html +4 -4
- data/doc/classes/SimpleMapper/{HttpAdapter.src/M000057.html → Base.src/M000085.html} +4 -4
- data/doc/classes/SimpleMapper/Base.src/M000086.html +19 -0
- data/doc/classes/SimpleMapper/Base.src/M000087.html +20 -0
- data/doc/classes/SimpleMapper/Base.src/M000088.html +24 -0
- data/doc/classes/SimpleMapper/Base.src/M000089.html +18 -0
- data/doc/classes/SimpleMapper/HttpAdapter.html +40 -40
- data/doc/classes/SimpleMapper/HttpAdapter.src/{M000056.html → M000059.html} +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000060.html +4 -4
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000061.html +5 -4
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000063.html +5 -4
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000064.html +18 -0
- data/doc/classes/SimpleMapper/HttpAdapter.src/{M000062.html → M000065.html} +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000066.html +18 -0
- data/doc/classes/SimpleMapper/HttpOAuthExtension.html +22 -22
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000051.html +27 -4
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000049.html → M000052.html} +1 -3
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000050.html → M000053.html} +1 -1
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000054.html +24 -0
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.html +10 -10
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000046.html → M000049.html} +0 -0
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000047.html → M000050.html} +0 -0
- data/doc/classes/SimpleMapper/SimpleModel.html +20 -20
- data/doc/classes/SimpleMapper/SimpleModel.src/M000045.html +4 -10
- data/doc/classes/SimpleMapper/SimpleModel.src/{M000043.html → M000046.html} +0 -0
- data/doc/classes/SimpleMapper/SimpleModel.src/{M000044.html → M000047.html} +0 -0
- data/doc/classes/SimpleMapper/SimpleModel.src/M000048.html +24 -0
- data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.html +5 -5
- data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.src/{M000055.html → M000058.html} +5 -3
- data/doc/classes/SimpleMapper/XmlFormat.html +15 -15
- data/doc/classes/SimpleMapper/XmlFormat.src/{M000052.html → M000055.html} +1 -1
- data/doc/classes/SimpleMapper/XmlFormat.src/{M000053.html → M000056.html} +1 -1
- data/doc/classes/SimpleMapper/XmlFormat.src/{M000054.html → M000057.html} +4 -2
- data/doc/classes/Time.html +139 -0
- data/doc/classes/{OAuthController.src/M000006.html → Time.src/M000001.html} +4 -4
- data/doc/created.rid +1 -1
- data/doc/files/lib/simple_mapper/adapters/http_adapter_rb.html +2 -1
- data/doc/files/lib/simple_mapper/base_rb.html +1 -1
- data/doc/files/lib/simple_mapper/default_plugins/callbacks_rb.html +1 -1
- data/doc/files/lib/simple_mapper/default_plugins/oauth_rb.html +1 -7
- data/doc/files/lib/simple_mapper/default_plugins/options_to_query_rb.html +116 -0
- data/doc/files/lib/simple_mapper/default_plugins/simple_model_rb.html +1 -1
- data/doc/files/lib/simple_mapper/formats/xml_format_rb.html +3 -1
- data/doc/files/lib/simple_mapper/support/bliss_serializer_rb.html +2 -1
- data/doc/files/lib/simple_mapper/support/core_ext_rb.html +1 -1
- data/doc/files/lib/simple_mapper/support/inflections_rb.html +1 -1
- data/doc/files/lib/simple_mapper/support/inflector_rb.html +1 -1
- data/doc/files/lib/simple_mapper/support_rb.html +1 -1
- data/doc/files/lib/simple_mapper_rb.html +1 -1
- data/doc/fr_class_index.html +1 -0
- data/doc/fr_file_index.html +1 -0
- data/doc/fr_method_index.html +89 -84
- data/lib/simple_mapper/adapters/http_adapter.rb +4 -2
- data/lib/simple_mapper/base.rb +46 -23
- data/lib/simple_mapper/default_plugins/oauth.rb +3 -6
- data/lib/simple_mapper/default_plugins/options_to_query.rb +31 -0
- data/lib/simple_mapper/formats/xml_format.rb +10 -3
- data/lib/simple_mapper/support/bliss_serializer.rb +3 -113
- data/lib/simple_mapper/support/core_ext.rb +6 -2
- data/lib/simple_mapper/support/inflections.rb +1 -1
- metadata +52 -43
- data/doc/classes/Inflector/Inflections.src/M000032.html +0 -18
- data/doc/classes/Inflector/Inflections.src/M000033.html +0 -18
- data/doc/classes/Inflector.src/M000018.html +0 -25
- data/doc/classes/Inflector.src/M000019.html +0 -25
- data/doc/classes/OAuthController.src/M000005.html +0 -22
- data/doc/classes/Serialize.src/M000013.html +0 -21
- data/doc/classes/SimpleMapper/Base.src/M000064.html +0 -16
- data/doc/classes/SimpleMapper/Base.src/M000065.html +0 -16
- data/doc/classes/SimpleMapper/Base.src/M000066.html +0 -22
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000058.html +0 -19
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000048.html +0 -49
- 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="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#M000074">
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
91
|
+
<a href="#M000070">add_connection_adapter</a>
|
92
|
+
<a href="#M000073">connection</a>
|
93
|
+
<a href="#M000069">connection_adapters</a>
|
94
|
+
<a href="#M000072">connections</a>
|
95
|
+
<a href="#M000075">create</a>
|
96
|
+
<a href="#M000082">data</a>
|
97
|
+
<a href="#M000081">data=</a>
|
98
|
+
<a href="#M000068">debug!</a>
|
99
|
+
<a href="#M000067">debug?</a>
|
100
|
+
<a href="#M000088">delete</a>
|
101
|
+
<a href="#M000077">extract_from</a>
|
102
|
+
<a href="#M000078">extract_one</a>
|
103
|
+
<a href="#M000071">format=</a>
|
104
|
+
<a href="#M000084">formatted_data</a>
|
105
|
+
<a href="#M000074">get</a>
|
106
|
+
<a href="#M000083">instantiate</a>
|
107
|
+
<a href="#M000079">new</a>
|
108
|
+
<a href="#M000080">original_data=</a>
|
109
|
+
<a href="#M000089">persisted?</a>
|
110
|
+
<a href="#M000076">persistent?</a>
|
111
|
+
<a href="#M000087">post</a>
|
112
|
+
<a href="#M000086">put</a>
|
113
|
+
<a href="#M000085">save</a>
|
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>-></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>-></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-
|
185
|
-
<a name="
|
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/
|
189
|
-
onclick="popupCode('Base.src/
|
190
|
-
<span class="method-name">
|
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,&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-
|
199
|
-
<a name="
|
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/
|
203
|
-
onclick="popupCode('Base.src/
|
204
|
-
<span class="method-name">
|
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-
|
213
|
-
<a name="
|
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/
|
217
|
-
onclick="popupCode('Base.src/
|
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-
|
230
|
-
<a name="
|
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/
|
234
|
-
onclick="popupCode('Base.src/
|
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-
|
244
|
-
<a name="
|
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/
|
248
|
-
onclick="popupCode('Base.src/
|
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-
|
258
|
-
<a name="
|
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/
|
262
|
-
onclick="popupCode('Base.src/
|
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-
|
272
|
-
<a name="
|
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/
|
276
|
-
onclick="popupCode('Base.src/
|
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-
|
286
|
-
<a name="
|
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/
|
290
|
-
onclick="popupCode('Base.src/
|
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-
|
303
|
-
<a name="
|
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/
|
307
|
-
onclick="popupCode('Base.src/
|
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#
|
339
|
+
<a href="Base.html#M000074">get</a>
|
315
340
|
</p>
|
316
341
|
</div>
|
317
342
|
</div>
|
318
343
|
|
319
|
-
<div id="method-
|
320
|
-
<a name="
|
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/
|
324
|
-
onclick="popupCode('Base.src/
|
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-
|
334
|
-
<a name="
|
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/
|
338
|
-
onclick="popupCode('Base.src/
|
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-
|
350
|
-
<a name="
|
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/
|
354
|
-
onclick="popupCode('Base.src/
|
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-
|
364
|
-
<a name="
|
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/
|
368
|
-
onclick="popupCode('Base.src/
|
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-
|
378
|
-
<a name="
|
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/
|
382
|
-
onclick="popupCode('Base.src/
|
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#
|
414
|
+
<a href="Base.html#M000088">delete</a>
|
390
415
|
</p>
|
391
416
|
</div>
|
392
417
|
</div>
|
393
418
|
|
394
|
-
<div id="method-
|
395
|
-
<a name="
|
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/
|
399
|
-
onclick="popupCode('Base.src/
|
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#
|
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-
|
414
|
-
<a name="
|
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/
|
418
|
-
onclick="popupCode('Base.src/
|
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#
|
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#
|
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#
|
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-
|
437
|
-
<a name="
|
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/
|
441
|
-
onclick="popupCode('Base.src/
|
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-
|
451
|
-
<a name="
|
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/
|
455
|
-
onclick="popupCode('Base.src/
|
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-
|
465
|
-
<a name="
|
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/
|
469
|
-
onclick="popupCode('Base.src/
|
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#
|
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-
|
482
|
-
<a name="
|
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/
|
486
|
-
onclick="popupCode('Base.src/
|
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#
|
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-
|
499
|
-
<a name="
|
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/
|
503
|
-
onclick="popupCode('Base.src/
|
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#
|
511
|
-
href="Base.html#
|
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>
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
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">"#{File.dirname(__FILE__)}/formats/#{@format_name}_format"</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">"::SimpleMapper::#{@format_name.camelize}Format"</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>
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
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">"::SimpleMapper::#{@connection_adapter.to_s.camelize}Adapter"</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>
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
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>
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
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">&</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">"#{File.dirname(__FILE__)}/adapters/#{adapter}_adapter"</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>
|