adept_dynamoid 0.5.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Dynamoid.gemspec +193 -0
  4. data/Gemfile +23 -0
  5. data/Gemfile.lock +86 -0
  6. data/LICENSE.txt +20 -0
  7. data/README.markdown +265 -0
  8. data/Rakefile +62 -0
  9. data/VERSION +1 -0
  10. data/doc/.nojekyll +0 -0
  11. data/doc/Dynamoid.html +312 -0
  12. data/doc/Dynamoid/Adapter.html +1385 -0
  13. data/doc/Dynamoid/Adapter/AwsSdk.html +1585 -0
  14. data/doc/Dynamoid/Adapter/Local.html +1574 -0
  15. data/doc/Dynamoid/Associations.html +131 -0
  16. data/doc/Dynamoid/Associations/Association.html +794 -0
  17. data/doc/Dynamoid/Associations/BelongsTo.html +158 -0
  18. data/doc/Dynamoid/Associations/ClassMethods.html +723 -0
  19. data/doc/Dynamoid/Associations/HasAndBelongsToMany.html +164 -0
  20. data/doc/Dynamoid/Associations/HasMany.html +164 -0
  21. data/doc/Dynamoid/Associations/HasOne.html +158 -0
  22. data/doc/Dynamoid/Associations/ManyAssociation.html +1640 -0
  23. data/doc/Dynamoid/Associations/SingleAssociation.html +598 -0
  24. data/doc/Dynamoid/Components.html +204 -0
  25. data/doc/Dynamoid/Config.html +395 -0
  26. data/doc/Dynamoid/Config/Options.html +609 -0
  27. data/doc/Dynamoid/Criteria.html +131 -0
  28. data/doc/Dynamoid/Criteria/Chain.html +1063 -0
  29. data/doc/Dynamoid/Criteria/ClassMethods.html +98 -0
  30. data/doc/Dynamoid/Document.html +666 -0
  31. data/doc/Dynamoid/Document/ClassMethods.html +937 -0
  32. data/doc/Dynamoid/Errors.html +118 -0
  33. data/doc/Dynamoid/Errors/DocumentNotValid.html +210 -0
  34. data/doc/Dynamoid/Errors/Error.html +130 -0
  35. data/doc/Dynamoid/Errors/InvalidField.html +133 -0
  36. data/doc/Dynamoid/Errors/MissingRangeKey.html +133 -0
  37. data/doc/Dynamoid/Fields.html +669 -0
  38. data/doc/Dynamoid/Fields/ClassMethods.html +309 -0
  39. data/doc/Dynamoid/Finders.html +128 -0
  40. data/doc/Dynamoid/Finders/ClassMethods.html +516 -0
  41. data/doc/Dynamoid/Indexes.html +308 -0
  42. data/doc/Dynamoid/Indexes/ClassMethods.html +353 -0
  43. data/doc/Dynamoid/Indexes/Index.html +1104 -0
  44. data/doc/Dynamoid/Persistence.html +651 -0
  45. data/doc/Dynamoid/Persistence/ClassMethods.html +670 -0
  46. data/doc/Dynamoid/Validations.html +399 -0
  47. data/doc/_index.html +461 -0
  48. data/doc/class_list.html +47 -0
  49. data/doc/css/common.css +1 -0
  50. data/doc/css/full_list.css +55 -0
  51. data/doc/css/style.css +322 -0
  52. data/doc/file.LICENSE.html +66 -0
  53. data/doc/file.README.html +312 -0
  54. data/doc/file_list.html +52 -0
  55. data/doc/frames.html +13 -0
  56. data/doc/index.html +312 -0
  57. data/doc/js/app.js +205 -0
  58. data/doc/js/full_list.js +173 -0
  59. data/doc/js/jquery.js +16 -0
  60. data/doc/method_list.html +1238 -0
  61. data/doc/top-level-namespace.html +105 -0
  62. data/lib/dynamoid.rb +47 -0
  63. data/lib/dynamoid/adapter.rb +177 -0
  64. data/lib/dynamoid/adapter/aws_sdk.rb +223 -0
  65. data/lib/dynamoid/associations.rb +106 -0
  66. data/lib/dynamoid/associations/association.rb +105 -0
  67. data/lib/dynamoid/associations/belongs_to.rb +44 -0
  68. data/lib/dynamoid/associations/has_and_belongs_to_many.rb +40 -0
  69. data/lib/dynamoid/associations/has_many.rb +39 -0
  70. data/lib/dynamoid/associations/has_one.rb +39 -0
  71. data/lib/dynamoid/associations/many_association.rb +191 -0
  72. data/lib/dynamoid/associations/single_association.rb +69 -0
  73. data/lib/dynamoid/components.rb +36 -0
  74. data/lib/dynamoid/config.rb +57 -0
  75. data/lib/dynamoid/config/options.rb +78 -0
  76. data/lib/dynamoid/criteria.rb +29 -0
  77. data/lib/dynamoid/criteria/chain.rb +243 -0
  78. data/lib/dynamoid/dirty.rb +41 -0
  79. data/lib/dynamoid/document.rb +184 -0
  80. data/lib/dynamoid/errors.rb +28 -0
  81. data/lib/dynamoid/fields.rb +130 -0
  82. data/lib/dynamoid/finders.rb +131 -0
  83. data/lib/dynamoid/identity_map.rb +96 -0
  84. data/lib/dynamoid/indexes.rb +69 -0
  85. data/lib/dynamoid/indexes/index.rb +103 -0
  86. data/lib/dynamoid/middleware/identity_map.rb +16 -0
  87. data/lib/dynamoid/persistence.rb +247 -0
  88. data/lib/dynamoid/validations.rb +36 -0
  89. data/spec/app/models/address.rb +10 -0
  90. data/spec/app/models/camel_case.rb +24 -0
  91. data/spec/app/models/magazine.rb +11 -0
  92. data/spec/app/models/message.rb +9 -0
  93. data/spec/app/models/sponsor.rb +8 -0
  94. data/spec/app/models/subscription.rb +12 -0
  95. data/spec/app/models/tweet.rb +12 -0
  96. data/spec/app/models/user.rb +26 -0
  97. data/spec/dynamoid/adapter/aws_sdk_spec.rb +186 -0
  98. data/spec/dynamoid/adapter_spec.rb +117 -0
  99. data/spec/dynamoid/associations/association_spec.rb +194 -0
  100. data/spec/dynamoid/associations/belongs_to_spec.rb +71 -0
  101. data/spec/dynamoid/associations/has_and_belongs_to_many_spec.rb +47 -0
  102. data/spec/dynamoid/associations/has_many_spec.rb +42 -0
  103. data/spec/dynamoid/associations/has_one_spec.rb +45 -0
  104. data/spec/dynamoid/associations_spec.rb +16 -0
  105. data/spec/dynamoid/config_spec.rb +27 -0
  106. data/spec/dynamoid/criteria/chain_spec.rb +140 -0
  107. data/spec/dynamoid/criteria_spec.rb +72 -0
  108. data/spec/dynamoid/dirty_spec.rb +49 -0
  109. data/spec/dynamoid/document_spec.rb +118 -0
  110. data/spec/dynamoid/fields_spec.rb +127 -0
  111. data/spec/dynamoid/finders_spec.rb +135 -0
  112. data/spec/dynamoid/identity_map_spec.rb +45 -0
  113. data/spec/dynamoid/indexes/index_spec.rb +104 -0
  114. data/spec/dynamoid/indexes_spec.rb +25 -0
  115. data/spec/dynamoid/persistence_spec.rb +176 -0
  116. data/spec/dynamoid/validations_spec.rb +36 -0
  117. data/spec/dynamoid_spec.rb +9 -0
  118. data/spec/spec_helper.rb +50 -0
  119. metadata +376 -0
@@ -0,0 +1,598 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Dynamoid::Associations::SingleAssociation
8
+
9
+ &mdash; Documentation by YARD 0.7.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '../..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../../_index.html">Index (S)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Associations.html" title="Dynamoid::Associations (module)">Associations</a></span></span>
38
+ &raquo;
39
+ <span class="title">SingleAssociation</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: Dynamoid::Associations::SingleAssociation
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+ <dt class="r1">Includes:</dt>
72
+ <dd class="r1"><span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></dd>
73
+
74
+
75
+
76
+
77
+ <dt class="r2">Included in:</dt>
78
+ <dd class="r2"><span class='object_link'><a href="BelongsTo.html" title="Dynamoid::Associations::BelongsTo (class)">BelongsTo</a></span>, <span class='object_link'><a href="HasOne.html" title="Dynamoid::Associations::HasOne (class)">HasOne</a></span></dd>
79
+
80
+
81
+
82
+ <dt class="r1 last">Defined in:</dt>
83
+ <dd class="r1 last">lib/dynamoid/associations/single_association.rb</dd>
84
+
85
+ </dl>
86
+ <div class="clear"></div>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <h2>Instance Attribute Summary</h2>
95
+
96
+ <h3 class="inherited">Attributes included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
97
+ <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>
98
+
99
+
100
+
101
+ <h2>
102
+ Instance Method Summary
103
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
104
+ </h2>
105
+
106
+ <ul class="summary">
107
+
108
+ <li class="public ">
109
+ <span class="summary_signature">
110
+
111
+ <a href="#%3D%3D-instance_method" title="#== (instance method)">- (Boolean) <strong>==</strong>(other) </a>
112
+
113
+
114
+
115
+ </span>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <span class="summary_desc"><div class='inline'><p>Is this object equal to the association's target?.</p>
125
+ </div></span>
126
+
127
+ </li>
128
+
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#create-instance_method" title="#create (instance method)">- (Object) <strong>create</strong>(attributes = {}) </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'></div></span>
147
+
148
+ </li>
149
+
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#create%21-instance_method" title="#create! (instance method)">- (Object) <strong>create!</strong>(attributes = {}) </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'></div></span>
168
+
169
+ </li>
170
+
171
+
172
+ <li class="public ">
173
+ <span class="summary_signature">
174
+
175
+ <a href="#delete-instance_method" title="#delete (instance method)">- (Object) <strong>delete</strong> </a>
176
+
177
+
178
+
179
+ </span>
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <span class="summary_desc"><div class='inline'></div></span>
189
+
190
+ </li>
191
+
192
+
193
+ <li class="public ">
194
+ <span class="summary_signature">
195
+
196
+ <a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(method, *args) </a>
197
+
198
+
199
+
200
+ </span>
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+ <span class="summary_desc"><div class='inline'><p>Delegate methods we don't find directly to the target.</p>
210
+ </div></span>
211
+
212
+ </li>
213
+
214
+
215
+ <li class="public ">
216
+ <span class="summary_signature">
217
+
218
+ <a href="#nil%3F-instance_method" title="#nil? (instance method)">- (Boolean) <strong>nil?</strong> </a>
219
+
220
+
221
+
222
+ </span>
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+ <span class="summary_desc"><div class='inline'></div></span>
232
+
233
+ </li>
234
+
235
+
236
+ <li class="public ">
237
+ <span class="summary_signature">
238
+
239
+ <a href="#setter-instance_method" title="#setter (instance method)">- (Object) <strong>setter</strong>(object) </a>
240
+
241
+
242
+
243
+ </span>
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+ <span class="summary_desc"><div class='inline'></div></span>
253
+
254
+ </li>
255
+
256
+
257
+ </ul>
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
269
+ <p class="inherited"><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>
270
+ <div id="method_missing_details" class="method_details_list">
271
+ <h2>Dynamic Method Handling</h2>
272
+ <p class="notice this">
273
+ This class handles dynamic methods through the <tt>method_missing</tt> method
274
+
275
+ </p>
276
+
277
+ <div class="method_details first">
278
+ <p class="signature first" id="method_missing-instance_method">
279
+
280
+ - (<tt>Object</tt>) <strong>method_missing</strong>(method, *args)
281
+
282
+
283
+
284
+ </p><div class="docstring">
285
+ <div class="discussion">
286
+ <p>Delegate methods we don't find directly to the target.</p>
287
+
288
+
289
+ </div>
290
+ </div>
291
+ <div class="tags">
292
+
293
+ <h3>Since:</h3>
294
+ <ul class="since">
295
+
296
+ <li>
297
+
298
+
299
+
300
+
301
+
302
+ <div class='inline'><p>0.2.0</p>
303
+ </div>
304
+
305
+ </li>
306
+
307
+ </ul>
308
+
309
+ </div><table class="source_code">
310
+ <tr>
311
+ <td>
312
+ <pre class="lines">
313
+
314
+
315
+ 44
316
+ 45
317
+ 46
318
+ 47
319
+ 48
320
+ 49
321
+ 50</pre>
322
+ </td>
323
+ <td>
324
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/associations/single_association.rb', line 44</span>
325
+
326
+ <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>
327
+ <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>
328
+ <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>
329
+ <span class='kw'>else</span>
330
+ <span class='kw'>super</span>
331
+ <span class='kw'>end</span>
332
+ <span class='kw'>end</span></pre>
333
+ </td>
334
+ </tr>
335
+ </table>
336
+ </div>
337
+
338
+ </div>
339
+
340
+
341
+ <div id="instance_method_details" class="method_details_list">
342
+ <h2>Instance Method Details</h2>
343
+
344
+
345
+ <div class="method_details first">
346
+ <p class="signature first" id="==-instance_method">
347
+
348
+ - (<tt>Boolean</tt>) <strong>==</strong>(other)
349
+
350
+
351
+
352
+ </p><div class="docstring">
353
+ <div class="discussion">
354
+ <p>Is this object equal to the association's target?</p>
355
+
356
+
357
+ </div>
358
+ </div>
359
+ <div class="tags">
360
+
361
+ <h3>Returns:</h3>
362
+ <ul class="return">
363
+
364
+ <li>
365
+
366
+
367
+ <span class='type'>(<tt>Boolean</tt>)</span>
368
+
369
+
370
+
371
+ &mdash;
372
+ <div class='inline'><p>true/false</p>
373
+ </div>
374
+
375
+ </li>
376
+
377
+ </ul>
378
+ <h3>Since:</h3>
379
+ <ul class="since">
380
+
381
+ <li>
382
+
383
+
384
+
385
+
386
+
387
+ <div class='inline'><p>0.2.0</p>
388
+ </div>
389
+
390
+ </li>
391
+
392
+ </ul>
393
+
394
+ </div><table class="source_code">
395
+ <tr>
396
+ <td>
397
+ <pre class="lines">
398
+
399
+
400
+ 37
401
+ 38
402
+ 39</pre>
403
+ </td>
404
+ <td>
405
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/associations/single_association.rb', line 37</span>
406
+
407
+ <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>
408
+ <span class='id identifier rubyid_target'>target</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span>
409
+ <span class='kw'>end</span></pre>
410
+ </td>
411
+ </tr>
412
+ </table>
413
+ </div>
414
+
415
+ <div class="method_details ">
416
+ <p class="signature " id="create-instance_method">
417
+
418
+ - (<tt>Object</tt>) <strong>create</strong>(attributes = {})
419
+
420
+
421
+
422
+ </p><table class="source_code">
423
+ <tr>
424
+ <td>
425
+ <pre class="lines">
426
+
427
+
428
+ 27
429
+ 28
430
+ 29</pre>
431
+ </td>
432
+ <td>
433
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/associations/single_association.rb', line 27</span>
434
+
435
+ <span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
436
+ <span class='id identifier rubyid_setter'>setter</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_create!'>create!</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span><span class='rparen'>)</span>
437
+ <span class='kw'>end</span></pre>
438
+ </td>
439
+ </tr>
440
+ </table>
441
+ </div>
442
+
443
+ <div class="method_details ">
444
+ <p class="signature " id="create!-instance_method">
445
+
446
+ - (<tt>Object</tt>) <strong>create!</strong>(attributes = {})
447
+
448
+
449
+
450
+ </p><table class="source_code">
451
+ <tr>
452
+ <td>
453
+ <pre class="lines">
454
+
455
+
456
+ 23
457
+ 24
458
+ 25</pre>
459
+ </td>
460
+ <td>
461
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/associations/single_association.rb', line 23</span>
462
+
463
+ <span class='kw'>def</span> <span class='id identifier rubyid_create!'>create!</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
464
+ <span class='id identifier rubyid_setter'>setter</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_create!'>create!</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span><span class='rparen'>)</span>
465
+ <span class='kw'>end</span></pre>
466
+ </td>
467
+ </tr>
468
+ </table>
469
+ </div>
470
+
471
+ <div class="method_details ">
472
+ <p class="signature " id="delete-instance_method">
473
+
474
+ - (<tt>Object</tt>) <strong>delete</strong>
475
+
476
+
477
+
478
+ </p><table class="source_code">
479
+ <tr>
480
+ <td>
481
+ <pre class="lines">
482
+
483
+
484
+ 17
485
+ 18
486
+ 19
487
+ 20
488
+ 21</pre>
489
+ </td>
490
+ <td>
491
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/associations/single_association.rb', line 17</span>
492
+
493
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span>
494
+ <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_update_attribute'>update_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_source_attribute'>source_attribute</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
495
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:disassociate_target</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_target'>target</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_target_association'>target_association</span>
496
+ <span class='id identifier rubyid_target'>target</span>
497
+ <span class='kw'>end</span></pre>
498
+ </td>
499
+ </tr>
500
+ </table>
501
+ </div>
502
+
503
+ <div class="method_details ">
504
+ <p class="signature " id="nil?-instance_method">
505
+
506
+ - (<tt>Boolean</tt>) <strong>nil?</strong>
507
+
508
+
509
+
510
+ </p><div class="docstring">
511
+ <div class="discussion">
512
+
513
+
514
+ </div>
515
+ </div>
516
+ <div class="tags">
517
+
518
+ <h3>Returns:</h3>
519
+ <ul class="return">
520
+
521
+ <li>
522
+
523
+
524
+ <span class='type'>(<tt>Boolean</tt>)</span>
525
+
526
+
527
+
528
+ </li>
529
+
530
+ </ul>
531
+
532
+ </div><table class="source_code">
533
+ <tr>
534
+ <td>
535
+ <pre class="lines">
536
+
537
+
538
+ 52
539
+ 53
540
+ 54</pre>
541
+ </td>
542
+ <td>
543
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/associations/single_association.rb', line 52</span>
544
+
545
+ <span class='kw'>def</span> <span class='id identifier rubyid_nil?'>nil?</span>
546
+ <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
547
+ <span class='kw'>end</span></pre>
548
+ </td>
549
+ </tr>
550
+ </table>
551
+ </div>
552
+
553
+ <div class="method_details ">
554
+ <p class="signature " id="setter-instance_method">
555
+
556
+ - (<tt>Object</tt>) <strong>setter</strong>(object)
557
+
558
+
559
+
560
+ </p><table class="source_code">
561
+ <tr>
562
+ <td>
563
+ <pre class="lines">
564
+
565
+
566
+ 10
567
+ 11
568
+ 12
569
+ 13
570
+ 14
571
+ 15</pre>
572
+ </td>
573
+ <td>
574
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/associations/single_association.rb', line 10</span>
575
+
576
+ <span class='kw'>def</span> <span class='id identifier rubyid_setter'>setter</span><span class='lparen'>(</span><span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span>
577
+ <span class='id identifier rubyid_delete'>delete</span>
578
+ <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_update_attribute'>update_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_source_attribute'>source_attribute</span><span class='comma'>,</span> <span class='const'>Set</span><span class='lbracket'>[</span><span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span><span class='rparen'>)</span>
579
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:associate_target</span><span class='comma'>,</span> <span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_target_association'>target_association</span>
580
+ <span class='id identifier rubyid_object'>object</span>
581
+ <span class='kw'>end</span></pre>
582
+ </td>
583
+ </tr>
584
+ </table>
585
+ </div>
586
+
587
+ </div>
588
+
589
+ </div>
590
+
591
+ <div id="footer">
592
+ Generated on Thu Apr 26 01:26:26 2012 by
593
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
594
+ 0.7.5 (ruby-1.9.3).
595
+ </div>
596
+
597
+ </body>
598
+ </html>