simplemapper 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +3 -3
- data/doc/classes/Enumerable.html +5 -5
- data/doc/classes/Enumerable.src/{M000043.html → M000040.html} +0 -0
- data/doc/classes/Merb/Request.html +5 -5
- data/doc/classes/Merb/Request.src/{M000044.html → M000041.html} +0 -0
- data/doc/classes/OAuthController.src/M000008.html +1 -1
- data/doc/classes/OAuthController.src/M000009.html +1 -1
- data/doc/classes/OAuthController.src/M000010.html +1 -1
- data/doc/classes/OAuthController.src/M000011.html +1 -1
- data/doc/classes/OAuthController.src/M000012.html +1 -1
- data/doc/classes/Serialize.src/M000019.html +1 -1
- data/doc/classes/SimpleMapper.html +6 -1
- data/doc/classes/SimpleMapper/Base.html +172 -104
- data/doc/classes/SimpleMapper/Base.src/M000071.html +4 -7
- data/doc/classes/SimpleMapper/Base.src/M000072.html +7 -4
- data/doc/classes/SimpleMapper/Base.src/M000073.html +4 -12
- data/doc/classes/SimpleMapper/Base.src/M000074.html +13 -7
- data/doc/classes/SimpleMapper/Base.src/M000075.html +6 -3
- data/doc/classes/SimpleMapper/Base.src/M000076.html +4 -4
- data/doc/classes/SimpleMapper/Base.src/M000077.html +4 -5
- data/doc/classes/SimpleMapper/Base.src/M000078.html +5 -9
- data/doc/classes/SimpleMapper/Base.src/M000079.html +10 -5
- data/doc/classes/SimpleMapper/Base.src/M000080.html +8 -7
- data/doc/classes/SimpleMapper/Base.src/M000081.html +4 -4
- data/doc/classes/SimpleMapper/Base.src/M000082.html +5 -4
- data/doc/classes/SimpleMapper/Base.src/M000083.html +4 -5
- data/doc/classes/SimpleMapper/Base.src/M000085.html +4 -4
- data/doc/classes/SimpleMapper/Base.src/M000086.html +5 -5
- data/doc/classes/SimpleMapper/Base.src/M000087.html +3 -5
- data/doc/classes/SimpleMapper/Base.src/M000088.html +4 -10
- data/doc/classes/SimpleMapper/Base.src/M000089.html +4 -4
- data/doc/classes/SimpleMapper/Base.src/M000090.html +19 -0
- data/doc/classes/SimpleMapper/Base.src/M000091.html +20 -0
- data/doc/classes/SimpleMapper/Base.src/M000092.html +24 -0
- data/doc/classes/SimpleMapper/Base.src/M000093.html +18 -0
- data/doc/classes/{Callbacks.html → SimpleMapper/CallbacksExtension.html} +19 -19
- data/doc/classes/SimpleMapper/CallbacksExtension.src/M000056.html +18 -0
- data/doc/classes/SimpleMapper/{Base.src/M000084.html → CallbacksExtension.src/M000057.html} +4 -4
- data/doc/classes/SimpleMapper/CallbacksExtension.src/M000058.html +19 -0
- data/doc/classes/SimpleMapper/HttpAdapter.html +10 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000059.html +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000060.html +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000061.html +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000063.html +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000064.html +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000065.html +1 -1
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000066.html +1 -1
- data/doc/classes/SimpleMapper/HttpOAuthExtension.html +22 -22
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000048.html +47 -0
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000052.html → M000049.html} +0 -0
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000053.html → M000050.html} +0 -0
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000051.html +3 -26
- data/doc/classes/SimpleMapper/SimpleModel.html +20 -20
- data/doc/classes/SimpleMapper/SimpleModel.src/M000042.html +18 -0
- data/doc/classes/SimpleMapper/SimpleModel.src/{M000046.html → M000043.html} +0 -0
- data/doc/classes/SimpleMapper/SimpleModel.src/{M000047.html → M000044.html} +0 -0
- data/doc/classes/SimpleMapper/SimpleModel.src/M000045.html +10 -4
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.html +10 -10
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000049.html → M000046.html} +0 -0
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000050.html → M000047.html} +0 -0
- data/doc/classes/SimpleMapper/XmlFormat.html +15 -15
- data/doc/classes/SimpleMapper/XmlFormat.src/{M000055.html → M000052.html} +0 -0
- data/doc/classes/SimpleMapper/XmlFormat.src/{M000056.html → M000053.html} +0 -0
- data/doc/classes/SimpleMapper/XmlFormat.src/{M000057.html → M000054.html} +1 -1
- data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.html +5 -5
- data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.src/{M000058.html → M000055.html} +2 -2
- data/doc/created.rid +1 -1
- data/doc/files/LICENSE.html +129 -0
- data/doc/files/README.html +130 -0
- data/doc/files/lib/simple_mapper/adapters/http_adapter_rb.html +1 -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 -1
- data/doc/files/lib/simple_mapper/default_plugins/options_to_query_rb.html +1 -1
- data/doc/files/lib/simple_mapper/formats/xml_format_rb.html +1 -1
- data/doc/files/lib/simple_mapper/support/bliss_serializer_rb.html +1 -1
- data/doc/fr_class_index.html +1 -1
- data/doc/fr_file_index.html +2 -0
- data/doc/fr_method_index.html +44 -40
- data/doc/index.html +1 -1
- data/lib/simple_mapper/adapters/http_adapter.rb +0 -2
- data/lib/simple_mapper/base.rb +23 -3
- data/lib/simple_mapper/default_plugins/callbacks.rb +14 -9
- data/lib/simple_mapper/default_plugins/oauth.rb +4 -0
- data/lib/simple_mapper/formats/xml_format.rb +3 -3
- data/lib/simple_mapper/support/bliss_serializer.rb +1 -1
- metadata +27 -22
- data/doc/classes/Callbacks.src/M000040.html +0 -18
- data/doc/classes/Callbacks.src/M000041.html +0 -18
- data/doc/classes/Callbacks.src/M000042.html +0 -19
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000054.html +0 -24
- data/doc/classes/SimpleMapper/SimpleModel.src/M000048.html +0 -24
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
|
81
81
|
|
|
82
82
|
<div class="name-list">
|
|
83
|
-
<a href="#
|
|
84
|
-
<a href="#
|
|
85
|
-
<a href="#
|
|
86
|
-
<a href="#
|
|
83
|
+
<a href="#M000044">identifier</a>
|
|
84
|
+
<a href="#M000042">included</a>
|
|
85
|
+
<a href="#M000045">method_missing</a>
|
|
86
|
+
<a href="#M000043">to_hash</a>
|
|
87
87
|
</div>
|
|
88
88
|
</div>
|
|
89
89
|
|
|
@@ -111,12 +111,12 @@
|
|
|
111
111
|
<div id="methods">
|
|
112
112
|
<h3 class="section-bar">Public Class methods</h3>
|
|
113
113
|
|
|
114
|
-
<div id="method-
|
|
115
|
-
<a name="
|
|
114
|
+
<div id="method-M000042" class="method-detail">
|
|
115
|
+
<a name="M000042"></a>
|
|
116
116
|
|
|
117
117
|
<div class="method-heading">
|
|
118
|
-
<a href="SimpleModel.src/
|
|
119
|
-
onclick="popupCode('SimpleModel.src/
|
|
118
|
+
<a href="SimpleModel.src/M000042.html" target="Code" class="method-signature"
|
|
119
|
+
onclick="popupCode('SimpleModel.src/M000042.html');return false;">
|
|
120
120
|
<span class="method-name">included</span><span class="method-args">(base)</span>
|
|
121
121
|
</a>
|
|
122
122
|
</div>
|
|
@@ -127,12 +127,12 @@
|
|
|
127
127
|
|
|
128
128
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
129
129
|
|
|
130
|
-
<div id="method-
|
|
131
|
-
<a name="
|
|
130
|
+
<div id="method-M000044" class="method-detail">
|
|
131
|
+
<a name="M000044"></a>
|
|
132
132
|
|
|
133
133
|
<div class="method-heading">
|
|
134
|
-
<a href="SimpleModel.src/
|
|
135
|
-
onclick="popupCode('SimpleModel.src/
|
|
134
|
+
<a href="SimpleModel.src/M000044.html" target="Code" class="method-signature"
|
|
135
|
+
onclick="popupCode('SimpleModel.src/M000044.html');return false;">
|
|
136
136
|
<span class="method-name">identifier</span><span class="method-args">()</span>
|
|
137
137
|
</a>
|
|
138
138
|
</div>
|
|
@@ -141,12 +141,12 @@
|
|
|
141
141
|
</div>
|
|
142
142
|
</div>
|
|
143
143
|
|
|
144
|
-
<div id="method-
|
|
145
|
-
<a name="
|
|
144
|
+
<div id="method-M000045" class="method-detail">
|
|
145
|
+
<a name="M000045"></a>
|
|
146
146
|
|
|
147
147
|
<div class="method-heading">
|
|
148
|
-
<a href="SimpleModel.src/
|
|
149
|
-
onclick="popupCode('SimpleModel.src/
|
|
148
|
+
<a href="SimpleModel.src/M000045.html" target="Code" class="method-signature"
|
|
149
|
+
onclick="popupCode('SimpleModel.src/M000045.html');return false;">
|
|
150
150
|
<span class="method-name">method_missing</span><span class="method-args">(method, *args)</span>
|
|
151
151
|
</a>
|
|
152
152
|
</div>
|
|
@@ -155,12 +155,12 @@
|
|
|
155
155
|
</div>
|
|
156
156
|
</div>
|
|
157
157
|
|
|
158
|
-
<div id="method-
|
|
159
|
-
<a name="
|
|
158
|
+
<div id="method-M000043" class="method-detail">
|
|
159
|
+
<a name="M000043"></a>
|
|
160
160
|
|
|
161
161
|
<div class="method-heading">
|
|
162
|
-
<a href="SimpleModel.src/
|
|
163
|
-
onclick="popupCode('SimpleModel.src/
|
|
162
|
+
<a href="SimpleModel.src/M000043.html" target="Code" class="method-signature"
|
|
163
|
+
onclick="popupCode('SimpleModel.src/M000043.html');return false;">
|
|
164
164
|
<span class="method-name">to_hash</span><span class="method-args">(options={})</span>
|
|
165
165
|
</a>
|
|
166
166
|
</div>
|
|
@@ -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>included (SimpleMapper::SimpleModel)</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/simple_model.rb, line 3</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
|
|
15
|
+
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">ClassMethods</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
File without changes
|
|
File without changes
|
|
@@ -5,14 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>method_missing (SimpleMapper::SimpleModel)</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/default_plugins/simple_model.rb, line
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-
|
|
15
|
-
<span class="ruby-identifier">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/default_plugins/simple_model.rb, line 15</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>)
|
|
16
|
+
<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@'</span><span class="ruby-operator">+</span><span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>)
|
|
17
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/=$/</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/=/</span>, <span class="ruby-value str">''</span>))
|
|
18
|
+
<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-value str">'@'</span><span class="ruby-operator">+</span><span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/=/</span>, <span class="ruby-value str">''</span>), <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
19
|
+
<span class="ruby-keyword kw">else</span>
|
|
20
|
+
<span class="ruby-keyword kw">super</span>
|
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
|
16
22
|
<span class="ruby-keyword kw">end</span></pre>
|
|
17
23
|
</body>
|
|
18
24
|
</html>
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
|
81
81
|
|
|
82
82
|
<div class="name-list">
|
|
83
|
-
<a href="#
|
|
84
|
-
<a href="#
|
|
83
|
+
<a href="#M000047">identifier</a>
|
|
84
|
+
<a href="#M000046">properties</a>
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
87
87
|
|
|
@@ -103,12 +103,12 @@
|
|
|
103
103
|
<div id="methods">
|
|
104
104
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
105
105
|
|
|
106
|
-
<div id="method-
|
|
107
|
-
<a name="
|
|
106
|
+
<div id="method-M000047" class="method-detail">
|
|
107
|
+
<a name="M000047"></a>
|
|
108
108
|
|
|
109
109
|
<div class="method-heading">
|
|
110
|
-
<a href="ClassMethods.src/
|
|
111
|
-
onclick="popupCode('ClassMethods.src/
|
|
110
|
+
<a href="ClassMethods.src/M000047.html" target="Code" class="method-signature"
|
|
111
|
+
onclick="popupCode('ClassMethods.src/M000047.html');return false;">
|
|
112
112
|
<span class="method-name">identifier</span><span class="method-args">(id=nil)</span>
|
|
113
113
|
</a>
|
|
114
114
|
</div>
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
|
-
<div id="method-
|
|
121
|
-
<a name="
|
|
120
|
+
<div id="method-M000046" class="method-detail">
|
|
121
|
+
<a name="M000046"></a>
|
|
122
122
|
|
|
123
123
|
<div class="method-heading">
|
|
124
|
-
<a href="ClassMethods.src/
|
|
125
|
-
onclick="popupCode('ClassMethods.src/
|
|
124
|
+
<a href="ClassMethods.src/M000046.html" target="Code" class="method-signature"
|
|
125
|
+
onclick="popupCode('ClassMethods.src/M000046.html');return false;">
|
|
126
126
|
<span class="method-name">properties</span><span class="method-args">(*properties)</span>
|
|
127
127
|
</a>
|
|
128
128
|
</div>
|
|
File without changes
|
|
File without changes
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
|
81
81
|
|
|
82
82
|
<div class="name-list">
|
|
83
|
-
<a href="#
|
|
84
|
-
<a href="#
|
|
85
|
-
<a href="#
|
|
83
|
+
<a href="#M000052">included</a>
|
|
84
|
+
<a href="#M000053">mime_type_headers</a>
|
|
85
|
+
<a href="#M000054">to_xml</a>
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
88
|
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
<div id="methods">
|
|
111
111
|
<h3 class="section-bar">Public Class methods</h3>
|
|
112
112
|
|
|
113
|
-
<div id="method-
|
|
114
|
-
<a name="
|
|
113
|
+
<div id="method-M000052" class="method-detail">
|
|
114
|
+
<a name="M000052"></a>
|
|
115
115
|
|
|
116
116
|
<div class="method-heading">
|
|
117
|
-
<a href="XmlFormat.src/
|
|
118
|
-
onclick="popupCode('XmlFormat.src/
|
|
117
|
+
<a href="XmlFormat.src/M000052.html" target="Code" class="method-signature"
|
|
118
|
+
onclick="popupCode('XmlFormat.src/M000052.html');return false;">
|
|
119
119
|
<span class="method-name">included</span><span class="method-args">(base)</span>
|
|
120
120
|
</a>
|
|
121
121
|
</div>
|
|
@@ -124,12 +124,12 @@
|
|
|
124
124
|
</div>
|
|
125
125
|
</div>
|
|
126
126
|
|
|
127
|
-
<div id="method-
|
|
128
|
-
<a name="
|
|
127
|
+
<div id="method-M000053" class="method-detail">
|
|
128
|
+
<a name="M000053"></a>
|
|
129
129
|
|
|
130
130
|
<div class="method-heading">
|
|
131
|
-
<a href="XmlFormat.src/
|
|
132
|
-
onclick="popupCode('XmlFormat.src/
|
|
131
|
+
<a href="XmlFormat.src/M000053.html" target="Code" class="method-signature"
|
|
132
|
+
onclick="popupCode('XmlFormat.src/M000053.html');return false;">
|
|
133
133
|
<span class="method-name">mime_type_headers</span><span class="method-args">()</span>
|
|
134
134
|
</a>
|
|
135
135
|
</div>
|
|
@@ -140,12 +140,12 @@
|
|
|
140
140
|
|
|
141
141
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
142
142
|
|
|
143
|
-
<div id="method-
|
|
144
|
-
<a name="
|
|
143
|
+
<div id="method-M000054" class="method-detail">
|
|
144
|
+
<a name="M000054"></a>
|
|
145
145
|
|
|
146
146
|
<div class="method-heading">
|
|
147
|
-
<a href="XmlFormat.src/
|
|
148
|
-
onclick="popupCode('XmlFormat.src/
|
|
147
|
+
<a href="XmlFormat.src/M000054.html" target="Code" class="method-signature"
|
|
148
|
+
onclick="popupCode('XmlFormat.src/M000054.html');return false;">
|
|
149
149
|
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
|
150
150
|
</a>
|
|
151
151
|
</div>
|
|
File without changes
|
|
File without changes
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/formats/xml_format.rb, line 16</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
|
15
15
|
<span class="ruby-identifier">xml</span> = <span class="ruby-constant">Serialize</span>.<span class="ruby-identifier">object_to_xml</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'self'</span>).<span class="ruby-identifier">to_s</span>
|
|
16
|
-
<span class="ruby-
|
|
16
|
+
<span class="ruby-comment cmt"># puts "POST XML: #{xml}"</span>
|
|
17
17
|
<span class="ruby-identifier">xml</span>
|
|
18
18
|
<span class="ruby-keyword kw">end</span></pre>
|
|
19
19
|
</body>
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
|
81
81
|
|
|
82
82
|
<div class="name-list">
|
|
83
|
-
<a href="#
|
|
83
|
+
<a href="#M000055">from_xml</a>
|
|
84
84
|
</div>
|
|
85
85
|
</div>
|
|
86
86
|
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
<div id="methods">
|
|
103
103
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
104
104
|
|
|
105
|
-
<div id="method-
|
|
106
|
-
<a name="
|
|
105
|
+
<div id="method-M000055" class="method-detail">
|
|
106
|
+
<a name="M000055"></a>
|
|
107
107
|
|
|
108
108
|
<div class="method-heading">
|
|
109
|
-
<a href="ClassMethods.src/
|
|
110
|
-
onclick="popupCode('ClassMethods.src/
|
|
109
|
+
<a href="ClassMethods.src/M000055.html" target="Code" class="method-signature"
|
|
110
|
+
onclick="popupCode('ClassMethods.src/M000055.html');return false;">
|
|
111
111
|
<span class="method-name">from_xml</span><span class="method-args">(xml)</span>
|
|
112
112
|
</a>
|
|
113
113
|
</div>
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Several objects returned under key '#{key}'/'#{key.singularize}':"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
|
|
21
21
|
<span class="ruby-identifier">doc</span>[<span class="ruby-identifier">key</span>][<span class="ruby-identifier">key</span>.<span class="ruby-identifier">singularize</span>].<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
|
22
22
|
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Obj: #{e.inspect}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
|
|
23
|
-
<span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">"::#{key.singularize.camelize}"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>).<span class="ruby-identifier">
|
|
23
|
+
<span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">"::#{key.singularize.camelize}"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>).<span class="ruby-identifier">load</span>(<span class="ruby-identifier">e</span>)
|
|
24
24
|
<span class="ruby-keyword kw">end</span>
|
|
25
25
|
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">doc</span>[<span class="ruby-identifier">key</span>] <span class="ruby-comment cmt"># top-level must be single object</span>
|
|
26
|
-
<span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">"::#{key.singularize.camelize}"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>).<span class="ruby-identifier">
|
|
26
|
+
<span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">"::#{key.singularize.camelize}"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>).<span class="ruby-identifier">load</span>(<span class="ruby-constant">Serialize</span>.<span class="ruby-identifier">hash_from_xml</span>(<span class="ruby-identifier">xml</span>)[<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">underscore</span>])
|
|
27
27
|
<span class="ruby-keyword kw">else</span>
|
|
28
28
|
<span class="ruby-keyword kw">nil</span>
|
|
29
29
|
<span class="ruby-keyword kw">end</span>
|
data/doc/created.rid
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Thu, 20 Mar 2008 17:00:43 -0400
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: LICENSE</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>LICENSE</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>LICENSE
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Mon Mar 17 10:54:05 -0400 2008</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
Copyright (c) 2008 BehindLogic
|
|
74
|
+
</p>
|
|
75
|
+
<p>
|
|
76
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
77
|
+
copy of this software and associated documentation files (the
|
|
78
|
+
"Software"), to deal in the Software without restriction,
|
|
79
|
+
including without limitation the rights to use, copy, modify, merge,
|
|
80
|
+
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
81
|
+
permit persons to whom the Software is furnished to do so, subject to the
|
|
82
|
+
following conditions:
|
|
83
|
+
</p>
|
|
84
|
+
<p>
|
|
85
|
+
The above copyright notice and this permission notice shall be included in
|
|
86
|
+
all copies or substantial portions of the Software.
|
|
87
|
+
</p>
|
|
88
|
+
<p>
|
|
89
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
90
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
91
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
92
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
93
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
94
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
95
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
96
|
+
</p>
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<!-- if includes -->
|
|
108
|
+
|
|
109
|
+
<div id="section">
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
<!-- if method_list -->
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<div id="validator-badges">
|
|
125
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
</body>
|
|
129
|
+
</html>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: README</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>README</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>README
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Mon Mar 17 16:22:47 -0400 2008</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<h2><a href="../classes/SimpleMapper.html">SimpleMapper</a></h2>
|
|
73
|
+
<p>
|
|
74
|
+
The purpose of this is to provide Ruby models with Persistence in the
|
|
75
|
+
simplest way possible. Like all ORM‘s it must be based on two
|
|
76
|
+
components: Format and Connection. The aim is to stay out of the way as
|
|
77
|
+
much as possible: Format will be performed by calling, for example a Person
|
|
78
|
+
class using the xml format: ’@person.to_xml’, and likewise
|
|
79
|
+
‘Person.from_xml’.
|
|
80
|
+
</p>
|
|
81
|
+
<p>
|
|
82
|
+
<a href="../classes/SimpleMapper.html">SimpleMapper</a> will hold no
|
|
83
|
+
concept of primary keys or even of properties or attributes. It will be
|
|
84
|
+
data-agnostic. It will simply handle the transformation and communication
|
|
85
|
+
of data while providing a common method interface in order to remove the
|
|
86
|
+
model from the persistence.
|
|
87
|
+
</p>
|
|
88
|
+
<p>
|
|
89
|
+
The connection class will simply work with the idea of messages sent by
|
|
90
|
+
adapters. All adapters must respond to these methods appropriately: get,
|
|
91
|
+
put, post, and delete. These correspond directly to HTTP methods, and
|
|
92
|
+
correspond to SQL commands in the order of SELECT, UPDATE, INSERT, and
|
|
93
|
+
DELETE. It is up to an extraneous library/gem to handle conversions of
|
|
94
|
+
special "finder" options, like converting an options hash to a
|
|
95
|
+
sql SELECT request, or mapping an options hash to an HTTP request. It is
|
|
96
|
+
purposed to make it as light and simple as possible to plug these in.
|
|
97
|
+
</p>
|
|
98
|
+
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
<!-- if includes -->
|
|
109
|
+
|
|
110
|
+
<div id="section">
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
<!-- if method_list -->
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
<div id="validator-badges">
|
|
126
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
</body>
|
|
130
|
+
</html>
|