dynamoid 0.6.1 → 0.7.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 (92) hide show
  1. data/.travis.yml +4 -0
  2. data/Gemfile +3 -2
  3. data/Gemfile.lock +40 -45
  4. data/README.markdown +55 -25
  5. data/Rakefile +31 -0
  6. data/VERSION +1 -1
  7. data/doc/Dynamoid.html +58 -42
  8. data/doc/Dynamoid/Adapter.html +666 -179
  9. data/doc/Dynamoid/Adapter/AwsSdk.html +752 -236
  10. data/doc/Dynamoid/Associations.html +28 -21
  11. data/doc/Dynamoid/Associations/Association.html +102 -49
  12. data/doc/Dynamoid/Associations/BelongsTo.html +28 -25
  13. data/doc/Dynamoid/Associations/ClassMethods.html +95 -52
  14. data/doc/Dynamoid/Associations/HasAndBelongsToMany.html +28 -25
  15. data/doc/Dynamoid/Associations/HasMany.html +28 -25
  16. data/doc/Dynamoid/Associations/HasOne.html +28 -25
  17. data/doc/Dynamoid/Associations/ManyAssociation.html +138 -94
  18. data/doc/Dynamoid/Associations/SingleAssociation.html +67 -38
  19. data/doc/Dynamoid/Components.html +60 -22
  20. data/doc/Dynamoid/Config.html +61 -44
  21. data/doc/Dynamoid/Config/Options.html +90 -61
  22. data/doc/Dynamoid/Criteria.html +28 -21
  23. data/doc/Dynamoid/Criteria/Chain.html +508 -100
  24. data/doc/Dynamoid/Criteria/ClassMethods.html +26 -19
  25. data/doc/Dynamoid/Dirty.html +424 -0
  26. data/doc/Dynamoid/Dirty/ClassMethods.html +174 -0
  27. data/doc/Dynamoid/Document.html +451 -84
  28. data/doc/Dynamoid/Document/ClassMethods.html +281 -102
  29. data/doc/Dynamoid/Errors.html +29 -22
  30. data/doc/Dynamoid/Errors/ConditionalCheckFailedException.html +141 -0
  31. data/doc/Dynamoid/Errors/DocumentNotValid.html +36 -25
  32. data/doc/Dynamoid/Errors/Error.html +27 -20
  33. data/doc/Dynamoid/Errors/InvalidField.html +27 -19
  34. data/doc/Dynamoid/Errors/InvalidQuery.html +131 -0
  35. data/doc/Dynamoid/Errors/MissingRangeKey.html +27 -19
  36. data/doc/Dynamoid/Fields.html +94 -77
  37. data/doc/Dynamoid/Fields/ClassMethods.html +166 -37
  38. data/doc/Dynamoid/Finders.html +28 -21
  39. data/doc/Dynamoid/Finders/ClassMethods.html +505 -78
  40. data/doc/Dynamoid/IdentityMap.html +492 -0
  41. data/doc/Dynamoid/IdentityMap/ClassMethods.html +534 -0
  42. data/doc/Dynamoid/Indexes.html +41 -28
  43. data/doc/Dynamoid/Indexes/ClassMethods.html +45 -29
  44. data/doc/Dynamoid/Indexes/Index.html +100 -62
  45. data/doc/Dynamoid/Middleware.html +115 -0
  46. data/doc/Dynamoid/Middleware/IdentityMap.html +264 -0
  47. data/doc/Dynamoid/Persistence.html +326 -85
  48. data/doc/Dynamoid/Persistence/ClassMethods.html +275 -109
  49. data/doc/Dynamoid/Validations.html +47 -31
  50. data/doc/_index.html +116 -71
  51. data/doc/class_list.html +13 -7
  52. data/doc/css/full_list.css +4 -2
  53. data/doc/css/style.css +60 -44
  54. data/doc/file.LICENSE.html +26 -19
  55. data/doc/file.README.html +152 -48
  56. data/doc/file_list.html +14 -8
  57. data/doc/frames.html +20 -5
  58. data/doc/index.html +152 -48
  59. data/doc/js/app.js +52 -43
  60. data/doc/js/full_list.js +14 -9
  61. data/doc/js/jquery.js +4 -16
  62. data/doc/method_list.html +446 -540
  63. data/doc/top-level-namespace.html +27 -20
  64. data/{Dynamoid.gemspec → dynamoid.gemspec} +21 -8
  65. data/lib/dynamoid/adapter.rb +11 -10
  66. data/lib/dynamoid/adapter/aws_sdk.rb +40 -19
  67. data/lib/dynamoid/components.rb +2 -1
  68. data/lib/dynamoid/criteria/chain.rb +29 -11
  69. data/lib/dynamoid/dirty.rb +6 -0
  70. data/lib/dynamoid/document.rb +34 -19
  71. data/lib/dynamoid/fields.rb +36 -30
  72. data/lib/dynamoid/finders.rb +7 -5
  73. data/lib/dynamoid/persistence.rb +37 -10
  74. data/spec/app/models/address.rb +2 -0
  75. data/spec/app/models/camel_case.rb +10 -0
  76. data/spec/app/models/car.rb +6 -0
  77. data/spec/app/models/nuclear_submarine.rb +5 -0
  78. data/spec/app/models/subscription.rb +2 -2
  79. data/spec/app/models/vehicle.rb +7 -0
  80. data/spec/dynamoid/adapter/aws_sdk_spec.rb +20 -11
  81. data/spec/dynamoid/adapter_spec.rb +67 -82
  82. data/spec/dynamoid/associations/association_spec.rb +30 -30
  83. data/spec/dynamoid/criteria/chain_spec.rb +56 -9
  84. data/spec/dynamoid/criteria_spec.rb +3 -0
  85. data/spec/dynamoid/dirty_spec.rb +8 -0
  86. data/spec/dynamoid/document_spec.rb +109 -47
  87. data/spec/dynamoid/fields_spec.rb +32 -3
  88. data/spec/dynamoid/finders_spec.rb +12 -0
  89. data/spec/dynamoid/persistence_spec.rb +73 -8
  90. data/spec/spec_helper.rb +1 -0
  91. data/spec/support/with_partitioning.rb +15 -0
  92. metadata +22 -9
@@ -6,19 +6,21 @@
6
6
  <title>
7
7
  Exception: Dynamoid::Errors::InvalidField
8
8
 
9
- &mdash; Documentation by YARD 0.7.5
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
- relpath = '../..';
19
- if (relpath != '') relpath += '/';
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
20
21
  </script>
21
22
 
23
+
22
24
  <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
25
 
24
26
  <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
@@ -26,36 +28,41 @@
26
28
 
27
29
  </head>
28
30
  <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
31
  <div id="header">
34
32
  <div id="menu">
35
33
 
36
- <a href="../../_index.html">Index (I)</a> &raquo;
34
+ <a href="../../_index.html">Index (I)</a> &raquo;
37
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="../Errors.html" title="Dynamoid::Errors (module)">Errors</a></span></span>
38
36
  &raquo;
39
37
  <span class="title">InvalidField</span>
40
38
 
41
-
39
+
42
40
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
41
  </div>
44
42
 
45
43
  <div id="search">
46
44
 
47
- <a id="class_list_link" href="#">Class List</a>
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
48
49
 
49
- <a id="method_list_link" href="#">Method List</a>
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
50
54
 
51
- <a id="file_list_link" href="#">File List</a>
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
52
59
 
53
60
  </div>
54
61
  <div class="clear"></div>
55
62
  </div>
56
-
63
+
57
64
  <iframe id="search_frame"></iframe>
58
-
65
+
59
66
  <div id="content"><h1>Exception: Dynamoid::Errors::InvalidField
60
67
 
61
68
 
@@ -120,13 +127,14 @@
120
127
 
121
128
 
122
129
 
130
+
123
131
 
124
132
  </div>
125
-
133
+
126
134
  <div id="footer">
127
- Generated on Thu Apr 26 01:26:24 2012 by
135
+ Generated on Thu Jun 27 21:59:13 2013 by
128
136
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
- 0.7.5 (ruby-1.9.3).
137
+ 0.8.6.1 (ruby-1.9.3).
130
138
  </div>
131
139
 
132
140
  </body>
@@ -0,0 +1,131 @@
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
+ Exception: Dynamoid::Errors::InvalidQuery
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 (I)</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="../Errors.html" title="Dynamoid::Errors (module)">Errors</a></span></span>
36
+ &raquo;
37
+ <span class="title">InvalidQuery</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>Exception: Dynamoid::Errors::InvalidQuery
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"><span class='object_link'><a href="Error.html" title="Dynamoid::Errors::Error (class)">Error</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">StandardError</li>
82
+
83
+ <li class="next"><span class='object_link'><a href="Error.html" title="Dynamoid::Errors::Error (class)">Error</a></span></li>
84
+
85
+ <li class="next">Dynamoid::Errors::InvalidQuery</li>
86
+
87
+ </ul>
88
+ <a href="#" class="inheritanceTree">show all</a>
89
+
90
+ </dd>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r2 last">Defined in:</dt>
101
+ <dd class="r2 last">lib/dynamoid/errors.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ </div>
123
+
124
+ <div id="footer">
125
+ Generated on Thu Jun 27 21:59:13 2013 by
126
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
127
+ 0.8.6.1 (ruby-1.9.3).
128
+ </div>
129
+
130
+ </body>
131
+ </html>
@@ -6,19 +6,21 @@
6
6
  <title>
7
7
  Exception: Dynamoid::Errors::MissingRangeKey
8
8
 
9
- &mdash; Documentation by YARD 0.7.5
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
- relpath = '../..';
19
- if (relpath != '') relpath += '/';
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
20
21
  </script>
21
22
 
23
+
22
24
  <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
25
 
24
26
  <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
@@ -26,36 +28,41 @@
26
28
 
27
29
  </head>
28
30
  <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
31
  <div id="header">
34
32
  <div id="menu">
35
33
 
36
- <a href="../../_index.html">Index (M)</a> &raquo;
34
+ <a href="../../_index.html">Index (M)</a> &raquo;
37
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="../Errors.html" title="Dynamoid::Errors (module)">Errors</a></span></span>
38
36
  &raquo;
39
37
  <span class="title">MissingRangeKey</span>
40
38
 
41
-
39
+
42
40
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
41
  </div>
44
42
 
45
43
  <div id="search">
46
44
 
47
- <a id="class_list_link" href="#">Class List</a>
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
48
49
 
49
- <a id="method_list_link" href="#">Method List</a>
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
50
54
 
51
- <a id="file_list_link" href="#">File List</a>
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
52
59
 
53
60
  </div>
54
61
  <div class="clear"></div>
55
62
  </div>
56
-
63
+
57
64
  <iframe id="search_frame"></iframe>
58
-
65
+
59
66
  <div id="content"><h1>Exception: Dynamoid::Errors::MissingRangeKey
60
67
 
61
68
 
@@ -120,13 +127,14 @@
120
127
 
121
128
 
122
129
 
130
+
123
131
 
124
132
  </div>
125
-
133
+
126
134
  <div id="footer">
127
- Generated on Thu Apr 26 01:26:24 2012 by
135
+ Generated on Thu Jun 27 21:59:13 2013 by
128
136
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
- 0.7.5 (ruby-1.9.3).
137
+ 0.8.6.1 (ruby-1.9.3).
130
138
  </div>
131
139
 
132
140
  </body>
@@ -6,19 +6,21 @@
6
6
  <title>
7
7
  Module: Dynamoid::Fields
8
8
 
9
- &mdash; Documentation by YARD 0.7.5
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
- relpath = '..';
19
- if (relpath != '') relpath += '/';
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
20
21
  </script>
21
22
 
23
+
22
24
  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
25
 
24
26
  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
@@ -26,36 +28,41 @@
26
28
 
27
29
  </head>
28
30
  <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
31
  <div id="header">
34
32
  <div id="menu">
35
33
 
36
- <a href="../_index.html">Index (F)</a> &raquo;
34
+ <a href="../_index.html">Index (F)</a> &raquo;
37
35
  <span class='title'><span class='object_link'><a href="../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span>
38
36
  &raquo;
39
37
  <span class="title">Fields</span>
40
38
 
41
-
39
+
42
40
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
41
  </div>
44
42
 
45
43
  <div id="search">
46
44
 
47
- <a id="class_list_link" href="#">Class List</a>
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
48
49
 
49
- <a id="method_list_link" href="#">Method List</a>
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
50
54
 
51
- <a id="file_list_link" href="#">File List</a>
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
52
59
 
53
60
  </div>
54
61
  <div class="clear"></div>
55
62
  </div>
56
-
63
+
57
64
  <iframe id="search_frame"></iframe>
58
-
65
+
59
66
  <div id="content"><h1>Module: Dynamoid::Fields
60
67
 
61
68
 
@@ -87,7 +94,7 @@
87
94
 
88
95
  <h2>Overview</h2><div class="docstring">
89
96
  <div class="discussion">
90
- <p>All fields on a Dynamoid::Document must be explicitly defined -- if you have fields in the database that are not
97
+ <p>All fields on a Dynamoid::Document must be explicitly defined -- if you have fields in the database that are not
91
98
  specified with field, then they will be ignored.</p>
92
99
 
93
100
 
@@ -98,11 +105,11 @@ specified with field, then they will be ignored.</p>
98
105
 
99
106
  </div><h2>Defined Under Namespace</h2>
100
107
  <p class="children">
101
-
108
+
102
109
 
103
110
  <strong class="modules">Modules:</strong> <span class='object_link'><a href="Fields/ClassMethods.html" title="Dynamoid::Fields::ClassMethods (module)">ClassMethods</a></span>
104
111
 
105
-
112
+
106
113
 
107
114
 
108
115
  </p>
@@ -125,6 +132,7 @@ specified with field, then they will be ignored.</p>
125
132
  </span>
126
133
 
127
134
 
135
+
128
136
 
129
137
 
130
138
 
@@ -169,6 +177,7 @@ specified with field, then they will be ignored.</p>
169
177
 
170
178
 
171
179
 
180
+
172
181
 
173
182
 
174
183
  <span class="summary_desc"><div class='inline'><p>Read an attribute from an object.</p>
@@ -191,6 +200,7 @@ specified with field, then they will be ignored.</p>
191
200
 
192
201
 
193
202
 
203
+
194
204
 
195
205
 
196
206
  <span class="summary_desc"><div class='inline'><p>Update a single attribute, saving the object afterwards.</p>
@@ -213,6 +223,7 @@ specified with field, then they will be ignored.</p>
213
223
 
214
224
 
215
225
 
226
+
216
227
 
217
228
 
218
229
  <span class="summary_desc"><div class='inline'><p>Updates multiple attibutes at once, saving the object once the updates are complete.</p>
@@ -237,6 +248,7 @@ specified with field, then they will be ignored.</p>
237
248
 
238
249
 
239
250
 
251
+
240
252
 
241
253
 
242
254
  <span class="summary_desc"><div class='inline'><p>Write an attribute on the object.</p>
@@ -255,9 +267,8 @@ specified with field, then they will be ignored.</p>
255
267
 
256
268
 
257
269
  <span id="attributes=-instance_method"></span>
258
- <span id="attributes-instance_method"></span>
259
270
  <div class="method_details first">
260
- <p class="signature first" id="attributes-instance_method">
271
+ <h3 class="signature first" id="attributes-instance_method">
261
272
 
262
273
  - (<tt>Object</tt>) <strong>attributes</strong>
263
274
 
@@ -267,7 +278,9 @@ specified with field, then they will be ignored.</p>
267
278
  <span class="names"><span id='raw_attributes-instance_method'>raw_attributes</span></span>
268
279
  </span>
269
280
 
270
- </p><div class="docstring">
281
+
282
+
283
+ </h3><div class="docstring">
271
284
  <div class="discussion">
272
285
  <p>You can access the attributes of an object directly on its attributes method, which is by default an empty hash.</p>
273
286
 
@@ -283,12 +296,12 @@ specified with field, then they will be ignored.</p>
283
296
  <pre class="lines">
284
297
 
285
298
 
286
- 48
287
- 49
288
- 50</pre>
299
+ 63
300
+ 64
301
+ 65</pre>
289
302
  </td>
290
303
  <td>
291
- <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 48</span>
304
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 63</span>
292
305
 
293
306
  <span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
294
307
  <span class='ivar'>@attributes</span>
@@ -303,10 +316,10 @@ specified with field, then they will be ignored.</p>
303
316
 
304
317
  <div id="instance_method_details" class="method_details_list">
305
318
  <h2>Instance Method Details</h2>
306
-
319
+
307
320
 
308
321
  <div class="method_details first">
309
- <p class="signature first" id="read_attribute-instance_method">
322
+ <h3 class="signature first" id="read_attribute-instance_method">
310
323
 
311
324
  - (<tt>Object</tt>) <strong>read_attribute</strong>(name)
312
325
 
@@ -316,7 +329,9 @@ specified with field, then they will be ignored.</p>
316
329
  <span class="names"><span id='[]-instance_method'>[]</span></span>
317
330
  </span>
318
331
 
319
- </p><div class="docstring">
332
+
333
+
334
+ </h3><div class="docstring">
320
335
  <div class="discussion">
321
336
  <p>Read an attribute from an object.</p>
322
337
 
@@ -324,7 +339,7 @@ specified with field, then they will be ignored.</p>
324
339
  </div>
325
340
  </div>
326
341
  <div class="tags">
327
- <h3>Parameters:</h3>
342
+ <p class="tag_title">Parameters:</p>
328
343
  <ul class="param">
329
344
 
330
345
  <li>
@@ -344,7 +359,7 @@ specified with field, then they will be ignored.</p>
344
359
 
345
360
  </ul>
346
361
 
347
- <h3>Since:</h3>
362
+ <p class="tag_title">Since:</p>
348
363
  <ul class="since">
349
364
 
350
365
  <li>
@@ -366,12 +381,12 @@ specified with field, then they will be ignored.</p>
366
381
  <pre class="lines">
367
382
 
368
383
 
369
- 77
370
- 78
371
- 79</pre>
384
+ 90
385
+ 91
386
+ 92</pre>
372
387
  </td>
373
388
  <td>
374
- <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 77</span>
389
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 90</span>
375
390
 
376
391
  <span class='kw'>def</span> <span class='id identifier rubyid_read_attribute'>read_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
377
392
  <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span>
@@ -382,13 +397,15 @@ specified with field, then they will be ignored.</p>
382
397
  </div>
383
398
 
384
399
  <div class="method_details ">
385
- <p class="signature " id="update_attribute-instance_method">
400
+ <h3 class="signature " id="update_attribute-instance_method">
386
401
 
387
402
  - (<tt>Object</tt>) <strong>update_attribute</strong>(attribute, value)
388
403
 
389
404
 
390
405
 
391
- </p><div class="docstring">
406
+
407
+
408
+ </h3><div class="docstring">
392
409
  <div class="discussion">
393
410
  <p>Update a single attribute, saving the object afterwards.</p>
394
411
 
@@ -396,7 +413,7 @@ specified with field, then they will be ignored.</p>
396
413
  </div>
397
414
  </div>
398
415
  <div class="tags">
399
- <h3>Parameters:</h3>
416
+ <p class="tag_title">Parameters:</p>
400
417
  <ul class="param">
401
418
 
402
419
  <li>
@@ -431,7 +448,7 @@ specified with field, then they will be ignored.</p>
431
448
 
432
449
  </ul>
433
450
 
434
- <h3>Since:</h3>
451
+ <p class="tag_title">Since:</p>
435
452
  <ul class="since">
436
453
 
437
454
  <li>
@@ -453,13 +470,13 @@ specified with field, then they will be ignored.</p>
453
470
  <pre class="lines">
454
471
 
455
472
 
456
- 98
457
- 99
458
- 100
459
- 101</pre>
473
+ 111
474
+ 112
475
+ 113
476
+ 114</pre>
460
477
  </td>
461
478
  <td>
462
- <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 98</span>
479
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 111</span>
463
480
 
464
481
  <span class='kw'>def</span> <span class='id identifier rubyid_update_attribute'>update_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
465
482
  <span class='id identifier rubyid_write_attribute'>write_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
@@ -471,13 +488,15 @@ specified with field, then they will be ignored.</p>
471
488
  </div>
472
489
 
473
490
  <div class="method_details ">
474
- <p class="signature " id="update_attributes-instance_method">
491
+ <h3 class="signature " id="update_attributes-instance_method">
475
492
 
476
493
  - (<tt>Object</tt>) <strong>update_attributes</strong>(attributes)
477
494
 
478
495
 
479
496
 
480
- </p><div class="docstring">
497
+
498
+
499
+ </h3><div class="docstring">
481
500
  <div class="discussion">
482
501
  <p>Updates multiple attibutes at once, saving the object once the updates are complete.</p>
483
502
 
@@ -485,7 +504,7 @@ specified with field, then they will be ignored.</p>
485
504
  </div>
486
505
  </div>
487
506
  <div class="tags">
488
- <h3>Parameters:</h3>
507
+ <p class="tag_title">Parameters:</p>
489
508
  <ul class="param">
490
509
 
491
510
  <li>
@@ -505,7 +524,7 @@ specified with field, then they will be ignored.</p>
505
524
 
506
525
  </ul>
507
526
 
508
- <h3>Since:</h3>
527
+ <p class="tag_title">Since:</p>
509
528
  <ul class="since">
510
529
 
511
530
  <li>
@@ -527,16 +546,16 @@ specified with field, then they will be ignored.</p>
527
546
  <pre class="lines">
528
547
 
529
548
 
530
- 87
531
- 88
532
- 89
533
- 90</pre>
549
+ 100
550
+ 101
551
+ 102
552
+ 103</pre>
534
553
  </td>
535
554
  <td>
536
- <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 87</span>
555
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 100</span>
537
556
 
538
557
  <span class='kw'>def</span> <span class='id identifier rubyid_update_attributes'>update_attributes</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
539
- <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write_attribute'>write_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='rbrace'>}</span>
558
+ <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write_attribute'>write_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='rbrace'>}</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
540
559
  <span class='id identifier rubyid_save'>save</span>
541
560
  <span class='kw'>end</span></pre>
542
561
  </td>
@@ -545,7 +564,7 @@ specified with field, then they will be ignored.</p>
545
564
  </div>
546
565
 
547
566
  <div class="method_details ">
548
- <p class="signature " id="write_attribute-instance_method">
567
+ <h3 class="signature " id="write_attribute-instance_method">
549
568
 
550
569
  - (<tt>Object</tt>) <strong>write_attribute</strong>(name, value)
551
570
 
@@ -555,7 +574,9 @@ specified with field, then they will be ignored.</p>
555
574
  <span class="names"><span id='[]=-instance_method'>[]=</span></span>
556
575
  </span>
557
576
 
558
- </p><div class="docstring">
577
+
578
+
579
+ </h3><div class="docstring">
559
580
  <div class="discussion">
560
581
  <p>Write an attribute on the object. Also marks the previous value as dirty.</p>
561
582
 
@@ -563,7 +584,7 @@ specified with field, then they will be ignored.</p>
563
584
  </div>
564
585
  </div>
565
586
  <div class="tags">
566
- <h3>Parameters:</h3>
587
+ <p class="tag_title">Parameters:</p>
567
588
  <ul class="param">
568
589
 
569
590
  <li>
@@ -598,7 +619,7 @@ specified with field, then they will be ignored.</p>
598
619
 
599
620
  </ul>
600
621
 
601
- <h3>Since:</h3>
622
+ <p class="tag_title">Since:</p>
602
623
  <ul class="since">
603
624
 
604
625
  <li>
@@ -620,30 +641,26 @@ specified with field, then they will be ignored.</p>
620
641
  <pre class="lines">
621
642
 
622
643
 
623
- 57
624
- 58
625
- 59
626
- 60
627
- 61
628
- 62
629
- 63
630
- 64
631
- 65
632
- 66
633
- 67
634
- 68
635
- 69</pre>
644
+ 72
645
+ 73
646
+ 74
647
+ 75
648
+ 76
649
+ 77
650
+ 78
651
+ 79
652
+ 80
653
+ 81
654
+ 82</pre>
636
655
  </td>
637
656
  <td>
638
- <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 57</span>
657
+ <pre class="code"><span class="info file"># File 'lib/dynamoid/fields.rb', line 72</span>
639
658
 
640
659
  <span class='kw'>def</span> <span class='id identifier rubyid_write_attribute'>write_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
641
660
  <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='rparen'>)</span> <span class='op'>&gt;</span> <span class='const'>MAX_ITEM_SIZE</span>
642
661
  <span class='const'>Dynamoid</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>DynamoDB can't store items larger than </span><span class='embexpr_beg'>#{</span><span class='const'>MAX_ITEM_SIZE</span><span class='rbrace'>}</span><span class='tstring_content'> and the </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> field has a length of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span>
643
662
  <span class='kw'>end</span>
644
663
 
645
- <span class='id identifier rubyid_attribute_will_change!'>attribute_will_change!</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_read_attribute'>read_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='id identifier rubyid_value'>value</span>
646
-
647
664
  <span class='kw'>if</span> <span class='id identifier rubyid_association'>association</span> <span class='op'>=</span> <span class='ivar'>@associations</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
648
665
  <span class='id identifier rubyid_association'>association</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span>
649
666
  <span class='kw'>end</span>
@@ -658,11 +675,11 @@ specified with field, then they will be ignored.</p>
658
675
  </div>
659
676
 
660
677
  </div>
661
-
678
+
662
679
  <div id="footer">
663
- Generated on Thu Apr 26 01:26:24 2012 by
680
+ Generated on Thu Jun 27 21:59:09 2013 by
664
681
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
665
- 0.7.5 (ruby-1.9.3).
682
+ 0.8.6.1 (ruby-1.9.3).
666
683
  </div>
667
684
 
668
685
  </body>