dynamoid 0.7.1 → 1.0.0

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