redis_object 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/.coveralls.yml +1 -0
  2. data/.gitignore +2 -0
  3. data/.travis.yml +5 -0
  4. data/Gemfile +4 -0
  5. data/README.markdown +24 -15
  6. data/Rakefile +8 -0
  7. data/lib/redis_object.rb +11 -1
  8. data/lib/redis_object/base.rb +210 -60
  9. data/lib/redis_object/collection.rb +130 -100
  10. data/lib/redis_object/defaults.rb +21 -8
  11. data/lib/redis_object/{history.rb → experimental/history.rb} +0 -0
  12. data/lib/redis_object/ext/filters.rb +34 -16
  13. data/lib/redis_object/ext/script_cache.rb +92 -0
  14. data/lib/redis_object/ext/shardable.rb +18 -0
  15. data/lib/redis_object/ext/triggers.rb +75 -13
  16. data/lib/redis_object/ext/view_caching.rb +258 -0
  17. data/lib/redis_object/ext/views.rb +102 -0
  18. data/lib/redis_object/indices.rb +44 -39
  19. data/lib/redis_object/inheritance_tracking.rb +23 -0
  20. data/lib/redis_object/keys.rb +4 -4
  21. data/lib/redis_object/storage.rb +30 -1
  22. data/lib/redis_object/storage/adapter.rb +6 -3
  23. data/lib/redis_object/storage/redis.rb +98 -3
  24. data/lib/redis_object/timestamps.rb +42 -21
  25. data/lib/redis_object/types.rb +172 -30
  26. data/lib/redis_object/version.rb +1 -1
  27. data/redis_object.gemspec +1 -0
  28. data/spec/adapter_spec.rb +43 -0
  29. data/spec/base_spec.rb +41 -6
  30. data/spec/benchmark_spec.rb +46 -0
  31. data/spec/collections_spec.rb +144 -0
  32. data/spec/defaults_spec.rb +56 -0
  33. data/spec/filters_spec.rb +29 -0
  34. data/spec/indices_spec.rb +45 -0
  35. data/spec/rename_class_spec.rb +96 -0
  36. data/spec/spec_helper.rb +32 -1
  37. data/spec/timestamp_spec.rb +28 -0
  38. data/spec/trigger_spec.rb +51 -0
  39. data/spec/types_spec.rb +103 -0
  40. data/spec/view_caching_spec.rb +130 -0
  41. data/spec/views_spec.rb +72 -0
  42. metadata +111 -116
  43. data/doc/Object.html +0 -185
  44. data/doc/Seabright.html +0 -181
  45. data/doc/Seabright/Adapter.html +0 -442
  46. data/doc/Seabright/Collection.html +0 -797
  47. data/doc/Seabright/Collections.html +0 -635
  48. data/doc/Seabright/Collections/ClassMethods.html +0 -212
  49. data/doc/Seabright/ExternalIndex.html +0 -217
  50. data/doc/Seabright/History.html +0 -382
  51. data/doc/Seabright/History/ClassMethods.html +0 -276
  52. data/doc/Seabright/Indices.html +0 -324
  53. data/doc/Seabright/Indices/ClassMethods.html +0 -348
  54. data/doc/Seabright/Keys.html +0 -314
  55. data/doc/Seabright/Keys/ClassMethods.html +0 -276
  56. data/doc/Seabright/ObjectBase.html +0 -852
  57. data/doc/Seabright/ObjectBase/ClassMethods.html +0 -677
  58. data/doc/Seabright/RedisObject.html +0 -230
  59. data/doc/Seabright/References.html +0 -280
  60. data/doc/Seabright/Storage.html +0 -252
  61. data/doc/Seabright/Storage/ClassMethods.html +0 -276
  62. data/doc/Seabright/Storage/MySQL.html +0 -442
  63. data/doc/Seabright/Storage/Redis.html +0 -218
  64. data/doc/Seabright/Template.html +0 -212
  65. data/doc/Seabright/Template/ClassMethods.html +0 -166
  66. data/doc/Seabright/Timestamps.html +0 -292
  67. data/doc/Seabright/Timestamps/ClassMethods.html +0 -214
  68. data/doc/Seabright/Types.html +0 -410
  69. data/doc/Seabright/Types/ClassMethods.html +0 -308
  70. data/doc/created.rid +0 -17
  71. data/doc/images/add.png +0 -0
  72. data/doc/images/brick.png +0 -0
  73. data/doc/images/brick_link.png +0 -0
  74. data/doc/images/bug.png +0 -0
  75. data/doc/images/bullet_black.png +0 -0
  76. data/doc/images/bullet_toggle_minus.png +0 -0
  77. data/doc/images/bullet_toggle_plus.png +0 -0
  78. data/doc/images/date.png +0 -0
  79. data/doc/images/delete.png +0 -0
  80. data/doc/images/find.png +0 -0
  81. data/doc/images/loadingAnimation.gif +0 -0
  82. data/doc/images/macFFBgHack.png +0 -0
  83. data/doc/images/package.png +0 -0
  84. data/doc/images/page_green.png +0 -0
  85. data/doc/images/page_white_text.png +0 -0
  86. data/doc/images/page_white_width.png +0 -0
  87. data/doc/images/plugin.png +0 -0
  88. data/doc/images/ruby.png +0 -0
  89. data/doc/images/tag_blue.png +0 -0
  90. data/doc/images/tag_green.png +0 -0
  91. data/doc/images/transparent.png +0 -0
  92. data/doc/images/wrench.png +0 -0
  93. data/doc/images/wrench_orange.png +0 -0
  94. data/doc/images/zoom.png +0 -0
  95. data/doc/index.html +0 -125
  96. data/doc/js/darkfish.js +0 -153
  97. data/doc/js/jquery.js +0 -18
  98. data/doc/js/navigation.js +0 -142
  99. data/doc/js/search.js +0 -94
  100. data/doc/js/search_index.js +0 -1
  101. data/doc/js/searcher.js +0 -228
  102. data/doc/rdoc.css +0 -543
  103. data/doc/table_of_contents.html +0 -394
@@ -1,348 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
-
7
- <title>module Seabright::Indices::ClassMethods - StubbornObject</title>
8
-
9
- <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
-
11
- <script type="text/javascript">
12
- var rdoc_rel_prefix = "../../";
13
- </script>
14
-
15
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
-
22
-
23
- <body id="top" class="module">
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="../../index.html">Home</a>
28
- <a href="../../table_of_contents.html#classes">Classes</a>
29
- <a href="../../table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
33
-
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
35
- <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
38
- title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
41
-
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
44
-
45
-
46
- <div id="file-metadata">
47
- <nav id="file-list-section" class="section">
48
- <h3 class="section-header">Defined In</h3>
49
- <ul>
50
- <li>lib/redis_object/indices.rb
51
- </ul>
52
- </nav>
53
-
54
-
55
- </div>
56
-
57
- <div id="class-metadata">
58
-
59
-
60
-
61
- <!-- Method Quickref -->
62
- <nav id="method-list-section" class="section">
63
- <h3 class="section-header">Methods</h3>
64
-
65
- <ul class="link-list">
66
-
67
- <li><a href="#method-i-index">#index</a>
68
-
69
- <li><a href="#method-i-indexed">#indexed</a>
70
-
71
- <li><a href="#method-i-recently_created">#recently_created</a>
72
-
73
- <li><a href="#method-i-recently_updated">#recently_updated</a>
74
-
75
- <li><a href="#method-i-sort_by">#sort_by</a>
76
-
77
- </ul>
78
- </nav>
79
-
80
- </div>
81
-
82
- <div id="project-metadata">
83
-
84
- <nav id="classindex-section" class="section project-section">
85
- <h3 class="section-header">Class and Module Index</h3>
86
-
87
- <ul class="link-list">
88
-
89
- <li><a href="../../Seabright.html">Seabright</a>
90
-
91
- <li><a href="../../Seabright/Adapter.html">Seabright::Adapter</a>
92
-
93
- <li><a href="../../Seabright/Collection.html">Seabright::Collection</a>
94
-
95
- <li><a href="../../Seabright/Collections.html">Seabright::Collections</a>
96
-
97
- <li><a href="../../Seabright/Collections/ClassMethods.html">Seabright::Collections::ClassMethods</a>
98
-
99
- <li><a href="../../Seabright/ExternalIndex.html">Seabright::ExternalIndex</a>
100
-
101
- <li><a href="../../Seabright/History.html">Seabright::History</a>
102
-
103
- <li><a href="../../Seabright/History/ClassMethods.html">Seabright::History::ClassMethods</a>
104
-
105
- <li><a href="../../Seabright/Indices.html">Seabright::Indices</a>
106
-
107
- <li><a href="../../Seabright/Indices/ClassMethods.html">Seabright::Indices::ClassMethods</a>
108
-
109
- <li><a href="../../Seabright/Keys.html">Seabright::Keys</a>
110
-
111
- <li><a href="../../Seabright/Keys/ClassMethods.html">Seabright::Keys::ClassMethods</a>
112
-
113
- <li><a href="../../Seabright/ObjectBase.html">Seabright::ObjectBase</a>
114
-
115
- <li><a href="../../Seabright/ObjectBase/ClassMethods.html">Seabright::ObjectBase::ClassMethods</a>
116
-
117
- <li><a href="../../Seabright/RedisObject.html">Seabright::RedisObject</a>
118
-
119
- <li><a href="../../Seabright/RedisObject.html">Seabright::RedisObject</a>
120
-
121
- <li><a href="../../Seabright/References.html">Seabright::References</a>
122
-
123
- <li><a href="../../Seabright/Storage.html">Seabright::Storage</a>
124
-
125
- <li><a href="../../Seabright/Storage/ClassMethods.html">Seabright::Storage::ClassMethods</a>
126
-
127
- <li><a href="../../Seabright/Storage/MySQL.html">Seabright::Storage::MySQL</a>
128
-
129
- <li><a href="../../Seabright/Storage/Redis.html">Seabright::Storage::Redis</a>
130
-
131
- <li><a href="../../Seabright/Template.html">Seabright::Template</a>
132
-
133
- <li><a href="../../Seabright/Template/ClassMethods.html">Seabright::Template::ClassMethods</a>
134
-
135
- <li><a href="../../Seabright/Timestamps.html">Seabright::Timestamps</a>
136
-
137
- <li><a href="../../Seabright/Timestamps/ClassMethods.html">Seabright::Timestamps::ClassMethods</a>
138
-
139
- <li><a href="../../Seabright/Types.html">Seabright::Types</a>
140
-
141
- <li><a href="../../Seabright/Types/ClassMethods.html">Seabright::Types::ClassMethods</a>
142
-
143
- <li><a href="../../Object.html">Object</a>
144
-
145
- <li><a href="../../Seabright/RedisObject.html">Object::RedisObject</a>
146
-
147
- </ul>
148
- </nav>
149
-
150
- </div>
151
- </nav>
152
-
153
- <div id="documentation">
154
- <h1 class="module">module Seabright::Indices::ClassMethods</h1>
155
-
156
- <div id="description" class="description">
157
-
158
- </div><!-- description -->
159
-
160
-
161
-
162
-
163
- <section id="5Buntitled-5D" class="documentation-section">
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
- <!-- Methods -->
173
-
174
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
175
- <h3 class="section-header">Public Instance Methods</h3>
176
-
177
-
178
- <div id="method-i-index" class="method-detail ">
179
-
180
- <div class="method-heading">
181
- <span class="method-name">index</span><span
182
- class="method-args">(opts)</span>
183
- <span class="method-click-advice">click to toggle source</span>
184
- </div>
185
-
186
-
187
- <div class="method-description">
188
-
189
-
190
-
191
-
192
-
193
- <div class="method-source-code" id="index-source">
194
- <pre><span class="ruby-comment"># File lib/redis_object/indices.rb, line 46</span>
195
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">index</span>(<span class="ruby-identifier">opts</span>)
196
- <span class="ruby-identifier">@@indices</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">opts</span>
197
- <span class="ruby-keyword">end</span></pre>
198
- </div><!-- index-source -->
199
-
200
- </div>
201
-
202
-
203
-
204
-
205
- </div><!-- index-method -->
206
-
207
-
208
- <div id="method-i-indexed" class="method-detail ">
209
-
210
- <div class="method-heading">
211
- <span class="method-name">indexed</span><span
212
- class="method-args">(index,num=5,reverse=false)</span>
213
- <span class="method-click-advice">click to toggle source</span>
214
- </div>
215
-
216
-
217
- <div class="method-description">
218
-
219
-
220
-
221
-
222
-
223
- <div class="method-source-code" id="indexed-source">
224
- <pre><span class="ruby-comment"># File lib/redis_object/indices.rb, line 26</span>
225
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">indexed</span>(<span class="ruby-identifier">index</span>,<span class="ruby-identifier">num</span>=<span class="ruby-value">5</span>,<span class="ruby-identifier">reverse</span>=<span class="ruby-keyword">false</span>)
226
- <span class="ruby-identifier">out</span> = []
227
- <span class="ruby-identifier">store</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">reverse</span> <span class="ruby-operator">?</span> <span class="ruby-value">:zrevrange</span> <span class="ruby-operator">:</span> <span class="ruby-value">:zrange</span>, <span class="ruby-node">&quot;#{self.plname}::#{index}&quot;</span>, <span class="ruby-value">0</span>, <span class="ruby-identifier">num</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">member</span><span class="ruby-operator">|</span>
228
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">a</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">find_by_key</span>(<span class="ruby-identifier">member</span>)
229
- <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">a</span>
230
- <span class="ruby-keyword">else</span>
231
- <span class="ruby-comment"># store.zrem(self.plname,member)</span>
232
- <span class="ruby-keyword">end</span>
233
- <span class="ruby-keyword">end</span>
234
- <span class="ruby-identifier">out</span>
235
- <span class="ruby-keyword">end</span></pre>
236
- </div><!-- indexed-source -->
237
-
238
- </div>
239
-
240
-
241
-
242
-
243
- </div><!-- indexed-method -->
244
-
245
-
246
- <div id="method-i-recently_created" class="method-detail ">
247
-
248
- <div class="method-heading">
249
- <span class="method-name">recently_created</span><span
250
- class="method-args">(num=5)</span>
251
- <span class="method-click-advice">click to toggle source</span>
252
- </div>
253
-
254
-
255
- <div class="method-description">
256
-
257
-
258
-
259
-
260
-
261
- <div class="method-source-code" id="recently_created-source">
262
- <pre><span class="ruby-comment"># File lib/redis_object/indices.rb, line 38</span>
263
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">recently_created</span>(<span class="ruby-identifier">num</span>=<span class="ruby-value">5</span>)
264
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">indexed</span>(<span class="ruby-value">:created_at</span>,<span class="ruby-identifier">num</span>,<span class="ruby-keyword">true</span>)
265
- <span class="ruby-keyword">end</span></pre>
266
- </div><!-- recently_created-source -->
267
-
268
- </div>
269
-
270
-
271
-
272
-
273
- </div><!-- recently_created-method -->
274
-
275
-
276
- <div id="method-i-recently_updated" class="method-detail ">
277
-
278
- <div class="method-heading">
279
- <span class="method-name">recently_updated</span><span
280
- class="method-args">(num=5)</span>
281
- <span class="method-click-advice">click to toggle source</span>
282
- </div>
283
-
284
-
285
- <div class="method-description">
286
-
287
-
288
-
289
-
290
-
291
- <div class="method-source-code" id="recently_updated-source">
292
- <pre><span class="ruby-comment"># File lib/redis_object/indices.rb, line 42</span>
293
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">recently_updated</span>(<span class="ruby-identifier">num</span>=<span class="ruby-value">5</span>)
294
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">indexed</span>(<span class="ruby-value">:updated_at</span>,<span class="ruby-identifier">num</span>,<span class="ruby-keyword">true</span>)
295
- <span class="ruby-keyword">end</span></pre>
296
- </div><!-- recently_updated-source -->
297
-
298
- </div>
299
-
300
-
301
-
302
-
303
- </div><!-- recently_updated-method -->
304
-
305
-
306
- <div id="method-i-sort_by" class="method-detail ">
307
-
308
- <div class="method-heading">
309
- <span class="method-name">sort_by</span><span
310
- class="method-args">(k)</span>
311
- <span class="method-click-advice">click to toggle source</span>
312
- </div>
313
-
314
-
315
- <div class="method-description">
316
-
317
-
318
-
319
-
320
-
321
- <div class="method-source-code" id="sort_by-source">
322
- <pre><span class="ruby-comment"># File lib/redis_object/indices.rb, line 50</span>
323
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">sort_by</span>(<span class="ruby-identifier">k</span>)
324
- <span class="ruby-identifier">@@sort_indices</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">k</span>)
325
- <span class="ruby-keyword">end</span></pre>
326
- </div><!-- sort_by-source -->
327
-
328
- </div>
329
-
330
-
331
-
332
-
333
- </div><!-- sort_by-method -->
334
-
335
-
336
- </section><!-- public-instance-method-details -->
337
-
338
- </section><!-- 5Buntitled-5D -->
339
-
340
- </div><!-- documentation -->
341
-
342
-
343
- <footer id="validator-badges">
344
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
345
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
346
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
347
- </footer>
348
-
@@ -1,314 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
-
7
- <title>module Seabright::Keys - StubbornObject</title>
8
-
9
- <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
-
11
- <script type="text/javascript">
12
- var rdoc_rel_prefix = "../";
13
- </script>
14
-
15
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
-
22
-
23
- <body id="top" class="module">
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="../index.html">Home</a>
28
- <a href="../table_of_contents.html#classes">Classes</a>
29
- <a href="../table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
33
-
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
35
- <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
38
- title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
41
-
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
44
-
45
-
46
- <div id="file-metadata">
47
- <nav id="file-list-section" class="section">
48
- <h3 class="section-header">Defined In</h3>
49
- <ul>
50
- <li>lib/redis_object/keys.rb
51
- </ul>
52
- </nav>
53
-
54
-
55
- </div>
56
-
57
- <div id="class-metadata">
58
-
59
-
60
-
61
- <!-- Method Quickref -->
62
- <nav id="method-list-section" class="section">
63
- <h3 class="section-header">Methods</h3>
64
-
65
- <ul class="link-list">
66
-
67
- <li><a href="#method-c-included">::included</a>
68
-
69
- <li><a href="#method-i-hkey">#hkey</a>
70
-
71
- <li><a href="#method-i-key">#key</a>
72
-
73
- <li><a href="#method-i-reserve_key">#reserve_key</a>
74
-
75
- </ul>
76
- </nav>
77
-
78
- </div>
79
-
80
- <div id="project-metadata">
81
-
82
- <nav id="classindex-section" class="section project-section">
83
- <h3 class="section-header">Class and Module Index</h3>
84
-
85
- <ul class="link-list">
86
-
87
- <li><a href="../Seabright.html">Seabright</a>
88
-
89
- <li><a href="../Seabright/Adapter.html">Seabright::Adapter</a>
90
-
91
- <li><a href="../Seabright/Collection.html">Seabright::Collection</a>
92
-
93
- <li><a href="../Seabright/Collections.html">Seabright::Collections</a>
94
-
95
- <li><a href="../Seabright/Collections/ClassMethods.html">Seabright::Collections::ClassMethods</a>
96
-
97
- <li><a href="../Seabright/ExternalIndex.html">Seabright::ExternalIndex</a>
98
-
99
- <li><a href="../Seabright/History.html">Seabright::History</a>
100
-
101
- <li><a href="../Seabright/History/ClassMethods.html">Seabright::History::ClassMethods</a>
102
-
103
- <li><a href="../Seabright/Indices.html">Seabright::Indices</a>
104
-
105
- <li><a href="../Seabright/Indices/ClassMethods.html">Seabright::Indices::ClassMethods</a>
106
-
107
- <li><a href="../Seabright/Keys.html">Seabright::Keys</a>
108
-
109
- <li><a href="../Seabright/Keys/ClassMethods.html">Seabright::Keys::ClassMethods</a>
110
-
111
- <li><a href="../Seabright/ObjectBase.html">Seabright::ObjectBase</a>
112
-
113
- <li><a href="../Seabright/ObjectBase/ClassMethods.html">Seabright::ObjectBase::ClassMethods</a>
114
-
115
- <li><a href="../Seabright/RedisObject.html">Seabright::RedisObject</a>
116
-
117
- <li><a href="../Seabright/RedisObject.html">Seabright::RedisObject</a>
118
-
119
- <li><a href="../Seabright/References.html">Seabright::References</a>
120
-
121
- <li><a href="../Seabright/Storage.html">Seabright::Storage</a>
122
-
123
- <li><a href="../Seabright/Storage/ClassMethods.html">Seabright::Storage::ClassMethods</a>
124
-
125
- <li><a href="../Seabright/Storage/MySQL.html">Seabright::Storage::MySQL</a>
126
-
127
- <li><a href="../Seabright/Storage/Redis.html">Seabright::Storage::Redis</a>
128
-
129
- <li><a href="../Seabright/Template.html">Seabright::Template</a>
130
-
131
- <li><a href="../Seabright/Template/ClassMethods.html">Seabright::Template::ClassMethods</a>
132
-
133
- <li><a href="../Seabright/Timestamps.html">Seabright::Timestamps</a>
134
-
135
- <li><a href="../Seabright/Timestamps/ClassMethods.html">Seabright::Timestamps::ClassMethods</a>
136
-
137
- <li><a href="../Seabright/Types.html">Seabright::Types</a>
138
-
139
- <li><a href="../Seabright/Types/ClassMethods.html">Seabright::Types::ClassMethods</a>
140
-
141
- <li><a href="../Object.html">Object</a>
142
-
143
- <li><a href="../Seabright/RedisObject.html">Object::RedisObject</a>
144
-
145
- </ul>
146
- </nav>
147
-
148
- </div>
149
- </nav>
150
-
151
- <div id="documentation">
152
- <h1 class="module">module Seabright::Keys</h1>
153
-
154
- <div id="description" class="description">
155
-
156
- </div><!-- description -->
157
-
158
-
159
-
160
-
161
- <section id="5Buntitled-5D" class="documentation-section">
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
- <!-- Methods -->
171
-
172
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
173
- <h3 class="section-header">Public Class Methods</h3>
174
-
175
-
176
- <div id="method-c-included" class="method-detail ">
177
-
178
- <div class="method-heading">
179
- <span class="method-name">included</span><span
180
- class="method-args">(base)</span>
181
- <span class="method-click-advice">click to toggle source</span>
182
- </div>
183
-
184
-
185
- <div class="method-description">
186
-
187
-
188
-
189
-
190
-
191
- <div class="method-source-code" id="included-source">
192
- <pre><span class="ruby-comment"># File lib/redis_object/keys.rb, line 32</span>
193
- <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
194
- <span class="ruby-identifier">base</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-constant">ClassMethods</span>)
195
- <span class="ruby-keyword">end</span></pre>
196
- </div><!-- included-source -->
197
-
198
- </div>
199
-
200
-
201
-
202
-
203
- </div><!-- included-method -->
204
-
205
-
206
- </section><!-- public-class-method-details -->
207
-
208
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
209
- <h3 class="section-header">Public Instance Methods</h3>
210
-
211
-
212
- <div id="method-i-hkey" class="method-detail ">
213
-
214
- <div class="method-heading">
215
- <span class="method-name">hkey</span><span
216
- class="method-args">(ident = nil, prnt = nil)</span>
217
- <span class="method-click-advice">click to toggle source</span>
218
- </div>
219
-
220
-
221
- <div class="method-description">
222
-
223
-
224
-
225
-
226
-
227
- <div class="method-source-code" id="hkey-source">
228
- <pre><span class="ruby-comment"># File lib/redis_object/keys.rb, line 12</span>
229
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">hkey</span>(<span class="ruby-identifier">ident</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">prnt</span> = <span class="ruby-keyword">nil</span>)
230
- <span class="ruby-node">&quot;#{key}_h&quot;</span>
231
- <span class="ruby-keyword">end</span></pre>
232
- </div><!-- hkey-source -->
233
-
234
- </div>
235
-
236
-
237
-
238
-
239
- </div><!-- hkey-method -->
240
-
241
-
242
- <div id="method-i-key" class="method-detail ">
243
-
244
- <div class="method-heading">
245
- <span class="method-name">key</span><span
246
- class="method-args">(ident = id, prnt = parent)</span>
247
- <span class="method-click-advice">click to toggle source</span>
248
- </div>
249
-
250
-
251
- <div class="method-description">
252
-
253
-
254
-
255
-
256
-
257
- <div class="method-source-code" id="key-source">
258
- <pre><span class="ruby-comment"># File lib/redis_object/keys.rb, line 4</span>
259
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">key</span>(<span class="ruby-identifier">ident</span> = <span class="ruby-identifier">id</span>, <span class="ruby-identifier">prnt</span> = <span class="ruby-identifier">parent</span>)
260
- <span class="ruby-node">&quot;#{prnt ? prnt.class==String ? &quot;#{prnt}:&quot; : &quot;#{prnt.key}:&quot; : &quot;&quot;}#{self.class.cname}:#{ident.gsub(/^.*:/,'')}&quot;</span>
261
- <span class="ruby-keyword">end</span></pre>
262
- </div><!-- key-source -->
263
-
264
- </div>
265
-
266
-
267
-
268
-
269
- </div><!-- key-method -->
270
-
271
-
272
- <div id="method-i-reserve_key" class="method-detail ">
273
-
274
- <div class="method-heading">
275
- <span class="method-name">reserve_key</span><span
276
- class="method-args">(ident = id,prnt=nil)</span>
277
- <span class="method-click-advice">click to toggle source</span>
278
- </div>
279
-
280
-
281
- <div class="method-description">
282
-
283
-
284
-
285
-
286
-
287
- <div class="method-source-code" id="reserve_key-source">
288
- <pre><span class="ruby-comment"># File lib/redis_object/keys.rb, line 8</span>
289
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">reserve_key</span>(<span class="ruby-identifier">ident</span> = <span class="ruby-identifier">id</span>,<span class="ruby-identifier">prnt</span>=<span class="ruby-keyword">nil</span>)
290
- <span class="ruby-node">&quot;#{key(ident,prnt)}_reserve&quot;</span>
291
- <span class="ruby-keyword">end</span></pre>
292
- </div><!-- reserve_key-source -->
293
-
294
- </div>
295
-
296
-
297
-
298
-
299
- </div><!-- reserve_key-method -->
300
-
301
-
302
- </section><!-- public-instance-method-details -->
303
-
304
- </section><!-- 5Buntitled-5D -->
305
-
306
- </div><!-- documentation -->
307
-
308
-
309
- <footer id="validator-badges">
310
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
311
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
312
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
313
- </footer>
314
-