dynamoid 0.7.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,161 +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
- Class: Dynamoid::Associations::BelongsTo
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 (B)</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">BelongsTo</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>Class: Dynamoid::Associations::BelongsTo
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">Object</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Dynamoid::Associations::BelongsTo</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
- <dt class="r2">Includes:</dt>
94
- <dd class="r2"><span class='object_link'><a href="SingleAssociation.html" title="Dynamoid::Associations::SingleAssociation (module)">SingleAssociation</a></span></dd>
95
-
96
-
97
-
98
-
99
-
100
- <dt class="r1 last">Defined in:</dt>
101
- <dd class="r1 last">lib/dynamoid/associations/belongs_to.rb</dd>
102
-
103
- </dl>
104
- <div class="clear"></div>
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- <h2>Instance Attribute Summary</h2>
113
-
114
- <h3 class="inherited">Attributes included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
115
- <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>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
- <h2>Method Summary</h2>
126
-
127
- <h3 class="inherited">Methods included from <span class='object_link'><a href="SingleAssociation.html" title="Dynamoid::Associations::SingleAssociation (module)">SingleAssociation</a></span></h3>
128
- <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>
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
- <h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
139
- <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>
140
- <div id="method_missing_details" class="method_details_list">
141
- <h2>Dynamic Method Handling</h2>
142
- <p class="notice super">
143
- This class handles dynamic methods through the <tt>method_missing</tt> method
144
-
145
- 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>
146
-
147
- </p>
148
-
149
- </div>
150
-
151
-
152
- </div>
153
-
154
- <div id="footer">
155
- Generated on Thu Jun 27 21:59:14 2013 by
156
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
157
- 0.8.6.1 (ruby-1.9.3).
158
- </div>
159
-
160
- </body>
161
- </html>
@@ -1,766 +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::ClassMethods
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 (C)</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">ClassMethods</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::ClassMethods
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
- <dt class="r1 last">Defined in:</dt>
82
- <dd class="r1 last">lib/dynamoid/associations.rb</dd>
83
-
84
- </dl>
85
- <div class="clear"></div>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <h2>
96
- Instance Method Summary
97
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
98
- </h2>
99
-
100
- <ul class="summary">
101
-
102
- <li class="public ">
103
- <span class="summary_signature">
104
-
105
- <a href="#belongs_to-instance_method" title="#belongs_to (instance method)">- (Object) <strong>belongs_to</strong>(name, options = {}) </a>
106
-
107
-
108
-
109
- </span>
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
- <span class="summary_desc"><div class='inline'><p>create a belongs_to association for this document.</p>
120
- </div></span>
121
-
122
- </li>
123
-
124
-
125
- <li class="public ">
126
- <span class="summary_signature">
127
-
128
- <a href="#has_and_belongs_to_many-instance_method" title="#has_and_belongs_to_many (instance method)">- (Object) <strong>has_and_belongs_to_many</strong>(name, options = {}) </a>
129
-
130
-
131
-
132
- </span>
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
- <span class="summary_desc"><div class='inline'><p>create a has_and_belongs_to_many association for this document.</p>
143
- </div></span>
144
-
145
- </li>
146
-
147
-
148
- <li class="public ">
149
- <span class="summary_signature">
150
-
151
- <a href="#has_many-instance_method" title="#has_many (instance method)">- (Object) <strong>has_many</strong>(name, options = {}) </a>
152
-
153
-
154
-
155
- </span>
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
- <span class="summary_desc"><div class='inline'><p>create a has_many association for this document.</p>
166
- </div></span>
167
-
168
- </li>
169
-
170
-
171
- <li class="public ">
172
- <span class="summary_signature">
173
-
174
- <a href="#has_one-instance_method" title="#has_one (instance method)">- (Object) <strong>has_one</strong>(name, options = {}) </a>
175
-
176
-
177
-
178
- </span>
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
- <span class="summary_desc"><div class='inline'><p>create a has_one association for this document.</p>
189
- </div></span>
190
-
191
- </li>
192
-
193
-
194
- </ul>
195
-
196
-
197
-
198
-
199
- <div id="instance_method_details" class="method_details_list">
200
- <h2>Instance Method Details</h2>
201
-
202
-
203
- <div class="method_details first">
204
- <h3 class="signature first" id="belongs_to-instance_method">
205
-
206
- - (<tt>Object</tt>) <strong>belongs_to</strong>(name, options = {})
207
-
208
-
209
-
210
-
211
-
212
- </h3><div class="docstring">
213
- <div class="discussion">
214
- <p>create a belongs_to association for this document.</p>
215
-
216
-
217
- </div>
218
- </div>
219
- <div class="tags">
220
- <p class="tag_title">Parameters:</p>
221
- <ul class="param">
222
-
223
- <li>
224
-
225
- <span class='name'>name</span>
226
-
227
-
228
- <span class='type'>(<tt>Symbol</tt>)</span>
229
-
230
-
231
-
232
- &mdash;
233
- <div class='inline'><p>the name of the association</p>
234
- </div>
235
-
236
- </li>
237
-
238
- <li>
239
-
240
- <span class='name'>options</span>
241
-
242
-
243
- <span class='type'>(<tt>Hash</tt>)</span>
244
-
245
-
246
- <em class="default">(defaults to: <tt>{}</tt>)</em>
247
-
248
-
249
- &mdash;
250
- <div class='inline'><p>options to pass to the association constructor</p>
251
- </div>
252
-
253
- </li>
254
-
255
- </ul>
256
-
257
-
258
-
259
-
260
-
261
-
262
- <p class="tag_title">Options Hash (<tt>options</tt>):</p>
263
- <ul class="option">
264
-
265
- <li>
266
- <span class="name">:class</span>
267
- <span class="type">(<tt>Class</tt>)</span>
268
- <span class="default">
269
-
270
- </span>
271
-
272
- &mdash; <div class='inline'><p>the target class of the has_one association; that is, the has_many or has_one class</p>
273
- </div>
274
-
275
- </li>
276
-
277
- <li>
278
- <span class="name">:class_name</span>
279
- <span class="type">(<tt>Symbol</tt>)</span>
280
- <span class="default">
281
-
282
- </span>
283
-
284
- &mdash; <div class='inline'><p>the name of the target class of the association; that is, the name of the has_many or has_one class</p>
285
- </div>
286
-
287
- </li>
288
-
289
- <li>
290
- <span class="name">:inverse_of</span>
291
- <span class="type">(<tt>Symbol</tt>)</span>
292
- <span class="default">
293
-
294
- </span>
295
-
296
- &mdash; <div class='inline'><p>the name of the association on the target class; that is, if the class has a has_many or has_one association, the name of that association</p>
297
- </div>
298
-
299
- </li>
300
-
301
- </ul>
302
-
303
-
304
- <p class="tag_title">Since:</p>
305
- <ul class="since">
306
-
307
- <li>
308
-
309
-
310
-
311
-
312
-
313
- <div class='inline'><p>0.2.0</p>
314
- </div>
315
-
316
- </li>
317
-
318
- </ul>
319
-
320
- </div><table class="source_code">
321
- <tr>
322
- <td>
323
- <pre class="lines">
324
-
325
-
326
- 64
327
- 65
328
- 66</pre>
329
- </td>
330
- <td>
331
- <pre class="code"><span class="info file"># File 'lib/dynamoid/associations.rb', line 64</span>
332
-
333
- <span class='kw'>def</span> <span class='id identifier rubyid_belongs_to'>belongs_to</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
334
- <span class='id identifier rubyid_association'>association</span><span class='lparen'>(</span><span class='symbol'>:belongs_to</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
335
- <span class='kw'>end</span></pre>
336
- </td>
337
- </tr>
338
- </table>
339
- </div>
340
-
341
- <div class="method_details ">
342
- <h3 class="signature " id="has_and_belongs_to_many-instance_method">
343
-
344
- - (<tt>Object</tt>) <strong>has_and_belongs_to_many</strong>(name, options = {})
345
-
346
-
347
-
348
-
349
-
350
- </h3><div class="docstring">
351
- <div class="discussion">
352
- <p>create a has_and_belongs_to_many association for this document.</p>
353
-
354
-
355
- </div>
356
- </div>
357
- <div class="tags">
358
- <p class="tag_title">Parameters:</p>
359
- <ul class="param">
360
-
361
- <li>
362
-
363
- <span class='name'>name</span>
364
-
365
-
366
- <span class='type'>(<tt>Symbol</tt>)</span>
367
-
368
-
369
-
370
- &mdash;
371
- <div class='inline'><p>the name of the association</p>
372
- </div>
373
-
374
- </li>
375
-
376
- <li>
377
-
378
- <span class='name'>options</span>
379
-
380
-
381
- <span class='type'>(<tt>Hash</tt>)</span>
382
-
383
-
384
- <em class="default">(defaults to: <tt>{}</tt>)</em>
385
-
386
-
387
- &mdash;
388
- <div class='inline'><p>options to pass to the association constructor</p>
389
- </div>
390
-
391
- </li>
392
-
393
- </ul>
394
-
395
-
396
-
397
-
398
-
399
-
400
- <p class="tag_title">Options Hash (<tt>options</tt>):</p>
401
- <ul class="option">
402
-
403
- <li>
404
- <span class="name">:class</span>
405
- <span class="type">(<tt>Class</tt>)</span>
406
- <span class="default">
407
-
408
- </span>
409
-
410
- &mdash; <div class='inline'><p>the target class of the has_and_belongs_to_many association; that is, the belongs_to class</p>
411
- </div>
412
-
413
- </li>
414
-
415
- <li>
416
- <span class="name">:class_name</span>
417
- <span class="type">(<tt>Symbol</tt>)</span>
418
- <span class="default">
419
-
420
- </span>
421
-
422
- &mdash; <div class='inline'><p>the name of the target class of the association; that is, the name of the belongs_to class</p>
423
- </div>
424
-
425
- </li>
426
-
427
- <li>
428
- <span class="name">:inverse_of</span>
429
- <span class="type">(<tt>Symbol</tt>)</span>
430
- <span class="default">
431
-
432
- </span>
433
-
434
- &mdash; <div class='inline'><p>the name of the association on the target class; that is, if the class has a belongs_to association, the name of that association</p>
435
- </div>
436
-
437
- </li>
438
-
439
- </ul>
440
-
441
-
442
- <p class="tag_title">Since:</p>
443
- <ul class="since">
444
-
445
- <li>
446
-
447
-
448
-
449
-
450
-
451
- <div class='inline'><p>0.2.0</p>
452
- </div>
453
-
454
- </li>
455
-
456
- </ul>
457
-
458
- </div><table class="source_code">
459
- <tr>
460
- <td>
461
- <pre class="lines">
462
-
463
-
464
- 77
465
- 78
466
- 79</pre>
467
- </td>
468
- <td>
469
- <pre class="code"><span class="info file"># File 'lib/dynamoid/associations.rb', line 77</span>
470
-
471
- <span class='kw'>def</span> <span class='id identifier rubyid_has_and_belongs_to_many'>has_and_belongs_to_many</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
472
- <span class='id identifier rubyid_association'>association</span><span class='lparen'>(</span><span class='symbol'>:has_and_belongs_to_many</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
473
- <span class='kw'>end</span></pre>
474
- </td>
475
- </tr>
476
- </table>
477
- </div>
478
-
479
- <div class="method_details ">
480
- <h3 class="signature " id="has_many-instance_method">
481
-
482
- - (<tt>Object</tt>) <strong>has_many</strong>(name, options = {})
483
-
484
-
485
-
486
-
487
-
488
- </h3><div class="docstring">
489
- <div class="discussion">
490
- <p>create a has_many association for this document.</p>
491
-
492
-
493
- </div>
494
- </div>
495
- <div class="tags">
496
- <p class="tag_title">Parameters:</p>
497
- <ul class="param">
498
-
499
- <li>
500
-
501
- <span class='name'>name</span>
502
-
503
-
504
- <span class='type'>(<tt>Symbol</tt>)</span>
505
-
506
-
507
-
508
- &mdash;
509
- <div class='inline'><p>the name of the association</p>
510
- </div>
511
-
512
- </li>
513
-
514
- <li>
515
-
516
- <span class='name'>options</span>
517
-
518
-
519
- <span class='type'>(<tt>Hash</tt>)</span>
520
-
521
-
522
- <em class="default">(defaults to: <tt>{}</tt>)</em>
523
-
524
-
525
- &mdash;
526
- <div class='inline'><p>options to pass to the association constructor</p>
527
- </div>
528
-
529
- </li>
530
-
531
- </ul>
532
-
533
-
534
-
535
-
536
-
537
-
538
- <p class="tag_title">Options Hash (<tt>options</tt>):</p>
539
- <ul class="option">
540
-
541
- <li>
542
- <span class="name">:class</span>
543
- <span class="type">(<tt>Class</tt>)</span>
544
- <span class="default">
545
-
546
- </span>
547
-
548
- &mdash; <div class='inline'><p>the target class of the has_many association; that is, the belongs_to class</p>
549
- </div>
550
-
551
- </li>
552
-
553
- <li>
554
- <span class="name">:class_name</span>
555
- <span class="type">(<tt>Symbol</tt>)</span>
556
- <span class="default">
557
-
558
- </span>
559
-
560
- &mdash; <div class='inline'><p>the name of the target class of the association; that is, the name of the belongs_to class</p>
561
- </div>
562
-
563
- </li>
564
-
565
- <li>
566
- <span class="name">:inverse_of</span>
567
- <span class="type">(<tt>Symbol</tt>)</span>
568
- <span class="default">
569
-
570
- </span>
571
-
572
- &mdash; <div class='inline'><p>the name of the association on the target class; that is, if the class has a belongs_to association, the name of that association</p>
573
- </div>
574
-
575
- </li>
576
-
577
- </ul>
578
-
579
-
580
- <p class="tag_title">Since:</p>
581
- <ul class="since">
582
-
583
- <li>
584
-
585
-
586
-
587
-
588
-
589
- <div class='inline'><p>0.2.0</p>
590
- </div>
591
-
592
- </li>
593
-
594
- </ul>
595
-
596
- </div><table class="source_code">
597
- <tr>
598
- <td>
599
- <pre class="lines">
600
-
601
-
602
- 38
603
- 39
604
- 40</pre>
605
- </td>
606
- <td>
607
- <pre class="code"><span class="info file"># File 'lib/dynamoid/associations.rb', line 38</span>
608
-
609
- <span class='kw'>def</span> <span class='id identifier rubyid_has_many'>has_many</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
610
- <span class='id identifier rubyid_association'>association</span><span class='lparen'>(</span><span class='symbol'>:has_many</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
611
- <span class='kw'>end</span></pre>
612
- </td>
613
- </tr>
614
- </table>
615
- </div>
616
-
617
- <div class="method_details ">
618
- <h3 class="signature " id="has_one-instance_method">
619
-
620
- - (<tt>Object</tt>) <strong>has_one</strong>(name, options = {})
621
-
622
-
623
-
624
-
625
-
626
- </h3><div class="docstring">
627
- <div class="discussion">
628
- <p>create a has_one association for this document.</p>
629
-
630
-
631
- </div>
632
- </div>
633
- <div class="tags">
634
- <p class="tag_title">Parameters:</p>
635
- <ul class="param">
636
-
637
- <li>
638
-
639
- <span class='name'>name</span>
640
-
641
-
642
- <span class='type'>(<tt>Symbol</tt>)</span>
643
-
644
-
645
-
646
- &mdash;
647
- <div class='inline'><p>the name of the association</p>
648
- </div>
649
-
650
- </li>
651
-
652
- <li>
653
-
654
- <span class='name'>options</span>
655
-
656
-
657
- <span class='type'>(<tt>Hash</tt>)</span>
658
-
659
-
660
- <em class="default">(defaults to: <tt>{}</tt>)</em>
661
-
662
-
663
- &mdash;
664
- <div class='inline'><p>options to pass to the association constructor</p>
665
- </div>
666
-
667
- </li>
668
-
669
- </ul>
670
-
671
-
672
-
673
-
674
-
675
-
676
- <p class="tag_title">Options Hash (<tt>options</tt>):</p>
677
- <ul class="option">
678
-
679
- <li>
680
- <span class="name">:class</span>
681
- <span class="type">(<tt>Class</tt>)</span>
682
- <span class="default">
683
-
684
- </span>
685
-
686
- &mdash; <div class='inline'><p>the target class of the has_one association; that is, the belongs_to class</p>
687
- </div>
688
-
689
- </li>
690
-
691
- <li>
692
- <span class="name">:class_name</span>
693
- <span class="type">(<tt>Symbol</tt>)</span>
694
- <span class="default">
695
-
696
- </span>
697
-
698
- &mdash; <div class='inline'><p>the name of the target class of the association; that is, the name of the belongs_to class</p>
699
- </div>
700
-
701
- </li>
702
-
703
- <li>
704
- <span class="name">:inverse_of</span>
705
- <span class="type">(<tt>Symbol</tt>)</span>
706
- <span class="default">
707
-
708
- </span>
709
-
710
- &mdash; <div class='inline'><p>the name of the association on the target class; that is, if the class has a belongs_to association, the name of that association</p>
711
- </div>
712
-
713
- </li>
714
-
715
- </ul>
716
-
717
-
718
- <p class="tag_title">Since:</p>
719
- <ul class="since">
720
-
721
- <li>
722
-
723
-
724
-
725
-
726
-
727
- <div class='inline'><p>0.2.0</p>
728
- </div>
729
-
730
- </li>
731
-
732
- </ul>
733
-
734
- </div><table class="source_code">
735
- <tr>
736
- <td>
737
- <pre class="lines">
738
-
739
-
740
- 51
741
- 52
742
- 53</pre>
743
- </td>
744
- <td>
745
- <pre class="code"><span class="info file"># File 'lib/dynamoid/associations.rb', line 51</span>
746
-
747
- <span class='kw'>def</span> <span class='id identifier rubyid_has_one'>has_one</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
748
- <span class='id identifier rubyid_association'>association</span><span class='lparen'>(</span><span class='symbol'>:has_one</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
749
- <span class='kw'>end</span></pre>
750
- </td>
751
- </tr>
752
- </table>
753
- </div>
754
-
755
- </div>
756
-
757
- </div>
758
-
759
- <div id="footer">
760
- Generated on Thu Jun 27 21:59:13 2013 by
761
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
762
- 0.8.6.1 (ruby-1.9.3).
763
- </div>
764
-
765
- </body>
766
- </html>