dynamoid 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Dynamoid.gemspec +5 -3
- data/README.markdown +2 -2
- data/VERSION +1 -1
- data/doc/Dynamoid.html +26 -14
- data/doc/Dynamoid/Adapter.html +33 -35
- data/doc/Dynamoid/Adapter/AwsSdk.html +177 -153
- data/doc/Dynamoid/Adapter/Local.html +144 -57
- data/doc/Dynamoid/Associations.html +3 -3
- data/doc/Dynamoid/Associations/Association.html +104 -1016
- data/doc/Dynamoid/Associations/BelongsTo.html +11 -192
- data/doc/Dynamoid/Associations/ClassMethods.html +17 -17
- data/doc/Dynamoid/Associations/HasAndBelongsToMany.html +15 -190
- data/doc/Dynamoid/Associations/HasMany.html +15 -190
- data/doc/Dynamoid/Associations/HasOne.html +11 -192
- data/doc/Dynamoid/Associations/ManyAssociation.html +1640 -0
- data/doc/Dynamoid/Associations/SingleAssociation.html +598 -0
- data/doc/Dynamoid/Components.html +4 -2
- data/doc/Dynamoid/Config.html +10 -10
- data/doc/Dynamoid/Config/Options.html +1 -1
- data/doc/Dynamoid/Criteria.html +1 -1
- data/doc/Dynamoid/Criteria/Chain.html +326 -22
- data/doc/Dynamoid/Criteria/ClassMethods.html +1 -1
- data/doc/Dynamoid/Document.html +181 -27
- data/doc/Dynamoid/Document/ClassMethods.html +392 -36
- data/doc/Dynamoid/Errors.html +1 -1
- data/doc/Dynamoid/Errors/DocumentNotValid.html +1 -1
- data/doc/Dynamoid/Errors/Error.html +1 -1
- data/doc/Dynamoid/Errors/InvalidField.html +1 -1
- data/doc/Dynamoid/Errors/MissingRangeKey.html +1 -1
- data/doc/Dynamoid/Fields.html +44 -24
- data/doc/Dynamoid/Fields/ClassMethods.html +60 -15
- data/doc/Dynamoid/Finders.html +1 -1
- data/doc/Dynamoid/Finders/ClassMethods.html +45 -31
- data/doc/Dynamoid/Indexes.html +7 -7
- data/doc/Dynamoid/Indexes/ClassMethods.html +6 -4
- data/doc/Dynamoid/Indexes/Index.html +47 -32
- data/doc/Dynamoid/Persistence.html +47 -49
- data/doc/Dynamoid/Persistence/ClassMethods.html +149 -47
- data/doc/Dynamoid/Validations.html +1 -1
- data/doc/_index.html +35 -13
- data/doc/class_list.html +1 -1
- data/doc/file.LICENSE.html +1 -1
- data/doc/file.README.html +37 -4
- data/doc/index.html +37 -4
- data/doc/method_list.html +320 -136
- data/doc/top-level-namespace.html +1 -1
- data/lib/dynamoid/adapter.rb +28 -30
- data/lib/dynamoid/adapter/aws_sdk.rb +23 -22
- data/lib/dynamoid/persistence.rb +33 -27
- metadata +6 -4
@@ -84,7 +84,7 @@
|
|
84
84
|
|
85
85
|
|
86
86
|
<dt class="r2">Includes:</dt>
|
87
|
-
<dd class="r2"><span class='object_link'><a href="
|
87
|
+
<dd class="r2"><span class='object_link'><a href="ManyAssociation.html" title="Dynamoid::Associations::ManyAssociation (module)">ManyAssociation</a></span></dd>
|
88
88
|
|
89
89
|
|
90
90
|
|
@@ -104,66 +104,27 @@
|
|
104
104
|
|
105
105
|
<h2>Instance Attribute Summary</h2>
|
106
106
|
|
107
|
-
<h3 class="inherited">Attributes included from <span class='object_link'><a href="
|
108
|
-
<p class="inherited"><span class='object_link'><a href="
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<h2>
|
113
|
-
Instance Method Summary
|
114
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
115
|
-
</h2>
|
107
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="ManyAssociation.html" title="Dynamoid::Associations::ManyAssociation (module)">ManyAssociation</a></span></h3>
|
108
|
+
<p class="inherited"><span class='object_link'><a href="ManyAssociation.html#query-instance_method" title="Dynamoid::Associations::ManyAssociation#query (method)">#query</a></span></p>
|
116
109
|
|
117
|
-
<ul class="summary">
|
118
|
-
|
119
|
-
<li class="public ">
|
120
|
-
<span class="summary_signature">
|
121
|
-
|
122
|
-
<a href="#%3D%3D-instance_method" title="#== (instance method)">- (Boolean) <strong>==</strong>(other) </a>
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
</span>
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
110
|
|
132
111
|
|
112
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
113
|
+
<p class="inherited"><span class='object_link'><a href="Association.html#loaded-instance_method" title="Dynamoid::Associations::Association#loaded (method)">#loaded</a></span>, <span class='object_link'><a href="Association.html#name-instance_method" title="Dynamoid::Associations::Association#name (method)">#name</a></span>, <span class='object_link'><a href="Association.html#options-instance_method" title="Dynamoid::Associations::Association#options (method)">#options</a></span>, <span class='object_link'><a href="Association.html#source-instance_method" title="Dynamoid::Associations::Association#source (method)">#source</a></span></p>
|
133
114
|
|
134
|
-
|
135
|
-
<span class="summary_desc"><div class='inline'><p>Is this array equal to the association's records?.</p>
|
136
|
-
</div></span>
|
137
|
-
|
138
|
-
</li>
|
139
115
|
|
140
|
-
|
141
|
-
<li class="public ">
|
142
|
-
<span class="summary_signature">
|
143
|
-
|
144
|
-
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(method, *args) </a>
|
145
|
-
|
146
116
|
|
147
|
-
|
148
|
-
</span>
|
149
|
-
|
150
117
|
|
151
118
|
|
152
119
|
|
153
120
|
|
154
121
|
|
155
|
-
|
156
|
-
|
157
|
-
<span class="summary_desc"><div class='inline'><p>Delegate methods we don't find directly to the records array.</p>
|
158
|
-
</div></span>
|
122
|
+
<h2>Method Summary</h2>
|
159
123
|
|
160
|
-
</
|
124
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="ManyAssociation.html" title="Dynamoid::Associations::ManyAssociation (module)">ManyAssociation</a></span></h3>
|
125
|
+
<p class="inherited"><span class='object_link'><a href="ManyAssociation.html#%3C%3C-instance_method" title="Dynamoid::Associations::ManyAssociation#<< (method)">#<<</a></span>, <span class='object_link'><a href="ManyAssociation.html#%3D%3D-instance_method" title="Dynamoid::Associations::ManyAssociation#== (method)">#==</a></span>, <span class='object_link'><a href="ManyAssociation.html#create-instance_method" title="Dynamoid::Associations::ManyAssociation#create (method)">#create</a></span>, <span class='object_link'><a href="ManyAssociation.html#create%21-instance_method" title="Dynamoid::Associations::ManyAssociation#create! (method)">#create!</a></span>, <span class='object_link'><a href="ManyAssociation.html#delete-instance_method" title="Dynamoid::Associations::ManyAssociation#delete (method)">#delete</a></span>, <span class='object_link'><a href="ManyAssociation.html#delete_all-instance_method" title="Dynamoid::Associations::ManyAssociation#delete_all (method)">#delete_all</a></span>, <span class='object_link'><a href="ManyAssociation.html#destroy_all-instance_method" title="Dynamoid::Associations::ManyAssociation#destroy_all (method)">#destroy_all</a></span>, <span class='object_link'><a href="ManyAssociation.html#each-instance_method" title="Dynamoid::Associations::ManyAssociation#each (method)">#each</a></span>, <span class='object_link'><a href="ManyAssociation.html#find_target-instance_method" title="Dynamoid::Associations::ManyAssociation#find_target (method)">#find_target</a></span>, <span class='object_link'><a href="ManyAssociation.html#include%3F-instance_method" title="Dynamoid::Associations::ManyAssociation#include? (method)">#include?</a></span>, <span class='object_link'><a href="ManyAssociation.html#initialize-instance_method" title="Dynamoid::Associations::ManyAssociation#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="ManyAssociation.html#method_missing-instance_method" title="Dynamoid::Associations::ManyAssociation#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="ManyAssociation.html#records-instance_method" title="Dynamoid::Associations::ManyAssociation#records (method)">#records</a></span>, <span class='object_link'><a href="ManyAssociation.html#setter-instance_method" title="Dynamoid::Associations::ManyAssociation#setter (method)">#setter</a></span>, <span class='object_link'><a href="ManyAssociation.html#where-instance_method" title="Dynamoid::Associations::ManyAssociation#where (method)">#where</a></span></p>
|
161
126
|
|
162
|
-
|
163
|
-
</ul>
|
164
127
|
|
165
|
-
|
166
|
-
|
167
128
|
|
168
129
|
|
169
130
|
|
@@ -172,165 +133,29 @@
|
|
172
133
|
|
173
134
|
|
174
135
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
175
|
-
<p class="inherited"><span class='object_link'><a href="Association.html
|
176
|
-
|
177
|
-
<div id="constructor_details" class="method_details_list">
|
136
|
+
<p class="inherited"><span class='object_link'><a href="Association.html#find_target-instance_method" title="Dynamoid::Associations::Association#find_target (method)">#find_target</a></span>, <span class='object_link'><a href="Association.html#initialize-instance_method" title="Dynamoid::Associations::Association#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Association.html#loaded%3F-instance_method" title="Dynamoid::Associations::Association#loaded? (method)">#loaded?</a></span>, <span class='object_link'><a href="Association.html#reset-instance_method" title="Dynamoid::Associations::Association#reset (method)">#reset</a></span>, <span class='object_link'><a href="Association.html#target-instance_method" title="Dynamoid::Associations::Association#target (method)">#target</a></span></p>
|
137
|
+
<div id="constructor_details" class="method_details_list">
|
178
138
|
<h2>Constructor Details</h2>
|
179
139
|
|
180
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="
|
140
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="ManyAssociation.html#initialize-instance_method" title="Dynamoid::Associations::ManyAssociation#initialize (method)">Dynamoid::Associations::ManyAssociation</a></span></p>
|
181
141
|
|
182
142
|
</div>
|
183
143
|
<div id="method_missing_details" class="method_details_list">
|
184
144
|
<h2>Dynamic Method Handling</h2>
|
185
|
-
<p class="notice
|
145
|
+
<p class="notice super">
|
186
146
|
This class handles dynamic methods through the <tt>method_missing</tt> method
|
187
147
|
|
188
|
-
|
189
|
-
|
190
|
-
<div class="method_details first">
|
191
|
-
<p class="signature first" id="method_missing-instance_method">
|
192
|
-
|
193
|
-
- (<tt>Object</tt>) <strong>method_missing</strong>(method, *args)
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
</p><div class="docstring">
|
198
|
-
<div class="discussion">
|
199
|
-
<p>Delegate methods we don't find directly to the records array.</p>
|
200
|
-
|
201
|
-
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
<div class="tags">
|
205
|
-
|
206
|
-
<h3>Since:</h3>
|
207
|
-
<ul class="since">
|
208
|
-
|
209
|
-
<li>
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
<div class='inline'><p>0.2.0</p>
|
216
|
-
</div>
|
217
|
-
|
218
|
-
</li>
|
219
|
-
|
220
|
-
</ul>
|
221
|
-
|
222
|
-
</div><table class="source_code">
|
223
|
-
<tr>
|
224
|
-
<td>
|
225
|
-
<pre class="lines">
|
226
|
-
|
227
|
-
|
228
|
-
21
|
229
|
-
22
|
230
|
-
23
|
231
|
-
24
|
232
|
-
25
|
233
|
-
26
|
234
|
-
27</pre>
|
235
|
-
</td>
|
236
|
-
<td>
|
237
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/associations/has_many.rb', line 21</span>
|
238
|
-
|
239
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
240
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
241
|
-
<span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
242
|
-
<span class='kw'>else</span>
|
243
|
-
<span class='kw'>super</span>
|
244
|
-
<span class='kw'>end</span>
|
245
|
-
<span class='kw'>end</span></pre>
|
246
|
-
</td>
|
247
|
-
</tr>
|
248
|
-
</table>
|
249
|
-
</div>
|
250
|
-
|
251
|
-
</div>
|
252
|
-
|
253
|
-
|
254
|
-
<div id="instance_method_details" class="method_details_list">
|
255
|
-
<h2>Instance Method Details</h2>
|
256
|
-
|
148
|
+
in the class <span class='object_link'><a href="ManyAssociation.html#method_missing-instance_method" title="Dynamoid::Associations::ManyAssociation#method_missing (method)">Dynamoid::Associations::ManyAssociation</a></span>
|
257
149
|
|
258
|
-
|
259
|
-
<p class="signature first" id="==-instance_method">
|
260
|
-
|
261
|
-
- (<tt>Boolean</tt>) <strong>==</strong>(other)
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
</p><div class="docstring">
|
266
|
-
<div class="discussion">
|
267
|
-
<p>Is this array equal to the association's records?</p>
|
268
|
-
|
269
|
-
|
270
|
-
</div>
|
271
|
-
</div>
|
272
|
-
<div class="tags">
|
273
|
-
|
274
|
-
<h3>Returns:</h3>
|
275
|
-
<ul class="return">
|
150
|
+
</p>
|
276
151
|
|
277
|
-
<li>
|
278
|
-
|
279
|
-
|
280
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
—
|
285
|
-
<div class='inline'><p>true/false</p>
|
286
152
|
</div>
|
287
|
-
|
288
|
-
</li>
|
289
|
-
|
290
|
-
</ul>
|
291
|
-
<h3>Since:</h3>
|
292
|
-
<ul class="since">
|
293
|
-
|
294
|
-
<li>
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
<div class='inline'><p>0.2.0</p>
|
301
|
-
</div>
|
302
|
-
|
303
|
-
</li>
|
304
|
-
|
305
|
-
</ul>
|
306
153
|
|
307
|
-
</div><table class="source_code">
|
308
|
-
<tr>
|
309
|
-
<td>
|
310
|
-
<pre class="lines">
|
311
|
-
|
312
|
-
|
313
|
-
14
|
314
|
-
15
|
315
|
-
16</pre>
|
316
|
-
</td>
|
317
|
-
<td>
|
318
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/associations/has_many.rb', line 14</span>
|
319
|
-
|
320
|
-
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
321
|
-
<span class='id identifier rubyid_records'>records</span> <span class='op'>==</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
322
|
-
<span class='kw'>end</span></pre>
|
323
|
-
</td>
|
324
|
-
</tr>
|
325
|
-
</table>
|
326
|
-
</div>
|
327
|
-
|
328
|
-
</div>
|
329
154
|
|
330
155
|
</div>
|
331
156
|
|
332
157
|
<div id="footer">
|
333
|
-
Generated on
|
158
|
+
Generated on Thu Apr 26 01:26:26 2012 by
|
334
159
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
335
160
|
0.7.5 (ruby-1.9.3).
|
336
161
|
</div>
|
@@ -84,7 +84,7 @@
|
|
84
84
|
|
85
85
|
|
86
86
|
<dt class="r2">Includes:</dt>
|
87
|
-
<dd class="r2"><span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></dd>
|
87
|
+
<dd class="r2"><span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span>, <span class='object_link'><a href="SingleAssociation.html" title="Dynamoid::Associations::SingleAssociation (module)">SingleAssociation</a></span></dd>
|
88
88
|
|
89
89
|
|
90
90
|
|
@@ -105,64 +105,19 @@
|
|
105
105
|
<h2>Instance Attribute Summary</h2>
|
106
106
|
|
107
107
|
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
108
|
-
<p class="inherited"><span class='object_link'><a href="Association.html#
|
108
|
+
<p class="inherited"><span class='object_link'><a href="Association.html#loaded-instance_method" title="Dynamoid::Associations::Association#loaded (method)">#loaded</a></span>, <span class='object_link'><a href="Association.html#name-instance_method" title="Dynamoid::Associations::Association#name (method)">#name</a></span>, <span class='object_link'><a href="Association.html#options-instance_method" title="Dynamoid::Associations::Association#options (method)">#options</a></span>, <span class='object_link'><a href="Association.html#source-instance_method" title="Dynamoid::Associations::Association#source (method)">#source</a></span></p>
|
109
109
|
|
110
110
|
|
111
|
-
|
112
|
-
<h2>
|
113
|
-
Instance Method Summary
|
114
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
115
|
-
</h2>
|
116
|
-
|
117
|
-
<ul class="summary">
|
118
|
-
|
119
|
-
<li class="public ">
|
120
|
-
<span class="summary_signature">
|
121
|
-
|
122
|
-
<a href="#%3D%3D-instance_method" title="#== (instance method)">- (Boolean) <strong>==</strong>(other) </a>
|
123
|
-
|
124
111
|
|
125
|
-
|
126
|
-
</span>
|
127
112
|
|
128
113
|
|
129
114
|
|
130
115
|
|
131
116
|
|
117
|
+
<h2>Method Summary</h2>
|
132
118
|
|
133
|
-
|
134
|
-
|
135
|
-
<span class="summary_desc"><div class='inline'><p>Is this object equal to the association's target?.</p>
|
136
|
-
</div></span>
|
137
|
-
|
138
|
-
</li>
|
139
|
-
|
140
|
-
|
141
|
-
<li class="public ">
|
142
|
-
<span class="summary_signature">
|
143
|
-
|
144
|
-
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(method, *args) </a>
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
</span>
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
<span class="summary_desc"><div class='inline'><p>Delegate methods we don't find directly to the target.</p>
|
158
|
-
</div></span>
|
159
|
-
|
160
|
-
</li>
|
161
|
-
|
162
|
-
|
163
|
-
</ul>
|
164
|
-
|
165
|
-
|
119
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="SingleAssociation.html" title="Dynamoid::Associations::SingleAssociation (module)">SingleAssociation</a></span></h3>
|
120
|
+
<p class="inherited"><span class='object_link'><a href="SingleAssociation.html#%3D%3D-instance_method" title="Dynamoid::Associations::SingleAssociation#== (method)">#==</a></span>, <span class='object_link'><a href="SingleAssociation.html#create-instance_method" title="Dynamoid::Associations::SingleAssociation#create (method)">#create</a></span>, <span class='object_link'><a href="SingleAssociation.html#create%21-instance_method" title="Dynamoid::Associations::SingleAssociation#create! (method)">#create!</a></span>, <span class='object_link'><a href="SingleAssociation.html#delete-instance_method" title="Dynamoid::Associations::SingleAssociation#delete (method)">#delete</a></span>, <span class='object_link'><a href="SingleAssociation.html#method_missing-instance_method" title="Dynamoid::Associations::SingleAssociation#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="SingleAssociation.html#nil%3F-instance_method" title="Dynamoid::Associations::SingleAssociation#nil? (method)">#nil?</a></span>, <span class='object_link'><a href="SingleAssociation.html#setter-instance_method" title="Dynamoid::Associations::SingleAssociation#setter (method)">#setter</a></span></p>
|
166
121
|
|
167
122
|
|
168
123
|
|
@@ -172,9 +127,8 @@
|
|
172
127
|
|
173
128
|
|
174
129
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
175
|
-
<p class="inherited"><span class='object_link'><a href="Association.html
|
176
|
-
|
177
|
-
<div id="constructor_details" class="method_details_list">
|
130
|
+
<p class="inherited"><span class='object_link'><a href="Association.html#find_target-instance_method" title="Dynamoid::Associations::Association#find_target (method)">#find_target</a></span>, <span class='object_link'><a href="Association.html#initialize-instance_method" title="Dynamoid::Associations::Association#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Association.html#loaded%3F-instance_method" title="Dynamoid::Associations::Association#loaded? (method)">#loaded?</a></span>, <span class='object_link'><a href="Association.html#reset-instance_method" title="Dynamoid::Associations::Association#reset (method)">#reset</a></span>, <span class='object_link'><a href="Association.html#target-instance_method" title="Dynamoid::Associations::Association#target (method)">#target</a></span></p>
|
131
|
+
<div id="constructor_details" class="method_details_list">
|
178
132
|
<h2>Constructor Details</h2>
|
179
133
|
|
180
134
|
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Association.html#initialize-instance_method" title="Dynamoid::Associations::Association#initialize (method)">Dynamoid::Associations::Association</a></span></p>
|
@@ -182,155 +136,20 @@
|
|
182
136
|
</div>
|
183
137
|
<div id="method_missing_details" class="method_details_list">
|
184
138
|
<h2>Dynamic Method Handling</h2>
|
185
|
-
<p class="notice
|
139
|
+
<p class="notice super">
|
186
140
|
This class handles dynamic methods through the <tt>method_missing</tt> method
|
187
141
|
|
188
|
-
|
189
|
-
|
190
|
-
<div class="method_details first">
|
191
|
-
<p class="signature first" id="method_missing-instance_method">
|
192
|
-
|
193
|
-
- (<tt>Object</tt>) <strong>method_missing</strong>(method, *args)
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
</p><div class="docstring">
|
198
|
-
<div class="discussion">
|
199
|
-
<p>Delegate methods we don't find directly to the target.</p>
|
200
|
-
|
201
|
-
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
<div class="tags">
|
205
|
-
|
206
|
-
<h3>Since:</h3>
|
207
|
-
<ul class="since">
|
208
|
-
|
209
|
-
<li>
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
<div class='inline'><p>0.2.0</p>
|
216
|
-
</div>
|
217
|
-
|
218
|
-
</li>
|
219
|
-
|
220
|
-
</ul>
|
221
|
-
|
222
|
-
</div><table class="source_code">
|
223
|
-
<tr>
|
224
|
-
<td>
|
225
|
-
<pre class="lines">
|
226
|
-
|
227
|
-
|
228
|
-
21
|
229
|
-
22
|
230
|
-
23
|
231
|
-
24
|
232
|
-
25
|
233
|
-
26
|
234
|
-
27</pre>
|
235
|
-
</td>
|
236
|
-
<td>
|
237
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/associations/has_one.rb', line 21</span>
|
238
|
-
|
239
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
240
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
241
|
-
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
242
|
-
<span class='kw'>else</span>
|
243
|
-
<span class='kw'>super</span>
|
244
|
-
<span class='kw'>end</span>
|
245
|
-
<span class='kw'>end</span></pre>
|
246
|
-
</td>
|
247
|
-
</tr>
|
248
|
-
</table>
|
249
|
-
</div>
|
250
|
-
|
251
|
-
</div>
|
252
|
-
|
253
|
-
|
254
|
-
<div id="instance_method_details" class="method_details_list">
|
255
|
-
<h2>Instance Method Details</h2>
|
256
|
-
|
142
|
+
in the class <span class='object_link'><a href="SingleAssociation.html#method_missing-instance_method" title="Dynamoid::Associations::SingleAssociation#method_missing (method)">Dynamoid::Associations::SingleAssociation</a></span>
|
257
143
|
|
258
|
-
|
259
|
-
<p class="signature first" id="==-instance_method">
|
260
|
-
|
261
|
-
- (<tt>Boolean</tt>) <strong>==</strong>(other)
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
</p><div class="docstring">
|
266
|
-
<div class="discussion">
|
267
|
-
<p>Is this object equal to the association's target?</p>
|
268
|
-
|
269
|
-
|
270
|
-
</div>
|
271
|
-
</div>
|
272
|
-
<div class="tags">
|
273
|
-
|
274
|
-
<h3>Returns:</h3>
|
275
|
-
<ul class="return">
|
144
|
+
</p>
|
276
145
|
|
277
|
-
<li>
|
278
|
-
|
279
|
-
|
280
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
—
|
285
|
-
<div class='inline'><p>true/false</p>
|
286
146
|
</div>
|
287
|
-
|
288
|
-
</li>
|
289
|
-
|
290
|
-
</ul>
|
291
|
-
<h3>Since:</h3>
|
292
|
-
<ul class="since">
|
293
|
-
|
294
|
-
<li>
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
<div class='inline'><p>0.2.0</p>
|
301
|
-
</div>
|
302
|
-
|
303
|
-
</li>
|
304
|
-
|
305
|
-
</ul>
|
306
147
|
|
307
|
-
</div><table class="source_code">
|
308
|
-
<tr>
|
309
|
-
<td>
|
310
|
-
<pre class="lines">
|
311
|
-
|
312
|
-
|
313
|
-
14
|
314
|
-
15
|
315
|
-
16</pre>
|
316
|
-
</td>
|
317
|
-
<td>
|
318
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/associations/has_one.rb', line 14</span>
|
319
|
-
|
320
|
-
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
321
|
-
<span class='id identifier rubyid_target'>target</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span>
|
322
|
-
<span class='kw'>end</span></pre>
|
323
|
-
</td>
|
324
|
-
</tr>
|
325
|
-
</table>
|
326
|
-
</div>
|
327
|
-
|
328
|
-
</div>
|
329
148
|
|
330
149
|
</div>
|
331
150
|
|
332
151
|
<div id="footer">
|
333
|
-
Generated on
|
152
|
+
Generated on Thu Apr 26 01:26:26 2012 by
|
334
153
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
335
154
|
0.7.5 (ruby-1.9.3).
|
336
155
|
</div>
|