io_shuten 0.1.0.dev6 → 0.1.0.dev7

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 (39) hide show
  1. data/doc/IO_shuten/Base.html +78 -99
  2. data/doc/IO_shuten/Buffer.html +130 -150
  3. data/doc/IO_shuten/Errors/FileAccessError.html +4 -5
  4. data/doc/IO_shuten/Errors/FileNotFoundError.html +4 -5
  5. data/doc/IO_shuten/Errors/NodeExistsError.html +4 -5
  6. data/doc/IO_shuten/Errors/NodeNameError.html +4 -5
  7. data/doc/IO_shuten/Errors/NodeNotFoundError.html +4 -5
  8. data/doc/IO_shuten/Errors/NotYetImplemented.html +4 -5
  9. data/doc/IO_shuten/Errors.html +4 -5
  10. data/doc/IO_shuten/Memory.html +127 -147
  11. data/doc/IO_shuten/Mongo.html +6 -8
  12. data/doc/IO_shuten/Redis.html +164 -263
  13. data/doc/IO_shuten/Stores/BaseContainer.html +377 -0
  14. data/doc/IO_shuten/Stores/Mongo/Collection.html +4 -5
  15. data/doc/IO_shuten/Stores/Mongo/GridFS.html +4 -5
  16. data/doc/IO_shuten/Stores/Mongo.html +4 -5
  17. data/doc/IO_shuten/Stores/Redis/Container.html +778 -0
  18. data/doc/IO_shuten/Stores/Redis/KeyValue/Collection.html +504 -0
  19. data/doc/IO_shuten/Stores/Redis/KeyValue/Single.html +438 -0
  20. data/doc/IO_shuten/Stores/Redis/KeyValue.html +176 -7
  21. data/doc/IO_shuten/Stores/Redis/PubSub.html +140 -5
  22. data/doc/IO_shuten/Stores/Redis.html +7 -6
  23. data/doc/IO_shuten/Stores.html +6 -7
  24. data/doc/IO_shuten/Zmq.html +166 -0
  25. data/doc/IO_shuten.html +6 -7
  26. data/doc/_index.html +49 -6
  27. data/doc/class_list.html +1 -1
  28. data/doc/file.README.html +10 -3
  29. data/doc/index.html +10 -3
  30. data/doc/method_list.html +160 -24
  31. data/doc/top-level-namespace.html +2 -2
  32. data/io_shuten.gemspec +6 -1
  33. data/lib/io_shuten/buffer.rb +8 -6
  34. data/lib/io_shuten/memory.rb +8 -5
  35. data/lib/io_shuten/version.rb +1 -1
  36. data/spec/lib/buffer_spec.rb +43 -0
  37. data/spec/lib/memory_spec.rb +49 -0
  38. data/spec/lib/redis_spec.rb +15 -1
  39. metadata +49 -44
@@ -0,0 +1,778 @@
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: IO_shuten::Stores::Redis::Container
8
+
9
+ &mdash; IO::shuten 【五百::終点】
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <link rel="stylesheet" href="../../../css/blame.css" type="text/css" media="screen" charset="utf-8" />
18
+
19
+ <script type="text/javascript" charset="utf-8">
20
+ relpath = '../../..';
21
+ if (relpath != '') relpath += '/';
22
+ </script>
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
+ <script type="text/javascript" charset="utf-8">
32
+ if (window.top.frames.main) document.body.className = 'frames';
33
+ </script>
34
+
35
+ <div id="header">
36
+ <div id="menu">
37
+
38
+ <a href="../../../_index.html">Index (C)</a> &raquo;
39
+ <span class='title'><span class='object_link'><a href="../../../IO_shuten.html" title="IO_shuten (module)">IO_shuten</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Stores.html" title="IO_shuten::Stores (module)">Stores</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Redis.html" title="IO_shuten::Stores::Redis (module)">Redis</a></span></span>
40
+ &raquo;
41
+ <span class="title">Container</span>
42
+
43
+
44
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
45
+ </div>
46
+
47
+ <div id="search">
48
+
49
+ <a id="class_list_link" href="#">Class List</a>
50
+
51
+ <a id="method_list_link" href="#">Method List</a>
52
+
53
+ <a id="file_list_link" href="#">File List</a>
54
+
55
+ </div>
56
+ <div class="clear"></div>
57
+ </div>
58
+
59
+ <iframe id="search_frame"></iframe>
60
+
61
+ <div id="content"><h1>Class: IO_shuten::Stores::Redis::Container
62
+
63
+
64
+
65
+ </h1>
66
+
67
+ <dl class="box">
68
+
69
+ <dt class="r1">Inherits:</dt>
70
+ <dd class="r1">
71
+ <span class="inheritName">Object</span>
72
+
73
+ <ul class="fullTree">
74
+ <li>Object</li>
75
+
76
+ <li class="next">IO_shuten::Stores::Redis::Container</li>
77
+
78
+ </ul>
79
+ <a href="#" class="inheritanceTree">show all</a>
80
+
81
+ </dd>
82
+
83
+
84
+
85
+
86
+
87
+
88
+ <dt class="r2">Includes:</dt>
89
+ <dd class="r2"><span class='object_link'><a href="../BaseContainer.html" title="IO_shuten::Stores::BaseContainer (module)">BaseContainer</a></span></dd>
90
+
91
+
92
+
93
+
94
+
95
+ <dt class="r1 last">Defined in:</dt>
96
+ <dd class="r1 last">lib/io_shuten/stores/redis/container.rb</dd>
97
+
98
+ </dl>
99
+ <div class="clear"></div>
100
+
101
+ <h2>Overview</h2><div class="docstring">
102
+ <div class="discussion">
103
+
104
+ <p>Redis Backend container</p>
105
+
106
+
107
+ </div>
108
+ </div>
109
+ <div class="tags">
110
+
111
+
112
+ </div>
113
+
114
+
115
+
116
+
117
+
118
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#backend-instance_method" title="#backend (instance method)">- (Object) <strong>backend</strong> </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+ <span class="note title readonly">readonly</span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'>
141
+ <p>Returns the value of attribute backend.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#redis-instance_method" title="#redis (instance method)">- (Object) <strong>redis</strong> </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+ <span class="note title readonly">readonly</span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <span class="summary_desc"><div class='inline'>
167
+ <p>Returns the value of attribute redis.</p>
168
+ </div></span>
169
+
170
+ </li>
171
+
172
+
173
+ </ul>
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+ <h2>
183
+ Instance Method Summary
184
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
185
+ </h2>
186
+
187
+ <ul class="summary">
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#backend_spec-instance_method" title="#backend_spec (instance method)">- (Object) <strong>backend_spec</strong> </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ <span class="summary_desc"><div class='inline'></div></span>
206
+
207
+ </li>
208
+
209
+
210
+ <li class="public ">
211
+ <span class="summary_signature">
212
+
213
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Container) <strong>initialize</strong>(node_name, backend, type, redis_instance = nil) </a>
214
+
215
+
216
+
217
+ </span>
218
+
219
+ <span class="note title constructor">constructor</span>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ <span class="summary_desc"><div class='inline'>
229
+ <p>A new instance of Container.</p>
230
+ </div></span>
231
+
232
+ </li>
233
+
234
+
235
+ <li class="public ">
236
+ <span class="summary_signature">
237
+
238
+ <a href="#use_backend-instance_method" title="#use_backend (instance method)">- (Object) <strong>use_backend</strong>(backend) </a>
239
+
240
+
241
+
242
+ </span>
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ <span class="summary_desc"><div class='inline'></div></span>
252
+
253
+ </li>
254
+
255
+
256
+ <li class="public ">
257
+ <span class="summary_signature">
258
+
259
+ <a href="#use_redis-instance_method" title="#use_redis (instance method)">- (Object) <strong>use_redis</strong>(redis) </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+ <span class="summary_desc"><div class='inline'></div></span>
273
+
274
+ </li>
275
+
276
+
277
+ </ul>
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="../BaseContainer.html" title="IO_shuten::Stores::BaseContainer (module)">BaseContainer</a></span></h3>
289
+ <p class="inherited"><span class='object_link'><a href="../BaseContainer.html#close-instance_method" title="IO_shuten::Stores::BaseContainer#close (method)">#close</a></span>, <span class='object_link'><a href="../BaseContainer.html#read-instance_method" title="IO_shuten::Stores::BaseContainer#read (method)">#read</a></span>, <span class='object_link'><a href="../BaseContainer.html#write-instance_method" title="IO_shuten::Stores::BaseContainer#write (method)">#write</a></span></p>
290
+ <div id="constructor_details" class="method_details_list">
291
+ <h2>Constructor Details</h2>
292
+
293
+ <div class="method_details first">
294
+ <p class="signature first" id="initialize-instance_method">
295
+
296
+ - (<tt><span class='object_link'><a href="" title="IO_shuten::Stores::Redis::Container (class)">Container</a></span></tt>) <strong>initialize</strong>(node_name, backend, type, redis_instance = nil)
297
+
298
+
299
+
300
+ </p><div class="docstring">
301
+ <div class="discussion">
302
+
303
+ <p>A new instance of Container</p>
304
+
305
+
306
+ </div>
307
+ </div>
308
+ <div class="tags">
309
+
310
+
311
+ </div><table class="source_code blame">
312
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/container.rb', line 12</span></caption>
313
+ <tr>
314
+ <td>
315
+ <table>
316
+
317
+
318
+
319
+ <tr>
320
+
321
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
322
+
323
+ <td class="date">2012-01-30 01:31:05</td>
324
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
325
+ <td class="lines">12</td>
326
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_node_name'>node_name</span><span class='comma'>,</span> <span class='id identifier rubyid_backend'>backend</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_redis_instance'>redis_instance</span> <span class='op'>=</span> <span class='kw'>nil</span></pre></td>
327
+ </tr>
328
+
329
+
330
+ <tr>
331
+
332
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
333
+
334
+ <td class="date">2012-01-30 01:31:05</td>
335
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
336
+ <td class="lines">13</td>
337
+ <td><pre class="code"> <span class='ivar'>@node_name</span> <span class='op'>=</span> <span class='id identifier rubyid_node_name'>node_name</span></pre></td>
338
+ </tr>
339
+
340
+
341
+ <tr>
342
+
343
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
344
+
345
+ <td class="date">2012-01-30 01:31:05</td>
346
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
347
+ <td class="lines">14</td>
348
+ <td><pre class="code"> <span class='id identifier rubyid_use_backend'>use_backend</span> <span class='id identifier rubyid_backend'>backend</span></pre></td>
349
+ </tr>
350
+
351
+
352
+ <tr>
353
+
354
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
355
+
356
+ <td class="date">2012-01-30 01:31:05</td>
357
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
358
+ <td class="lines">15</td>
359
+ <td><pre class="code"> <span class='id identifier rubyid_use_type'>use_type</span> <span class='id identifier rubyid_type'>type</span></pre></td>
360
+ </tr>
361
+
362
+
363
+ <tr>
364
+
365
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
366
+
367
+ <td class="date">2012-01-30 01:31:05</td>
368
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
369
+ <td class="lines">16</td>
370
+ <td><pre class="code"> <span class='id identifier rubyid_use_redis'>use_redis</span> <span class='id identifier rubyid_redis_instance'>redis_instance</span></pre></td>
371
+ </tr>
372
+
373
+
374
+ <tr>
375
+
376
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
377
+
378
+ <td class="date">2012-01-30 01:31:05</td>
379
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
380
+ <td class="lines">17</td>
381
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
382
+ </tr>
383
+
384
+ </table>
385
+ </td>
386
+ <td>
387
+ </tr>
388
+ </table>
389
+ </div>
390
+
391
+ </div>
392
+
393
+ <div id="instance_attr_details" class="attr_details">
394
+ <h2>Instance Attribute Details</h2>
395
+
396
+
397
+ <span id=""></span>
398
+ <span id="backend-instance_method"></span>
399
+ <div class="method_details first">
400
+ <p class="signature first" id="backend-instance_method">
401
+
402
+ - (<tt>Object</tt>) <strong>backend</strong> <span class="extras">(readonly)</span>
403
+
404
+
405
+
406
+ </p><div class="docstring">
407
+ <div class="discussion">
408
+
409
+ <p>Returns the value of attribute backend</p>
410
+
411
+
412
+ </div>
413
+ </div>
414
+ <div class="tags">
415
+
416
+
417
+ </div><table class="source_code blame">
418
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/container.rb', line 10</span></caption>
419
+ <tr>
420
+ <td>
421
+ <table>
422
+
423
+
424
+
425
+ <tr>
426
+
427
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
428
+
429
+ <td class="date">2012-01-30 01:31:05</td>
430
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
431
+ <td class="lines">10</td>
432
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_backend'>backend</span></pre></td>
433
+ </tr>
434
+
435
+
436
+ <tr>
437
+
438
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
439
+
440
+ <td class="date">2012-01-30 01:31:05</td>
441
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
442
+ <td class="lines">11</td>
443
+ <td><pre class="code"> <span class='ivar'>@backend</span></pre></td>
444
+ </tr>
445
+
446
+
447
+ <tr>
448
+
449
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
450
+
451
+ <td class="date">2012-01-30 01:31:05</td>
452
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
453
+ <td class="lines">12</td>
454
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
455
+ </tr>
456
+
457
+ </table>
458
+ </td>
459
+ <td>
460
+ </tr>
461
+ </table>
462
+ </div>
463
+
464
+
465
+ <span id=""></span>
466
+ <span id="redis-instance_method"></span>
467
+ <div class="method_details ">
468
+ <p class="signature " id="redis-instance_method">
469
+
470
+ - (<tt>Object</tt>) <strong>redis</strong> <span class="extras">(readonly)</span>
471
+
472
+
473
+
474
+ </p><div class="docstring">
475
+ <div class="discussion">
476
+
477
+ <p>Returns the value of attribute redis</p>
478
+
479
+
480
+ </div>
481
+ </div>
482
+ <div class="tags">
483
+
484
+
485
+ </div><table class="source_code blame">
486
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/container.rb', line 9</span></caption>
487
+ <tr>
488
+ <td>
489
+ <table>
490
+
491
+
492
+
493
+ <tr>
494
+
495
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
496
+
497
+ <td class="date">2012-01-30 01:31:05</td>
498
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
499
+ <td class="lines">9</td>
500
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_redis'>redis</span></pre></td>
501
+ </tr>
502
+
503
+
504
+ <tr>
505
+
506
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
507
+
508
+ <td class="date">2012-01-30 01:31:05</td>
509
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
510
+ <td class="lines">10</td>
511
+ <td><pre class="code"> <span class='ivar'>@redis</span></pre></td>
512
+ </tr>
513
+
514
+
515
+ <tr>
516
+
517
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
518
+
519
+ <td class="date">2012-01-30 01:31:05</td>
520
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
521
+ <td class="lines">11</td>
522
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
523
+ </tr>
524
+
525
+ </table>
526
+ </td>
527
+ <td>
528
+ </tr>
529
+ </table>
530
+ </div>
531
+
532
+ </div>
533
+
534
+
535
+ <div id="instance_method_details" class="method_details_list">
536
+ <h2>Instance Method Details</h2>
537
+
538
+
539
+ <div class="method_details first">
540
+ <p class="signature first" id="backend_spec-instance_method">
541
+
542
+ - (<tt>Object</tt>) <strong>backend_spec</strong>
543
+
544
+
545
+
546
+ </p><table class="source_code blame">
547
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/container.rb', line 29</span></caption>
548
+ <tr>
549
+ <td>
550
+ <table>
551
+
552
+
553
+
554
+ <tr>
555
+
556
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
557
+
558
+ <td class="date">2012-01-30 01:44:11</td>
559
+ <td class="commit"><a title="Fix specs for 1.8.7-like rubies.">4c2f357e</a><td>
560
+ <td class="lines">29</td>
561
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_backend_spec'>backend_spec</span></pre></td>
562
+ </tr>
563
+
564
+
565
+ <tr>
566
+
567
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
568
+
569
+ <td class="date">2012-01-30 01:44:11</td>
570
+ <td class="commit"><a title="Fix specs for 1.8.7-like rubies.">4c2f357e</a><td>
571
+ <td class="lines">30</td>
572
+ <td><pre class="code"> <span class='lbracket'>[</span><span class='ivar'>@backend</span><span class='comma'>,</span><span class='ivar'>@backend_type</span><span class='rbracket'>]</span></pre></td>
573
+ </tr>
574
+
575
+
576
+ <tr>
577
+
578
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
579
+
580
+ <td class="date">2012-01-30 01:44:11</td>
581
+ <td class="commit"><a title="Fix specs for 1.8.7-like rubies.">4c2f357e</a><td>
582
+ <td class="lines">31</td>
583
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
584
+ </tr>
585
+
586
+ </table>
587
+ </td>
588
+ <td>
589
+ </tr>
590
+ </table>
591
+ </div>
592
+
593
+ <div class="method_details ">
594
+ <p class="signature " id="use_backend-instance_method">
595
+
596
+ - (<tt>Object</tt>) <strong>use_backend</strong>(backend)
597
+
598
+
599
+
600
+ </p><table class="source_code blame">
601
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/container.rb', line 19</span></caption>
602
+ <tr>
603
+ <td>
604
+ <table>
605
+
606
+
607
+
608
+ <tr>
609
+
610
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
611
+
612
+ <td class="date">2012-01-30 01:31:05</td>
613
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
614
+ <td class="lines">19</td>
615
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_use_backend'>use_backend</span> <span class='id identifier rubyid_backend'>backend</span></pre></td>
616
+ </tr>
617
+
618
+
619
+ <tr>
620
+
621
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
622
+
623
+ <td class="date">2012-01-30 01:31:05</td>
624
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
625
+ <td class="lines">20</td>
626
+ <td><pre class="code"> <span class='id identifier rubyid_backends'>backends</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:key_value</span> <span class='op'>=&gt;</span> <span class='const'>KeyValue</span><span class='comma'>,</span> <span class='symbol'>:pub_sub</span> <span class='op'>=&gt;</span> <span class='const'>PubSub</span><span class='rbrace'>}</span></pre></td>
627
+ </tr>
628
+
629
+
630
+ <tr>
631
+
632
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
633
+
634
+ <td class="date">2012-01-30 01:31:05</td>
635
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
636
+ <td class="lines">21</td>
637
+ <td><pre class="code"> <span class='kw'>if</span> <span class='id identifier rubyid_backends'>backends</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_backend'>backend</span><span class='rparen'>)</span></pre></td>
638
+ </tr>
639
+
640
+
641
+ <tr>
642
+
643
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
644
+
645
+ <td class="date">2012-01-30 01:31:05</td>
646
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
647
+ <td class="lines">22</td>
648
+ <td><pre class="code"> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_extend'>extend</span> <span class='id identifier rubyid_backends'>backends</span><span class='lbracket'>[</span><span class='id identifier rubyid_backend'>backend</span><span class='rbracket'>]</span></pre></td>
649
+ </tr>
650
+
651
+
652
+ <tr>
653
+
654
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
655
+
656
+ <td class="date">2012-01-30 01:31:05</td>
657
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
658
+ <td class="lines">23</td>
659
+ <td><pre class="code"> <span class='ivar'>@backend</span> <span class='op'>=</span> <span class='id identifier rubyid_backend'>backend</span></pre></td>
660
+ </tr>
661
+
662
+
663
+ <tr>
664
+
665
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
666
+
667
+ <td class="date">2012-01-30 01:31:05</td>
668
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
669
+ <td class="lines">24</td>
670
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
671
+ </tr>
672
+
673
+
674
+ <tr>
675
+
676
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
677
+
678
+ <td class="date">2012-01-30 01:31:05</td>
679
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
680
+ <td class="lines">25</td>
681
+ <td><pre class="code"> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Backend unknown. Use :key_value or :pub_sub</span><span class='tstring_end'>&quot;</span></span></pre></td>
682
+ </tr>
683
+
684
+
685
+ <tr>
686
+
687
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
688
+
689
+ <td class="date">2012-01-30 01:31:05</td>
690
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
691
+ <td class="lines">26</td>
692
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
693
+ </tr>
694
+
695
+
696
+ <tr>
697
+
698
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
699
+
700
+ <td class="date">2012-01-30 01:31:05</td>
701
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
702
+ <td class="lines">27</td>
703
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
704
+ </tr>
705
+
706
+ </table>
707
+ </td>
708
+ <td>
709
+ </tr>
710
+ </table>
711
+ </div>
712
+
713
+ <div class="method_details ">
714
+ <p class="signature " id="use_redis-instance_method">
715
+
716
+ - (<tt>Object</tt>) <strong>use_redis</strong>(redis)
717
+
718
+
719
+
720
+ </p><table class="source_code blame">
721
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/container.rb', line 33</span></caption>
722
+ <tr>
723
+ <td>
724
+ <table>
725
+
726
+
727
+
728
+ <tr>
729
+
730
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
731
+
732
+ <td class="date">2012-01-30 01:31:05</td>
733
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
734
+ <td class="lines">33</td>
735
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_use_redis'>use_redis</span> <span class='id identifier rubyid_redis'>redis</span></pre></td>
736
+ </tr>
737
+
738
+
739
+ <tr>
740
+
741
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
742
+
743
+ <td class="date">2012-01-30 01:31:05</td>
744
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
745
+ <td class="lines">34</td>
746
+ <td><pre class="code"> <span class='ivar'>@redis</span> <span class='op'>=</span> <span class='id identifier rubyid_redis'>redis</span> <span class='kw'>unless</span> <span class='id identifier rubyid_redis'>redis</span> <span class='op'>==</span> <span class='kw'>nil</span></pre></td>
747
+ </tr>
748
+
749
+
750
+ <tr>
751
+
752
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
753
+
754
+ <td class="date">2012-01-30 01:31:05</td>
755
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
756
+ <td class="lines">35</td>
757
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
758
+ </tr>
759
+
760
+ </table>
761
+ </td>
762
+ <td>
763
+ </tr>
764
+ </table>
765
+ </div>
766
+
767
+ </div>
768
+
769
+ </div>
770
+
771
+ <div id="footer">
772
+ Generated on Mon Jan 30 01:52:37 2012 by
773
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
774
+ 0.7.4 (ruby-1.9.3).
775
+ </div>
776
+
777
+ </body>
778
+ </html>