dynamoid 0.7.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -24
- data/README.markdown +89 -73
- data/Rakefile +10 -36
- data/dynamoid.gemspec +56 -191
- data/lib/dynamoid.rb +6 -4
- data/lib/dynamoid/adapter.rb +64 -150
- data/lib/dynamoid/adapter_plugin/aws_sdk_v2.rb +579 -0
- data/lib/dynamoid/components.rb +0 -1
- data/lib/dynamoid/config.rb +2 -5
- data/lib/dynamoid/criteria.rb +1 -1
- data/lib/dynamoid/criteria/chain.rb +27 -140
- data/lib/dynamoid/document.rb +2 -2
- data/lib/dynamoid/errors.rb +30 -9
- data/lib/dynamoid/fields.rb +15 -3
- data/lib/dynamoid/finders.rb +7 -6
- data/lib/dynamoid/identity_map.rb +1 -5
- data/lib/dynamoid/persistence.rb +108 -93
- metadata +56 -229
- data/.document +0 -5
- data/.rspec +0 -1
- data/.travis.yml +0 -7
- data/Gemfile.lock +0 -81
- data/Gemfile_activemodel4 +0 -24
- data/Gemfile_activemodel4.lock +0 -88
- data/VERSION +0 -1
- data/doc/.nojekyll +0 -0
- data/doc/Dynamoid.html +0 -328
- data/doc/Dynamoid/Adapter.html +0 -1872
- data/doc/Dynamoid/Adapter/AwsSdk.html +0 -2101
- data/doc/Dynamoid/Adapter/Local.html +0 -1574
- data/doc/Dynamoid/Associations.html +0 -138
- data/doc/Dynamoid/Associations/Association.html +0 -847
- data/doc/Dynamoid/Associations/BelongsTo.html +0 -161
- data/doc/Dynamoid/Associations/ClassMethods.html +0 -766
- data/doc/Dynamoid/Associations/HasAndBelongsToMany.html +0 -167
- data/doc/Dynamoid/Associations/HasMany.html +0 -167
- data/doc/Dynamoid/Associations/HasOne.html +0 -161
- data/doc/Dynamoid/Associations/ManyAssociation.html +0 -1684
- data/doc/Dynamoid/Associations/SingleAssociation.html +0 -627
- data/doc/Dynamoid/Components.html +0 -242
- data/doc/Dynamoid/Config.html +0 -412
- data/doc/Dynamoid/Config/Options.html +0 -638
- data/doc/Dynamoid/Criteria.html +0 -138
- data/doc/Dynamoid/Criteria/Chain.html +0 -1471
- data/doc/Dynamoid/Criteria/ClassMethods.html +0 -105
- data/doc/Dynamoid/Dirty.html +0 -424
- data/doc/Dynamoid/Dirty/ClassMethods.html +0 -174
- data/doc/Dynamoid/Document.html +0 -1033
- data/doc/Dynamoid/Document/ClassMethods.html +0 -1116
- data/doc/Dynamoid/Errors.html +0 -125
- data/doc/Dynamoid/Errors/ConditionalCheckFailedException.html +0 -141
- data/doc/Dynamoid/Errors/DocumentNotValid.html +0 -221
- data/doc/Dynamoid/Errors/Error.html +0 -137
- data/doc/Dynamoid/Errors/InvalidField.html +0 -141
- data/doc/Dynamoid/Errors/InvalidQuery.html +0 -131
- data/doc/Dynamoid/Errors/MissingRangeKey.html +0 -141
- data/doc/Dynamoid/Fields.html +0 -686
- data/doc/Dynamoid/Fields/ClassMethods.html +0 -438
- data/doc/Dynamoid/Finders.html +0 -135
- data/doc/Dynamoid/Finders/ClassMethods.html +0 -943
- data/doc/Dynamoid/IdentityMap.html +0 -492
- data/doc/Dynamoid/IdentityMap/ClassMethods.html +0 -534
- data/doc/Dynamoid/Indexes.html +0 -321
- data/doc/Dynamoid/Indexes/ClassMethods.html +0 -369
- data/doc/Dynamoid/Indexes/Index.html +0 -1142
- data/doc/Dynamoid/Middleware.html +0 -115
- data/doc/Dynamoid/Middleware/IdentityMap.html +0 -264
- data/doc/Dynamoid/Persistence.html +0 -892
- data/doc/Dynamoid/Persistence/ClassMethods.html +0 -836
- data/doc/Dynamoid/Validations.html +0 -415
- data/doc/_index.html +0 -506
- data/doc/class_list.html +0 -53
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -338
- data/doc/file.LICENSE.html +0 -73
- data/doc/file.README.html +0 -416
- data/doc/file_list.html +0 -58
- data/doc/frames.html +0 -28
- data/doc/index.html +0 -416
- data/doc/js/app.js +0 -214
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -1144
- data/doc/top-level-namespace.html +0 -112
- data/lib/dynamoid/adapter/aws_sdk.rb +0 -287
- data/lib/dynamoid/indexes.rb +0 -69
- data/lib/dynamoid/indexes/index.rb +0 -103
- data/spec/app/models/address.rb +0 -13
- data/spec/app/models/camel_case.rb +0 -34
- data/spec/app/models/car.rb +0 -6
- data/spec/app/models/magazine.rb +0 -11
- data/spec/app/models/message.rb +0 -9
- data/spec/app/models/nuclear_submarine.rb +0 -5
- data/spec/app/models/sponsor.rb +0 -8
- data/spec/app/models/subscription.rb +0 -12
- data/spec/app/models/tweet.rb +0 -12
- data/spec/app/models/user.rb +0 -26
- data/spec/app/models/vehicle.rb +0 -7
- data/spec/dynamoid/adapter/aws_sdk_spec.rb +0 -376
- data/spec/dynamoid/adapter_spec.rb +0 -155
- data/spec/dynamoid/associations/association_spec.rb +0 -194
- data/spec/dynamoid/associations/belongs_to_spec.rb +0 -71
- data/spec/dynamoid/associations/has_and_belongs_to_many_spec.rb +0 -47
- data/spec/dynamoid/associations/has_many_spec.rb +0 -42
- data/spec/dynamoid/associations/has_one_spec.rb +0 -45
- data/spec/dynamoid/associations_spec.rb +0 -16
- data/spec/dynamoid/config_spec.rb +0 -27
- data/spec/dynamoid/criteria/chain_spec.rb +0 -210
- data/spec/dynamoid/criteria_spec.rb +0 -75
- data/spec/dynamoid/dirty_spec.rb +0 -57
- data/spec/dynamoid/document_spec.rb +0 -180
- data/spec/dynamoid/fields_spec.rb +0 -156
- data/spec/dynamoid/finders_spec.rb +0 -147
- data/spec/dynamoid/identity_map_spec.rb +0 -45
- data/spec/dynamoid/indexes/index_spec.rb +0 -104
- data/spec/dynamoid/indexes_spec.rb +0 -25
- data/spec/dynamoid/persistence_spec.rb +0 -301
- data/spec/dynamoid/validations_spec.rb +0 -36
- data/spec/dynamoid_spec.rb +0 -9
- data/spec/spec_helper.rb +0 -55
- data/spec/support/with_partitioning.rb +0 -15
@@ -1,438 +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::Fields::ClassMethods
|
8
|
-
|
9
|
-
— 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> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span> » <span class='title'><span class='object_link'><a href="../Fields.html" title="Dynamoid::Fields (module)">Fields</a></span></span>
|
36
|
-
»
|
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::Fields::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/fields.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="#field-instance_method" title="#field (instance method)">- (Object) <strong>field</strong>(name, type = :string, 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>Specify a field for a document.</p>
|
120
|
-
</div></span>
|
121
|
-
|
122
|
-
</li>
|
123
|
-
|
124
|
-
|
125
|
-
<li class="public ">
|
126
|
-
<span class="summary_signature">
|
127
|
-
|
128
|
-
<a href="#range-instance_method" title="#range (instance method)">- (Object) <strong>range</strong>(name, type = :string) </a>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
</span>
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
143
|
-
|
144
|
-
</li>
|
145
|
-
|
146
|
-
|
147
|
-
<li class="public ">
|
148
|
-
<span class="summary_signature">
|
149
|
-
|
150
|
-
<a href="#remove_field-instance_method" title="#remove_field (instance method)">- (Object) <strong>remove_field</strong>(field) </a>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
</span>
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
165
|
-
|
166
|
-
</li>
|
167
|
-
|
168
|
-
|
169
|
-
<li class="public ">
|
170
|
-
<span class="summary_signature">
|
171
|
-
|
172
|
-
<a href="#table-instance_method" title="#table (instance method)">- (Object) <strong>table</strong>(options) </a>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
</span>
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
187
|
-
|
188
|
-
</li>
|
189
|
-
|
190
|
-
|
191
|
-
</ul>
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
<div id="instance_method_details" class="method_details_list">
|
197
|
-
<h2>Instance Method Details</h2>
|
198
|
-
|
199
|
-
|
200
|
-
<div class="method_details first">
|
201
|
-
<h3 class="signature first" id="field-instance_method">
|
202
|
-
|
203
|
-
- (<tt>Object</tt>) <strong>field</strong>(name, type = :string, options = {})
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
</h3><div class="docstring">
|
210
|
-
<div class="discussion">
|
211
|
-
<p>Specify a field for a document. Its type determines how it is coerced when read in and out of the datastore:
|
212
|
-
default is string, but you can also specify :integer, :float, :set, :array, :datetime, and :serialized.</p>
|
213
|
-
|
214
|
-
|
215
|
-
</div>
|
216
|
-
</div>
|
217
|
-
<div class="tags">
|
218
|
-
<p class="tag_title">Parameters:</p>
|
219
|
-
<ul class="param">
|
220
|
-
|
221
|
-
<li>
|
222
|
-
|
223
|
-
<span class='name'>name</span>
|
224
|
-
|
225
|
-
|
226
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
—
|
231
|
-
<div class='inline'><p>the name of the field</p>
|
232
|
-
</div>
|
233
|
-
|
234
|
-
</li>
|
235
|
-
|
236
|
-
<li>
|
237
|
-
|
238
|
-
<span class='name'>type</span>
|
239
|
-
|
240
|
-
|
241
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
242
|
-
|
243
|
-
|
244
|
-
<em class="default">(defaults to: <tt>:string</tt>)</em>
|
245
|
-
|
246
|
-
|
247
|
-
—
|
248
|
-
<div class='inline'><p>the type of the field (one of :integer, :float, :set, :array, :datetime, or :serialized)</p>
|
249
|
-
</div>
|
250
|
-
|
251
|
-
</li>
|
252
|
-
|
253
|
-
<li>
|
254
|
-
|
255
|
-
<span class='name'>options</span>
|
256
|
-
|
257
|
-
|
258
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
259
|
-
|
260
|
-
|
261
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
262
|
-
|
263
|
-
|
264
|
-
—
|
265
|
-
<div class='inline'><p>any additional options for the field</p>
|
266
|
-
</div>
|
267
|
-
|
268
|
-
</li>
|
269
|
-
|
270
|
-
</ul>
|
271
|
-
|
272
|
-
<p class="tag_title">Since:</p>
|
273
|
-
<ul class="since">
|
274
|
-
|
275
|
-
<li>
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
<div class='inline'><p>0.2.0</p>
|
282
|
-
</div>
|
283
|
-
|
284
|
-
</li>
|
285
|
-
|
286
|
-
</ul>
|
287
|
-
|
288
|
-
</div><table class="source_code">
|
289
|
-
<tr>
|
290
|
-
<td>
|
291
|
-
<pre class="lines">
|
292
|
-
|
293
|
-
|
294
|
-
31
|
295
|
-
32
|
296
|
-
33
|
297
|
-
34
|
298
|
-
35
|
299
|
-
36
|
300
|
-
37
|
301
|
-
38</pre>
|
302
|
-
</td>
|
303
|
-
<td>
|
304
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 31</span>
|
305
|
-
|
306
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_field'>field</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='symbol'>:string</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>
|
307
|
-
<span class='id identifier rubyid_named'>named</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
308
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=></span> <span class='lbrace'>{</span><span class='symbol'>:type</span> <span class='op'>=></span> <span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
309
|
-
|
310
|
-
<span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='id identifier rubyid_named'>named</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_read_attribute'>read_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_named'>named</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
311
|
-
<span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_named'>named</span><span class='rbrace'>}</span><span class='tstring_content'>?</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>!</span><span class='id identifier rubyid_read_attribute'>read_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_named'>named</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='rbrace'>}</span>
|
312
|
-
<span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_named'>named</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_write_attribute'>write_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_named'>named</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
313
|
-
<span class='kw'>end</span></pre>
|
314
|
-
</td>
|
315
|
-
</tr>
|
316
|
-
</table>
|
317
|
-
</div>
|
318
|
-
|
319
|
-
<div class="method_details ">
|
320
|
-
<h3 class="signature " id="range-instance_method">
|
321
|
-
|
322
|
-
- (<tt>Object</tt>) <strong>range</strong>(name, type = :string)
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
</h3><table class="source_code">
|
329
|
-
<tr>
|
330
|
-
<td>
|
331
|
-
<pre class="lines">
|
332
|
-
|
333
|
-
|
334
|
-
40
|
335
|
-
41
|
336
|
-
42
|
337
|
-
43</pre>
|
338
|
-
</td>
|
339
|
-
<td>
|
340
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 40</span>
|
341
|
-
|
342
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_range'>range</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='symbol'>:string</span><span class='rparen'>)</span>
|
343
|
-
<span class='id identifier rubyid_field'>field</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
344
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_range_key'>range_key</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
345
|
-
<span class='kw'>end</span></pre>
|
346
|
-
</td>
|
347
|
-
</tr>
|
348
|
-
</table>
|
349
|
-
</div>
|
350
|
-
|
351
|
-
<div class="method_details ">
|
352
|
-
<h3 class="signature " id="remove_field-instance_method">
|
353
|
-
|
354
|
-
- (<tt>Object</tt>) <strong>remove_field</strong>(field)
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
</h3><table class="source_code">
|
361
|
-
<tr>
|
362
|
-
<td>
|
363
|
-
<pre class="lines">
|
364
|
-
|
365
|
-
|
366
|
-
53
|
367
|
-
54
|
368
|
-
55
|
369
|
-
56
|
370
|
-
57
|
371
|
-
58
|
372
|
-
59</pre>
|
373
|
-
</td>
|
374
|
-
<td>
|
375
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 53</span>
|
376
|
-
|
377
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_remove_field'>remove_field</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
|
378
|
-
<span class='id identifier rubyid_field'>field</span> <span class='op'>=</span> <span class='id identifier rubyid_field'>field</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
379
|
-
<span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>No such field</span><span class='tstring_end'>"</span></span>
|
380
|
-
<span class='id identifier rubyid_remove_method'>remove_method</span> <span class='id identifier rubyid_field'>field</span>
|
381
|
-
<span class='id identifier rubyid_remove_method'>remove_method</span> <span class='symbol'>:#{</span><span class='id identifier rubyid_field'>field</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span>
|
382
|
-
<span class='id identifier rubyid_remove_method'>remove_method</span> <span class='symbol'>:#{</span><span class='id identifier rubyid_field'>field</span><span class='rbrace'>}</span><span class='tstring_content'>?</span><span class='tstring_end'>"</span></span>
|
383
|
-
<span class='kw'>end</span></pre>
|
384
|
-
</td>
|
385
|
-
</tr>
|
386
|
-
</table>
|
387
|
-
</div>
|
388
|
-
|
389
|
-
<div class="method_details ">
|
390
|
-
<h3 class="signature " id="table-instance_method">
|
391
|
-
|
392
|
-
- (<tt>Object</tt>) <strong>table</strong>(options)
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
</h3><table class="source_code">
|
399
|
-
<tr>
|
400
|
-
<td>
|
401
|
-
<pre class="lines">
|
402
|
-
|
403
|
-
|
404
|
-
45
|
405
|
-
46
|
406
|
-
47
|
407
|
-
48
|
408
|
-
49
|
409
|
-
50
|
410
|
-
51</pre>
|
411
|
-
</td>
|
412
|
-
<td>
|
413
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 45</span>
|
414
|
-
|
415
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_table'>table</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
416
|
-
<span class='comment'>#a default 'id' column is created when Dynamoid::Document is included
|
417
|
-
</span> <span class='kw'>unless</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='id identifier rubyid_hash_key'>hash_key</span><span class='rparen'>)</span>
|
418
|
-
<span class='id identifier rubyid_remove_field'>remove_field</span> <span class='symbol'>:id</span>
|
419
|
-
<span class='id identifier rubyid_field'>field</span><span class='lparen'>(</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='rparen'>)</span>
|
420
|
-
<span class='kw'>end</span>
|
421
|
-
<span class='kw'>end</span></pre>
|
422
|
-
</td>
|
423
|
-
</tr>
|
424
|
-
</table>
|
425
|
-
</div>
|
426
|
-
|
427
|
-
</div>
|
428
|
-
|
429
|
-
</div>
|
430
|
-
|
431
|
-
<div id="footer">
|
432
|
-
Generated on Thu Jun 27 21:59:09 2013 by
|
433
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
434
|
-
0.8.6.1 (ruby-1.9.3).
|
435
|
-
</div>
|
436
|
-
|
437
|
-
</body>
|
438
|
-
</html>
|
data/doc/Dynamoid/Finders.html
DELETED
@@ -1,135 +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::Finders
|
8
|
-
|
9
|
-
— 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 (F)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">Finders</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::Finders
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<dt class="r1">Extended by:</dt>
|
77
|
-
<dd class="r1">ActiveSupport::Concern</dd>
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
<dt class="r2">Included in:</dt>
|
85
|
-
<dd class="r2"><span class='object_link'><a href="Components.html" title="Dynamoid::Components (module)">Components</a></span></dd>
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
<dt class="r1 last">Defined in:</dt>
|
90
|
-
<dd class="r1 last">lib/dynamoid/finders.rb</dd>
|
91
|
-
|
92
|
-
</dl>
|
93
|
-
<div class="clear"></div>
|
94
|
-
|
95
|
-
<h2>Overview</h2><div class="docstring">
|
96
|
-
<div class="discussion">
|
97
|
-
<p>This module defines the finder methods that hang off the document at the
|
98
|
-
class level, like find, find_by_id, and the method_missing style finders.</p>
|
99
|
-
|
100
|
-
|
101
|
-
</div>
|
102
|
-
</div>
|
103
|
-
<div class="tags">
|
104
|
-
|
105
|
-
|
106
|
-
</div><h2>Defined Under Namespace</h2>
|
107
|
-
<p class="children">
|
108
|
-
|
109
|
-
|
110
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Finders/ClassMethods.html" title="Dynamoid::Finders::ClassMethods (module)">ClassMethods</a></span>
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
</p>
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
</div>
|
127
|
-
|
128
|
-
<div id="footer">
|
129
|
-
Generated on Thu Jun 27 21:59:10 2013 by
|
130
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
131
|
-
0.8.6.1 (ruby-1.9.3).
|
132
|
-
</div>
|
133
|
-
|
134
|
-
</body>
|
135
|
-
</html>
|