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
@@ -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="#M000047">identifier</a>
|
84
|
+
<a href="#M000045">included</a>
|
85
|
+
<a href="#M000048">method_missing</a>
|
86
|
+
<a href="#M000046">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-M000045" class="method-detail">
|
115
|
+
<a name="M000045"></a>
|
116
116
|
|
117
117
|
<div class="method-heading">
|
118
|
-
<a href="SimpleModel.src/
|
119
|
-
onclick="popupCode('SimpleModel.src/
|
118
|
+
<a href="SimpleModel.src/M000045.html" target="Code" class="method-signature"
|
119
|
+
onclick="popupCode('SimpleModel.src/M000045.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-M000047" class="method-detail">
|
131
|
+
<a name="M000047"></a>
|
132
132
|
|
133
133
|
<div class="method-heading">
|
134
|
-
<a href="SimpleModel.src/
|
135
|
-
onclick="popupCode('SimpleModel.src/
|
134
|
+
<a href="SimpleModel.src/M000047.html" target="Code" class="method-signature"
|
135
|
+
onclick="popupCode('SimpleModel.src/M000047.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-M000048" class="method-detail">
|
145
|
+
<a name="M000048"></a>
|
146
146
|
|
147
147
|
<div class="method-heading">
|
148
|
-
<a href="SimpleModel.src/
|
149
|
-
onclick="popupCode('SimpleModel.src/
|
148
|
+
<a href="SimpleModel.src/M000048.html" target="Code" class="method-signature"
|
149
|
+
onclick="popupCode('SimpleModel.src/M000048.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-M000046" class="method-detail">
|
159
|
+
<a name="M000046"></a>
|
160
160
|
|
161
161
|
<div class="method-heading">
|
162
|
-
<a href="SimpleModel.src/
|
163
|
-
onclick="popupCode('SimpleModel.src/
|
162
|
+
<a href="SimpleModel.src/M000046.html" target="Code" class="method-signature"
|
163
|
+
onclick="popupCode('SimpleModel.src/M000046.html');return false;">
|
164
164
|
<span class="method-name">to_hash</span><span class="method-args">(options={})</span>
|
165
165
|
</a>
|
166
166
|
</div>
|
@@ -5,20 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>included (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-
|
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>
|
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>
|
22
16
|
<span class="ruby-keyword kw">end</span></pre>
|
23
17
|
</body>
|
24
18
|
</html>
|
File without changes
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
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>method_missing (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 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>
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -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="#M000058">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-M000058" class="method-detail">
|
106
|
+
<a name="M000058"></a>
|
107
107
|
|
108
108
|
<div class="method-heading">
|
109
|
-
<a href="ClassMethods.src/
|
110
|
-
onclick="popupCode('ClassMethods.src/
|
109
|
+
<a href="ClassMethods.src/M000058.html" target="Code" class="method-signature"
|
110
|
+
onclick="popupCode('ClassMethods.src/M000058.html');return false;">
|
111
111
|
<span class="method-name">from_xml</span><span class="method-args">(xml)</span>
|
112
112
|
</a>
|
113
113
|
</div>
|
@@ -10,20 +10,22 @@
|
|
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/formats/xml_format.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/formats/xml_format.rb, line 36</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">xml</span>)
|
15
15
|
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">Serialize</span>.<span class="ruby-identifier">hash_from_xml</span>(<span class="ruby-identifier">xml</span>)
|
16
16
|
<span class="ruby-comment cmt"># doc could include a single 'model' element, or a 'models' wrapper around several.</span>
|
17
17
|
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Top-level XML key(s): #{doc.keys.inspect}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
|
18
18
|
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">first</span>
|
19
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">doc</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">uniq</span> <span class="ruby-operator">==</span> [<span class="ruby-identifier">key</span>.<span class="ruby-identifier">singularize</span>] <span class="ruby-operator">&&</span> <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">is_a?</span>(<span class="ruby-constant">Array</span>)
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">doc</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">doc</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">uniq</span> <span class="ruby-operator">==</span> [<span class="ruby-identifier">key</span>.<span class="ruby-identifier">singularize</span>] <span class="ruby-operator">&&</span> <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">is_a?</span>(<span class="ruby-constant">Array</span>)
|
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
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">new</span>(<span class="ruby-identifier">e</span>)
|
24
24
|
<span class="ruby-keyword kw">end</span>
|
25
|
-
<span class="ruby-keyword kw">
|
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
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">new</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
|
+
<span class="ruby-keyword kw">else</span>
|
28
|
+
<span class="ruby-keyword kw">nil</span>
|
27
29
|
<span class="ruby-keyword kw">end</span>
|
28
30
|
<span class="ruby-keyword kw">end</span></pre>
|
29
31
|
</body>
|
@@ -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="#M000055">included</a>
|
84
|
+
<a href="#M000056">mime_type_headers</a>
|
85
|
+
<a href="#M000057">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-M000055" class="method-detail">
|
114
|
+
<a name="M000055"></a>
|
115
115
|
|
116
116
|
<div class="method-heading">
|
117
|
-
<a href="XmlFormat.src/
|
118
|
-
onclick="popupCode('XmlFormat.src/
|
117
|
+
<a href="XmlFormat.src/M000055.html" target="Code" class="method-signature"
|
118
|
+
onclick="popupCode('XmlFormat.src/M000055.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-M000056" class="method-detail">
|
128
|
+
<a name="M000056"></a>
|
129
129
|
|
130
130
|
<div class="method-heading">
|
131
|
-
<a href="XmlFormat.src/
|
132
|
-
onclick="popupCode('XmlFormat.src/
|
131
|
+
<a href="XmlFormat.src/M000056.html" target="Code" class="method-signature"
|
132
|
+
onclick="popupCode('XmlFormat.src/M000056.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-M000057" class="method-detail">
|
144
|
+
<a name="M000057"></a>
|
145
145
|
|
146
146
|
<div class="method-heading">
|
147
|
-
<a href="XmlFormat.src/
|
148
|
-
onclick="popupCode('XmlFormat.src/
|
147
|
+
<a href="XmlFormat.src/M000057.html" target="Code" class="method-signature"
|
148
|
+
onclick="popupCode('XmlFormat.src/M000057.html');return false;">
|
149
149
|
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
150
150
|
</a>
|
151
151
|
</div>
|
@@ -10,7 +10,7 @@
|
|
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/formats/xml_format.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/formats/xml_format.rb, line 8</span>
|
14
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
15
|
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">ClassMethods</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
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/formats/xml_format.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/formats/xml_format.rb, line 12</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">mime_type_headers</span>
|
15
15
|
{<span class="ruby-value str">'Accept'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'application/xml'</span>, <span class="ruby-value str">'Content-type'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'application/xml'</span>}
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,9 +10,11 @@
|
|
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/formats/xml_format.rb, line
|
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
|
-
<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>
|
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-identifier">puts</span> <span class="ruby-node">"POST XML: #{xml}"</span>
|
17
|
+
<span class="ruby-identifier">xml</span>
|
16
18
|
<span class="ruby-keyword kw">end</span></pre>
|
17
19
|
</body>
|
18
20
|
</html>
|
@@ -0,0 +1,139 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Time</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Time</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/simple_mapper/default_plugins/options_to_query_rb.html">
|
59
|
+
lib/simple_mapper/default_plugins/options_to_query.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000001">to_param</a>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if includes -->
|
99
|
+
|
100
|
+
<div id="section">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<!-- if method_list -->
|
110
|
+
<div id="methods">
|
111
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
112
|
+
|
113
|
+
<div id="method-M000001" class="method-detail">
|
114
|
+
<a name="M000001"></a>
|
115
|
+
|
116
|
+
<div class="method-heading">
|
117
|
+
<a href="Time.src/M000001.html" target="Code" class="method-signature"
|
118
|
+
onclick="popupCode('Time.src/M000001.html');return false;">
|
119
|
+
<span class="method-name">to_param</span><span class="method-args">()</span>
|
120
|
+
</a>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div class="method-description">
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
<div id="validator-badges">
|
135
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
</body>
|
139
|
+
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>to_param (Time)</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/
|
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/default_plugins/options_to_query.rb, line 28</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_param</span>
|
15
|
+
<span class="ruby-identifier">xmlschema</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Mon, 17 Mar 2008 16:34:36 -0400
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Mon Mar 17 16:10:48 -0400 2008</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -76,6 +76,7 @@
|
|
76
76
|
net/http
|
77
77
|
uri
|
78
78
|
simple_mapper/default_plugins/callbacks
|
79
|
+
simple_mapper/default_plugins/options_to_query
|
79
80
|
</div>
|
80
81
|
</div>
|
81
82
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Mon Mar 17 16:11:59 -0400 2008</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -68,12 +68,6 @@
|
|
68
68
|
|
69
69
|
<div id="contextContent">
|
70
70
|
|
71
|
-
<div id="description">
|
72
|
-
<p>
|
73
|
-
gem ‘oauth’, ’=0.2.2‘
|
74
|
-
</p>
|
75
|
-
|
76
|
-
</div>
|
77
71
|
|
78
72
|
<div id="requires-list">
|
79
73
|
<h3 class="section-bar">Required files</h3>
|