io_shuten 0.0.1.dev5 → 0.0.3.dev1

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 (47) hide show
  1. data/.travis.yml +7 -0
  2. data/Gemfile +3 -4
  3. data/Gemfile.lock +2 -8
  4. data/README.md +17 -3
  5. data/Rakefile +25 -1
  6. data/benchmark/compare_mem_w_buf.rb +134 -0
  7. data/doc/IO_3A_3ABuffer.html +198 -0
  8. data/doc/IO_shuten/Base.html +349 -1943
  9. data/doc/IO_shuten/Buffer.html +1842 -0
  10. data/doc/IO_shuten/Errors/FileAccessError.html +5 -4
  11. data/doc/IO_shuten/Errors/FileNotFoundError.html +5 -4
  12. data/doc/IO_shuten/Errors/NodeExistsError.html +5 -4
  13. data/doc/IO_shuten/Errors/NodeNameError.html +5 -4
  14. data/doc/IO_shuten/Errors/NodeNotFoundError.html +5 -4
  15. data/doc/IO_shuten/Errors/NotYetImplemented.html +5 -4
  16. data/doc/IO_shuten/Errors.html +5 -4
  17. data/doc/IO_shuten/Memory.html +1798 -0
  18. data/doc/IO_shuten/Mongo.html +9 -13
  19. data/doc/IO_shuten/Redis.html +803 -8
  20. data/doc/IO_shuten/Stores/Mongo/Collection.html +5 -4
  21. data/doc/IO_shuten/Stores/Mongo/GridFS.html +5 -4
  22. data/doc/IO_shuten/Stores/Mongo.html +5 -4
  23. data/doc/IO_shuten/Stores/Redis/KeyValue.html +5 -4
  24. data/doc/IO_shuten/Stores/Redis/PubSub.html +5 -4
  25. data/doc/IO_shuten/Stores/Redis.html +5 -4
  26. data/doc/IO_shuten/Stores.html +5 -4
  27. data/doc/IO_shuten.html +7 -6
  28. data/doc/_index.html +20 -6
  29. data/doc/class_list.html +1 -1
  30. data/doc/file.README.html +21 -6
  31. data/doc/index.html +21 -6
  32. data/doc/method_list.html +119 -15
  33. data/doc/top-level-namespace.html +2 -2
  34. data/io_shuten.gemspec +16 -12
  35. data/lib/io_shuten/base.rb +1 -129
  36. data/lib/io_shuten/buffer.rb +156 -0
  37. data/lib/io_shuten/memory.rb +145 -0
  38. data/lib/io_shuten/redis.rb +65 -0
  39. data/lib/io_shuten/version.rb +1 -1
  40. data/lib/io_shuten.rb +2 -0
  41. data/spec/examples/logger_spec.rb +18 -2
  42. data/spec/lib/buffer_spec.rb +387 -0
  43. data/spec/lib/{base_spec.rb → memory_spec.rb} +92 -82
  44. data/spec/lib/mongo_spec.rb +1 -1
  45. data/spec/lib/redis_spec.rb +1 -1
  46. data/spec/spec_helper.rb +16 -12
  47. metadata +233 -163
@@ -0,0 +1,1798 @@
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::Memory
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 (M)</a> &raquo;
39
+ <span class='title'><span class='object_link'><a href="../IO_shuten.html" title="IO_shuten (module)">IO_shuten</a></span></span>
40
+ &raquo;
41
+ <span class="title">Memory</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::Memory
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"><span class='object_link'><a href="Base.html" title="IO_shuten::Base (class)">Base</a></span></span>
72
+
73
+ <ul class="fullTree">
74
+ <li>Object</li>
75
+
76
+ <li class="next"><span class='object_link'><a href="Base.html" title="IO_shuten::Base (class)">Base</a></span></li>
77
+
78
+ <li class="next">IO_shuten::Memory</li>
79
+
80
+ </ul>
81
+ <a href="#" class="inheritanceTree">show all</a>
82
+
83
+ </dd>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2 last">Defined in:</dt>
94
+ <dd class="r2 last">lib/io_shuten/memory.rb</dd>
95
+
96
+ </dl>
97
+ <div class="clear"></div>
98
+
99
+ <h2>Overview</h2><div class="docstring">
100
+ <div class="discussion">
101
+ <p>
102
+ Implementation of the Memory storage
103
+ </p>
104
+
105
+
106
+ </div>
107
+ </div>
108
+ <div class="tags">
109
+
110
+
111
+ </div>
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>Instance Attribute Summary</h2>
123
+
124
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="IO_shuten::Base (class)">Base</a></span></h3>
125
+ <p class="inherited"><span class='object_link'><a href="Base.html#container-instance_method" title="IO_shuten::Base#container (method)">container</a></span>, <span class='object_link'><a href="Base.html#node_name-instance_method" title="IO_shuten::Base#node_name (method)">node_name</a></span></p>
126
+
127
+
128
+
129
+ <h2>
130
+ Class Method Summary
131
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
132
+ </h2>
133
+
134
+ <ul class="summary">
135
+
136
+ <li class="public ">
137
+ <span class="summary_signature">
138
+
139
+ <a href="#load_instances-class_method" title="load_instances (class method)">+ (Boolean) <strong>load_instances</strong>(source) </a>
140
+
141
+
142
+
143
+ </span>
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'><p>
153
+ Loads instances from disk.
154
+ </p>
155
+ </div></span>
156
+
157
+ </li>
158
+
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#open-class_method" title="open (class method)">+ (Memory) <strong>open</strong>(node_name, *args) </a>
164
+
165
+
166
+
167
+ (also: open_node)
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ <span class="summary_desc"><div class='inline'><p>
179
+ Itself on success.
180
+ </p>
181
+ </div></span>
182
+
183
+ </li>
184
+
185
+
186
+ <li class="public ">
187
+ <span class="summary_signature">
188
+
189
+ <a href="#save_instances-class_method" title="save_instances (class method)">+ (Boolean) <strong>save_instances</strong> </a>
190
+
191
+
192
+
193
+ </span>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'><p>
203
+ Saves all instances to disk.
204
+ </p>
205
+ </div></span>
206
+
207
+ </li>
208
+
209
+
210
+ </ul>
211
+
212
+ <h2>
213
+ Instance Method Summary
214
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
215
+ </h2>
216
+
217
+ <ul class="summary">
218
+
219
+ <li class="public ">
220
+ <span class="summary_signature">
221
+
222
+ <a href="#file_exists%3F-instance_method" title="#file_exists? (instance method)">- (Boolean) <strong>file_exists?</strong>(file_name = nil) </a>
223
+
224
+
225
+
226
+ (also: #file_exist?)
227
+
228
+ </span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ <span class="summary_desc"><div class='inline'></div></span>
238
+
239
+ </li>
240
+
241
+
242
+ <li class="public ">
243
+ <span class="summary_signature">
244
+
245
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Memory) <strong>initialize</strong>(node_name = nil) </a>
246
+
247
+
248
+
249
+ </span>
250
+
251
+ <span class="note title constructor">constructor</span>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <span class="summary_desc"><div class='inline'><p>
261
+ Creates a new Memory node and stores it in the pool.
262
+ </p>
263
+ </div></span>
264
+
265
+ </li>
266
+
267
+
268
+ <li class="public ">
269
+ <span class="summary_signature">
270
+
271
+ <a href="#load_from_file-instance_method" title="#load_from_file (instance method)">- (Memory) <strong>load_from_file</strong>(file_name = nil) </a>
272
+
273
+
274
+
275
+ </span>
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+ <span class="summary_desc"><div class='inline'><p>
285
+ Itself on success.
286
+ </p>
287
+ </div></span>
288
+
289
+ </li>
290
+
291
+
292
+ <li class="public ">
293
+ <span class="summary_signature">
294
+
295
+ <a href="#save_to_file-instance_method" title="#save_to_file (instance method)">- (Memory) <strong>save_to_file</strong>(file_name = nil) </a>
296
+
297
+
298
+
299
+ </span>
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+ <span class="summary_desc"><div class='inline'><p>
309
+ Itself on success.
310
+ </p>
311
+ </div></span>
312
+
313
+ </li>
314
+
315
+
316
+ </ul>
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="IO_shuten::Base (class)">Base</a></span></h3>
328
+ <p class="inherited"><span class='object_link'><a href="Base.html#delete_instance-class_method" title="IO_shuten::Base.delete_instance (method)">delete_instance</a></span>, <span class='object_link'><a href="Base.html#instance_exists%3F-class_method" title="IO_shuten::Base.instance_exists? (method)">instance_exists?</a></span>, <span class='object_link'><a href="Base.html#instances-class_method" title="IO_shuten::Base.instances (method)">instances</a></span>, <span class='object_link'><a href="Base.html#purge_instances%21-class_method" title="IO_shuten::Base.purge_instances! (method)">purge_instances!</a></span></p>
329
+ <div id="constructor_details" class="method_details_list">
330
+ <h2>Constructor Details</h2>
331
+
332
+ <div class="method_details first">
333
+ <p class="signature first" id="initialize-instance_method">
334
+
335
+ - (<tt><span class='object_link'><a href="" title="IO_shuten::Memory (class)">Memory</a></span></tt>) <strong>initialize</strong>(node_name = nil)
336
+
337
+
338
+
339
+ </p><div class="docstring">
340
+ <div class="discussion">
341
+ <p>
342
+ Creates a new Memory node and stores it in the pool
343
+ </p>
344
+
345
+
346
+ </div>
347
+ </div>
348
+ <div class="tags">
349
+ <h3>Parameters:</h3>
350
+ <ul class="param">
351
+
352
+ <li>
353
+
354
+ <span class='name'>node_name</span>
355
+
356
+
357
+ <span class='type'>(<tt>String</tt>)</span>
358
+
359
+
360
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
361
+
362
+
363
+ &mdash;
364
+ <div class='inline'><p>
365
+ Name of the node node (container)
366
+ </p>
367
+ </div>
368
+
369
+ </li>
370
+
371
+ <li>
372
+
373
+ <span class='name'>node_name</span>
374
+
375
+
376
+ <span class='type'>(<tt>Symbol</tt>)</span>
377
+
378
+
379
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
380
+
381
+
382
+ &mdash;
383
+ <div class='inline'><p>
384
+ also a symbol is allowed
385
+ </p>
386
+ </div>
387
+
388
+ </li>
389
+
390
+ </ul>
391
+
392
+ <h3>Raises:</h3>
393
+ <ul class="raise">
394
+
395
+ <li>
396
+
397
+
398
+ <span class='type'>(<tt>NodeNameError</tt>)</span>
399
+
400
+
401
+
402
+ </li>
403
+
404
+ </ul>
405
+
406
+ </div><table class="source_code blame">
407
+ <caption><span class="info file"># File 'lib/io_shuten/memory.rb', line 13</span></caption>
408
+ <tr>
409
+ <td>
410
+ <table>
411
+
412
+
413
+
414
+ <tr>
415
+
416
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
417
+
418
+ <td class="date">2012-01-23 02:28:15</td>
419
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
420
+ <td class="lines">13</td>
421
+ <td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_node_name identifier id'>node_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span></pre></td>
422
+ </tr>
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-23 02:28:15</td>
430
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
431
+ <td class="lines">14</td>
432
+ <td><pre class="code"> <span class='rubyid_if if kw'>if</span> <span class='lbrack token'>[</span><span class='rubyid_String constant id'>String</span><span class='comma token'>,</span> <span class='rubyid_Symbol constant id'>Symbol</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_node_name identifier id'>node_name</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='rparen token'>)</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-23 02:28:15</td>
441
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
442
+ <td class="lines">15</td>
443
+ <td><pre class="code"> <span class='rubyid_unless unless kw'>unless</span> <span class='rubyid_Memory constant id'>Memory</span><span class='dot token'>.</span><span class='rubyid_instance_exists? fid id'>instance_exists?</span> <span class='rubyid_node_name identifier id'>node_name</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-25 22:35:33</td>
452
+ <td class="commit"><a title="Add IO_shuten::Buffer (using IO::Buffer cext) as further interface">1c2e01eb</a><td>
453
+ <td class="lines">16</td>
454
+ <td><pre class="code"> <span class='rubyid_@node_name ivar id'>@node_name</span> <span class='assign token'>=</span> <span class='rubyid_node_name identifier id'>node_name</span></pre></td>
455
+ </tr>
456
+
457
+
458
+ <tr>
459
+
460
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
461
+
462
+ <td class="date">2012-01-23 02:28:15</td>
463
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
464
+ <td class="lines">17</td>
465
+ <td><pre class="code"> <span class='rubyid_@container ivar id'>@container</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_StringIO constant id'>StringIO</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>&quot;&quot;</span><span class='comma token'>,</span><span class='string val'>&quot;w+&quot;</span><span class='rparen token'>)</span></pre></td>
466
+ </tr>
467
+
468
+
469
+ <tr>
470
+
471
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
472
+
473
+ <td class="date">2012-01-23 02:28:15</td>
474
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
475
+ <td class="lines">18</td>
476
+ <td><pre class="code"></pre></td>
477
+ </tr>
478
+
479
+
480
+ <tr>
481
+
482
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
483
+
484
+ <td class="date">2012-01-23 02:28:15</td>
485
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
486
+ <td class="lines">19</td>
487
+ <td><pre class="code"> <span class='rubyid_@@instances ivar id'>@@instances</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_self self kw'>self</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_@@instances ivar id'>@@instances</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span></pre></td>
488
+ </tr>
489
+
490
+
491
+ <tr>
492
+
493
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
494
+
495
+ <td class="date">2012-01-23 02:28:15</td>
496
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
497
+ <td class="lines">20</td>
498
+ <td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
499
+ </tr>
500
+
501
+
502
+ <tr>
503
+
504
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
505
+
506
+ <td class="date">2012-01-23 02:28:15</td>
507
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
508
+ <td class="lines">21</td>
509
+ <td><pre class="code"> <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_NodeExistsError constant id'>NodeExistsError</span><span class='comma token'>,</span> <span class='string val'>&quot;Node already in pool, replacement is not allowed.&quot;</span></pre></td>
510
+ </tr>
511
+
512
+
513
+ <tr>
514
+
515
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
516
+
517
+ <td class="date">2012-01-23 02:28:15</td>
518
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
519
+ <td class="lines">22</td>
520
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
521
+ </tr>
522
+
523
+
524
+ <tr>
525
+
526
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
527
+
528
+ <td class="date">2012-01-23 02:28:15</td>
529
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
530
+ <td class="lines">23</td>
531
+ <td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
532
+ </tr>
533
+
534
+
535
+ <tr>
536
+
537
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
538
+
539
+ <td class="date">2012-01-23 02:28:15</td>
540
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
541
+ <td class="lines">24</td>
542
+ <td><pre class="code"> <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_NodeNameError constant id'>NodeNameError</span><span class='comma token'>,</span> <span class='string val'>&quot;Name must be kind of String or Symbol and can't be nil.&quot;</span></pre></td>
543
+ </tr>
544
+
545
+
546
+ <tr>
547
+
548
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
549
+
550
+ <td class="date">2012-01-23 02:28:15</td>
551
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
552
+ <td class="lines">25</td>
553
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
554
+ </tr>
555
+
556
+
557
+ <tr>
558
+
559
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
560
+
561
+ <td class="date">2012-01-23 02:28:15</td>
562
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
563
+ <td class="lines">26</td>
564
+ <td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
565
+ </tr>
566
+
567
+ </table>
568
+ </td>
569
+ <td>
570
+ </tr>
571
+ </table>
572
+ </div>
573
+
574
+ </div>
575
+ <div id="method_missing_details" class="method_details_list">
576
+ <h2>Dynamic Method Handling</h2>
577
+ <p class="notice super">
578
+ This class handles dynamic methods through the <tt>method_missing</tt> method
579
+
580
+ in the class <span class='object_link'><a href="Base.html#method_missing-instance_method" title="IO_shuten::Base#method_missing (method)">IO_shuten::Base</a></span>
581
+
582
+ </p>
583
+
584
+ </div>
585
+
586
+
587
+ <div id="class_method_details" class="method_details_list">
588
+ <h2>Class Method Details</h2>
589
+
590
+
591
+ <div class="method_details first">
592
+ <p class="signature first" id="load_instances-class_method">
593
+
594
+ + (<tt>Boolean</tt>) <strong>load_instances</strong>(source)
595
+
596
+
597
+
598
+ </p><div class="docstring">
599
+ <div class="discussion">
600
+ <p>
601
+ Loads instances from disk
602
+ </p>
603
+
604
+
605
+ </div>
606
+ </div>
607
+ <div class="tags">
608
+ <h3>Parameters:</h3>
609
+ <ul class="param">
610
+
611
+ <li>
612
+
613
+ <span class='name'>Directory</span>
614
+
615
+
616
+ <span class='type'>(<tt>String</tt>)</span>
617
+
618
+
619
+
620
+ &mdash;
621
+ <div class='inline'><p>
622
+ name
623
+ </p>
624
+ </div>
625
+
626
+ </li>
627
+
628
+ <li>
629
+
630
+ <span class='name'>File</span>
631
+
632
+
633
+ <span class='type'>(<tt>Array</tt>)</span>
634
+
635
+
636
+
637
+ &mdash;
638
+ <div class='inline'><p>
639
+ names (HINT: you can provide a Dir.glob)
640
+ </p>
641
+ </div>
642
+
643
+ </li>
644
+
645
+ </ul>
646
+
647
+ <h3>Returns:</h3>
648
+ <ul class="return">
649
+
650
+ <li>
651
+
652
+
653
+ <span class='type'>(<tt>Boolean</tt>)</span>
654
+
655
+
656
+
657
+ </li>
658
+
659
+ </ul>
660
+
661
+ </div><table class="source_code blame">
662
+ <caption><span class="info file"># File 'lib/io_shuten/memory.rb', line 37</span></caption>
663
+ <tr>
664
+ <td>
665
+ <table>
666
+
667
+
668
+
669
+ <tr>
670
+
671
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
672
+
673
+ <td class="date">2012-01-23 02:28:15</td>
674
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
675
+ <td class="lines">37</td>
676
+ <td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_load_instances identifier id'>load_instances</span> <span class='rubyid_source identifier id'>source</span></pre></td>
677
+ </tr>
678
+
679
+
680
+ <tr>
681
+
682
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
683
+
684
+ <td class="date">2012-01-23 02:28:15</td>
685
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
686
+ <td class="lines">38</td>
687
+ <td><pre class="code"> <span class='rubyid_case case kw'>case</span> <span class='rubyid_source identifier id'>source</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span></pre></td>
688
+ </tr>
689
+
690
+
691
+ <tr>
692
+
693
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
694
+
695
+ <td class="date">2012-01-23 02:28:15</td>
696
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
697
+ <td class="lines">39</td>
698
+ <td><pre class="code"> <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;Array&quot;</span></pre></td>
699
+ </tr>
700
+
701
+
702
+ <tr>
703
+
704
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
705
+
706
+ <td class="date">2012-01-23 02:28:15</td>
707
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
708
+ <td class="lines">40</td>
709
+ <td><pre class="code"> <span class='rubyid_source identifier id'>source</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_file_name identifier id'>file_name</span><span class='bitor op'>|</span></pre></td>
710
+ </tr>
711
+
712
+
713
+ <tr>
714
+
715
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
716
+
717
+ <td class="date">2012-01-23 02:28:15</td>
718
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
719
+ <td class="lines">41</td>
720
+ <td><pre class="code"> <span class='rubyid_node identifier id'>node</span> <span class='assign token'>=</span> <span class='rubyid_Memory constant id'>Memory</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_file_name identifier id'>file_name</span><span class='rparen token'>)</span></pre></td>
721
+ </tr>
722
+
723
+
724
+ <tr>
725
+
726
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
727
+
728
+ <td class="date">2012-01-23 02:28:15</td>
729
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
730
+ <td class="lines">42</td>
731
+ <td><pre class="code"> <span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_read identifier id'>read</span><span class='lparen token'>(</span><span class='rubyid_file_name identifier id'>file_name</span><span class='rparen token'>)</span></pre></td>
732
+ </tr>
733
+
734
+
735
+ <tr>
736
+
737
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
738
+
739
+ <td class="date">2012-01-23 02:28:15</td>
740
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
741
+ <td class="lines">43</td>
742
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
743
+ </tr>
744
+
745
+
746
+ <tr>
747
+
748
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
749
+
750
+ <td class="date">2012-01-23 02:28:15</td>
751
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
752
+ <td class="lines">44</td>
753
+ <td><pre class="code"> <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;String&quot;</span></pre></td>
754
+ </tr>
755
+
756
+
757
+ <tr>
758
+
759
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
760
+
761
+ <td class="date">2012-01-23 02:28:15</td>
762
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
763
+ <td class="lines">45</td>
764
+ <td><pre class="code"> <span class='rubyid_if if kw'>if</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_exists? fid id'>exists?</span><span class='lparen token'>(</span><span class='rubyid_source identifier id'>source</span><span class='rparen token'>)</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_directory? fid id'>directory?</span><span class='lparen token'>(</span><span class='rubyid_source identifier id'>source</span><span class='rparen token'>)</span></pre></td>
765
+ </tr>
766
+
767
+
768
+ <tr>
769
+
770
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
771
+
772
+ <td class="date">2012-01-23 02:28:15</td>
773
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
774
+ <td class="lines">46</td>
775
+ <td><pre class="code"> <span class='rubyid_Dir constant id'>Dir</span><span class='lbrack token'>[</span><span class='rubyid_source identifier id'>source</span><span class='plus op'>+</span><span class='string val'>&quot;/**/*&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_file_name identifier id'>file_name</span><span class='bitor op'>|</span></pre></td>
776
+ </tr>
777
+
778
+
779
+ <tr>
780
+
781
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
782
+
783
+ <td class="date">2012-01-23 02:28:15</td>
784
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
785
+ <td class="lines">47</td>
786
+ <td><pre class="code"> <span class='rubyid_node identifier id'>node</span> <span class='assign token'>=</span> <span class='rubyid_Memory constant id'>Memory</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_file_name identifier id'>file_name</span><span class='rparen token'>)</span></pre></td>
787
+ </tr>
788
+
789
+
790
+ <tr>
791
+
792
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
793
+
794
+ <td class="date">2012-01-23 02:28:15</td>
795
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
796
+ <td class="lines">48</td>
797
+ <td><pre class="code"> <span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_read identifier id'>read</span><span class='lparen token'>(</span><span class='rubyid_file_name identifier id'>file_name</span><span class='rparen token'>)</span></pre></td>
798
+ </tr>
799
+
800
+
801
+ <tr>
802
+
803
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
804
+
805
+ <td class="date">2012-01-23 02:28:15</td>
806
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
807
+ <td class="lines">49</td>
808
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
809
+ </tr>
810
+
811
+
812
+ <tr>
813
+
814
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
815
+
816
+ <td class="date">2012-01-23 02:28:15</td>
817
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
818
+ <td class="lines">50</td>
819
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
820
+ </tr>
821
+
822
+
823
+ <tr>
824
+
825
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
826
+
827
+ <td class="date">2012-01-23 02:28:15</td>
828
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
829
+ <td class="lines">51</td>
830
+ <td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
831
+ </tr>
832
+
833
+
834
+ <tr>
835
+
836
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
837
+
838
+ <td class="date">2012-01-23 02:28:15</td>
839
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
840
+ <td class="lines">52</td>
841
+ <td><pre class="code"> <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='dstring node'>&quot;Input must be a kind of Array or String (but was: #{source.class}).&quot;</span></pre></td>
842
+ </tr>
843
+
844
+
845
+ <tr>
846
+
847
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
848
+
849
+ <td class="date">2012-01-23 02:28:15</td>
850
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
851
+ <td class="lines">53</td>
852
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
853
+ </tr>
854
+
855
+
856
+ <tr>
857
+
858
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
859
+
860
+ <td class="date">2012-01-23 02:28:15</td>
861
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
862
+ <td class="lines">54</td>
863
+ <td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
864
+ </tr>
865
+
866
+ </table>
867
+ </td>
868
+ <td>
869
+ </tr>
870
+ </table>
871
+ </div>
872
+
873
+ <div class="method_details ">
874
+ <p class="signature " id="open-class_method">
875
+
876
+ + (<tt><span class='object_link'><a href="" title="IO_shuten::Memory (class)">Memory</a></span></tt>) <strong>open</strong>(node_name, *args)
877
+
878
+
879
+
880
+ <span class="aliases">Also known as:
881
+ <span class="names"><span id='open_node-class_method'>open_node</span></span>
882
+ </span>
883
+
884
+ </p><div class="docstring">
885
+ <div class="discussion">
886
+ <p>
887
+ Itself on success
888
+ </p>
889
+
890
+
891
+ </div>
892
+ </div>
893
+ <div class="tags">
894
+
895
+ <h3>Returns:</h3>
896
+ <ul class="return">
897
+
898
+ <li>
899
+
900
+
901
+ <span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Memory (class)">Memory</a></span></tt>)</span>
902
+
903
+
904
+
905
+ &mdash;
906
+ <div class='inline'><p>
907
+ itself on success
908
+ </p>
909
+ </div>
910
+
911
+ </li>
912
+
913
+ </ul>
914
+ <h3>Raises:</h3>
915
+ <ul class="raise">
916
+
917
+ <li>
918
+
919
+
920
+ <span class='type'>(<tt>NodeNotFoundError</tt>)</span>
921
+
922
+
923
+
924
+ </li>
925
+
926
+ </ul>
927
+
928
+ </div><table class="source_code blame">
929
+ <caption><span class="info file"># File 'lib/io_shuten/memory.rb', line 75</span></caption>
930
+ <tr>
931
+ <td>
932
+ <table>
933
+
934
+
935
+
936
+ <tr>
937
+
938
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
939
+
940
+ <td class="date">2012-01-23 02:28:15</td>
941
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
942
+ <td class="lines">75</td>
943
+ <td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_open identifier id'>open</span> <span class='rubyid_node_name identifier id'>node_name</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span></pre></td>
944
+ </tr>
945
+
946
+
947
+ <tr>
948
+
949
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
950
+
951
+ <td class="date">2012-01-23 02:28:15</td>
952
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
953
+ <td class="lines">76</td>
954
+ <td><pre class="code"> <span class='rubyid_if if kw'>if</span> <span class='rubyid_Memory constant id'>Memory</span><span class='dot token'>.</span><span class='rubyid_instance_exists? fid id'>instance_exists?</span> <span class='rubyid_node_name identifier id'>node_name</span></pre></td>
955
+ </tr>
956
+
957
+
958
+ <tr>
959
+
960
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
961
+
962
+ <td class="date">2012-01-23 02:28:15</td>
963
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
964
+ <td class="lines">77</td>
965
+ <td><pre class="code"> <span class='rubyid_if if kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span></pre></td>
966
+ </tr>
967
+
968
+
969
+ <tr>
970
+
971
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
972
+
973
+ <td class="date">2012-01-23 02:28:15</td>
974
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
975
+ <td class="lines">78</td>
976
+ <td><pre class="code"> <span class='rubyid_base identifier id'>base</span> <span class='assign token'>=</span> <span class='rubyid_Memory constant id'>Memory</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span> <span class='symbol val'>:load</span><span class='comma token'>,</span> <span class='rubyid_node_name identifier id'>node_name</span></pre></td>
977
+ </tr>
978
+
979
+
980
+ <tr>
981
+
982
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
983
+
984
+ <td class="date">2012-01-23 02:28:15</td>
985
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
986
+ <td class="lines">79</td>
987
+ <td><pre class="code"> <span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_reopen identifier id'>reopen</span><span class='lparen token'>(</span><span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_string identifier id'>string</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_closed_write? fid id'>closed_write?</span></pre></td>
988
+ </tr>
989
+
990
+
991
+ <tr>
992
+
993
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
994
+
995
+ <td class="date">2012-01-23 02:28:15</td>
996
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
997
+ <td class="lines">80</td>
998
+ <td><pre class="code"> <span class='rubyid_yield yield kw'>yield</span><span class='lparen token'>(</span><span class='rubyid_base identifier id'>base</span><span class='rparen token'>)</span></pre></td>
999
+ </tr>
1000
+
1001
+
1002
+ <tr>
1003
+
1004
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1005
+
1006
+ <td class="date">2012-01-23 02:28:15</td>
1007
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1008
+ <td class="lines">81</td>
1009
+ <td><pre class="code"> <span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_close_write identifier id'>close_write</span></pre></td>
1010
+ </tr>
1011
+
1012
+
1013
+ <tr>
1014
+
1015
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1016
+
1017
+ <td class="date">2012-01-23 02:28:15</td>
1018
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1019
+ <td class="lines">82</td>
1020
+ <td><pre class="code"> <span class='rubyid_base identifier id'>base</span></pre></td>
1021
+ </tr>
1022
+
1023
+
1024
+ <tr>
1025
+
1026
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1027
+
1028
+ <td class="date">2012-01-23 02:28:15</td>
1029
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1030
+ <td class="lines">83</td>
1031
+ <td><pre class="code"></pre></td>
1032
+ </tr>
1033
+
1034
+
1035
+ <tr>
1036
+
1037
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1038
+
1039
+ <td class="date">2012-01-23 02:28:15</td>
1040
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1041
+ <td class="lines">84</td>
1042
+ <td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
1043
+ </tr>
1044
+
1045
+
1046
+ <tr>
1047
+
1048
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1049
+
1050
+ <td class="date">2012-01-23 02:28:15</td>
1051
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1052
+ <td class="lines">85</td>
1053
+ <td><pre class="code"> <span class='rubyid_base identifier id'>base</span> <span class='assign token'>=</span> <span class='rubyid_Memory constant id'>Memory</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span> <span class='symbol val'>:load</span><span class='comma token'>,</span> <span class='rubyid_node_name identifier id'>node_name</span></pre></td>
1054
+ </tr>
1055
+
1056
+
1057
+ <tr>
1058
+
1059
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1060
+
1061
+ <td class="date">2012-01-23 02:28:15</td>
1062
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1063
+ <td class="lines">86</td>
1064
+ <td><pre class="code"> <span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_reopen identifier id'>reopen</span><span class='lparen token'>(</span><span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_string identifier id'>string</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_closed_write? fid id'>closed_write?</span></pre></td>
1065
+ </tr>
1066
+
1067
+
1068
+ <tr>
1069
+
1070
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1071
+
1072
+ <td class="date">2012-01-23 02:28:15</td>
1073
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1074
+ <td class="lines">87</td>
1075
+ <td><pre class="code"> <span class='rubyid_base identifier id'>base</span></pre></td>
1076
+ </tr>
1077
+
1078
+
1079
+ <tr>
1080
+
1081
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1082
+
1083
+ <td class="date">2012-01-23 02:28:15</td>
1084
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1085
+ <td class="lines">88</td>
1086
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1087
+ </tr>
1088
+
1089
+
1090
+ <tr>
1091
+
1092
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1093
+
1094
+ <td class="date">2012-01-23 02:28:15</td>
1095
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1096
+ <td class="lines">89</td>
1097
+ <td><pre class="code"></pre></td>
1098
+ </tr>
1099
+
1100
+
1101
+ <tr>
1102
+
1103
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1104
+
1105
+ <td class="date">2012-01-23 02:28:15</td>
1106
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1107
+ <td class="lines">90</td>
1108
+ <td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
1109
+ </tr>
1110
+
1111
+
1112
+ <tr>
1113
+
1114
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1115
+
1116
+ <td class="date">2012-01-23 02:28:15</td>
1117
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1118
+ <td class="lines">91</td>
1119
+ <td><pre class="code"> <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_NodeNotFoundError constant id'>NodeNotFoundError</span></pre></td>
1120
+ </tr>
1121
+
1122
+
1123
+ <tr>
1124
+
1125
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1126
+
1127
+ <td class="date">2012-01-23 02:28:15</td>
1128
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1129
+ <td class="lines">92</td>
1130
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1131
+ </tr>
1132
+
1133
+
1134
+ <tr>
1135
+
1136
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1137
+
1138
+ <td class="date">2012-01-23 02:28:15</td>
1139
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1140
+ <td class="lines">93</td>
1141
+ <td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
1142
+ </tr>
1143
+
1144
+ </table>
1145
+ </td>
1146
+ <td>
1147
+ </tr>
1148
+ </table>
1149
+ </div>
1150
+
1151
+ <div class="method_details ">
1152
+ <p class="signature " id="save_instances-class_method">
1153
+
1154
+ + (<tt>Boolean</tt>) <strong>save_instances</strong>
1155
+
1156
+
1157
+
1158
+ </p><div class="docstring">
1159
+ <div class="discussion">
1160
+ <p>
1161
+ Saves all instances to disk
1162
+ </p>
1163
+
1164
+
1165
+ </div>
1166
+ </div>
1167
+ <div class="tags">
1168
+
1169
+ <h3>Returns:</h3>
1170
+ <ul class="return">
1171
+
1172
+ <li>
1173
+
1174
+
1175
+ <span class='type'>(<tt>Boolean</tt>)</span>
1176
+
1177
+
1178
+
1179
+ </li>
1180
+
1181
+ </ul>
1182
+
1183
+ </div><table class="source_code blame">
1184
+ <caption><span class="info file"># File 'lib/io_shuten/memory.rb', line 59</span></caption>
1185
+ <tr>
1186
+ <td>
1187
+ <table>
1188
+
1189
+
1190
+
1191
+ <tr>
1192
+
1193
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1194
+
1195
+ <td class="date">2012-01-23 02:28:15</td>
1196
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1197
+ <td class="lines">59</td>
1198
+ <td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_save_instances identifier id'>save_instances</span></pre></td>
1199
+ </tr>
1200
+
1201
+
1202
+ <tr>
1203
+
1204
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1205
+
1206
+ <td class="date">2012-01-23 02:28:15</td>
1207
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1208
+ <td class="lines">60</td>
1209
+ <td><pre class="code"> <span class='rubyid_results identifier id'>results</span> <span class='assign token'>=</span> <span class='rubyid_instances identifier id'>instances</span><span class='dot token'>.</span><span class='rubyid_inject identifier id'>inject</span><span class='lparen token'>(</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_result identifier id'>result</span><span class='comma token'>,</span> <span class='rubyid_node identifier id'>node</span><span class='bitor op'>|</span></pre></td>
1210
+ </tr>
1211
+
1212
+
1213
+ <tr>
1214
+
1215
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1216
+
1217
+ <td class="date">2012-01-23 02:28:15</td>
1218
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1219
+ <td class="lines">61</td>
1220
+ <td><pre class="code"> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span><span class='comma token'>,</span><span class='string val'>&quot;w&quot;</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_fh identifier id'>fh</span><span class='bitor op'>|</span></pre></td>
1221
+ </tr>
1222
+
1223
+
1224
+ <tr>
1225
+
1226
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1227
+
1228
+ <td class="date">2012-01-23 02:28:15</td>
1229
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1230
+ <td class="lines">62</td>
1231
+ <td><pre class="code"> <span class='rubyid_fh identifier id'>fh</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_string identifier id'>string</span></pre></td>
1232
+ </tr>
1233
+
1234
+
1235
+ <tr>
1236
+
1237
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1238
+
1239
+ <td class="date">2012-01-23 02:28:15</td>
1240
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1241
+ <td class="lines">63</td>
1242
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1243
+ </tr>
1244
+
1245
+
1246
+ <tr>
1247
+
1248
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1249
+
1250
+ <td class="date">2012-01-23 02:28:15</td>
1251
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1252
+ <td class="lines">64</td>
1253
+ <td><pre class="code"> <span class='rubyid_result identifier id'>result</span><span class='lbrack token'>[</span><span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='symbol val'>:failed</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_exists? fid id'>exists?</span><span class='lparen token'>(</span><span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span><span class='rparen token'>)</span></pre></td>
1254
+ </tr>
1255
+
1256
+
1257
+ <tr>
1258
+
1259
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1260
+
1261
+ <td class="date">2012-01-23 02:28:15</td>
1262
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1263
+ <td class="lines">65</td>
1264
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1265
+ </tr>
1266
+
1267
+
1268
+ <tr>
1269
+
1270
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1271
+
1272
+ <td class="date">2012-01-23 02:28:15</td>
1273
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1274
+ <td class="lines">66</td>
1275
+ <td><pre class="code"> <span class='rubyid_if if kw'>if</span> <span class='rubyid_results identifier id'>results</span></pre></td>
1276
+ </tr>
1277
+
1278
+
1279
+ <tr>
1280
+
1281
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1282
+
1283
+ <td class="date">2012-01-23 02:28:15</td>
1284
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1285
+ <td class="lines">67</td>
1286
+ <td><pre class="code"> <span class='rubyid_false false kw'>false</span></pre></td>
1287
+ </tr>
1288
+
1289
+
1290
+ <tr>
1291
+
1292
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1293
+
1294
+ <td class="date">2012-01-23 02:28:15</td>
1295
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1296
+ <td class="lines">68</td>
1297
+ <td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
1298
+ </tr>
1299
+
1300
+
1301
+ <tr>
1302
+
1303
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1304
+
1305
+ <td class="date">2012-01-23 02:28:15</td>
1306
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1307
+ <td class="lines">69</td>
1308
+ <td><pre class="code"> <span class='rubyid_true true kw'>true</span></pre></td>
1309
+ </tr>
1310
+
1311
+
1312
+ <tr>
1313
+
1314
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1315
+
1316
+ <td class="date">2012-01-23 02:28:15</td>
1317
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1318
+ <td class="lines">70</td>
1319
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1320
+ </tr>
1321
+
1322
+
1323
+ <tr>
1324
+
1325
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1326
+
1327
+ <td class="date">2012-01-23 02:28:15</td>
1328
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1329
+ <td class="lines">71</td>
1330
+ <td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
1331
+ </tr>
1332
+
1333
+ </table>
1334
+ </td>
1335
+ <td>
1336
+ </tr>
1337
+ </table>
1338
+ </div>
1339
+
1340
+ </div>
1341
+
1342
+ <div id="instance_method_details" class="method_details_list">
1343
+ <h2>Instance Method Details</h2>
1344
+
1345
+
1346
+ <div class="method_details first">
1347
+ <p class="signature first" id="file_exists?-instance_method">
1348
+
1349
+ - (<tt>Boolean</tt>) <strong>file_exists?</strong>(file_name = nil)
1350
+
1351
+
1352
+
1353
+ <span class="aliases">Also known as:
1354
+ <span class="names"><span id='file_exist?-instance_method'>file_exist?</span></span>
1355
+ </span>
1356
+
1357
+ </p><div class="docstring">
1358
+ <div class="discussion">
1359
+
1360
+
1361
+ </div>
1362
+ </div>
1363
+ <div class="tags">
1364
+
1365
+ <h3>Returns:</h3>
1366
+ <ul class="return">
1367
+
1368
+ <li>
1369
+
1370
+
1371
+ <span class='type'>(<tt>Boolean</tt>)</span>
1372
+
1373
+
1374
+
1375
+ </li>
1376
+
1377
+ </ul>
1378
+
1379
+ </div><table class="source_code blame">
1380
+ <caption><span class="info file"># File 'lib/io_shuten/memory.rb', line 137</span></caption>
1381
+ <tr>
1382
+ <td>
1383
+ <table>
1384
+
1385
+
1386
+
1387
+ <tr>
1388
+
1389
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1390
+
1391
+ <td class="date">2012-01-23 02:28:15</td>
1392
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1393
+ <td class="lines">137</td>
1394
+ <td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_file_exists? fid id'>file_exists?</span> <span class='rubyid_file_name identifier id'>file_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span></pre></td>
1395
+ </tr>
1396
+
1397
+
1398
+ <tr>
1399
+
1400
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1401
+
1402
+ <td class="date">2012-01-23 02:28:15</td>
1403
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1404
+ <td class="lines">138</td>
1405
+ <td><pre class="code"> <span class='rubyid_file_name identifier id'>file_name</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span></pre></td>
1406
+ </tr>
1407
+
1408
+
1409
+ <tr>
1410
+
1411
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1412
+
1413
+ <td class="date">2012-01-23 02:28:15</td>
1414
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1415
+ <td class="lines">139</td>
1416
+ <td><pre class="code"> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_exists? fid id'>exists?</span><span class='lparen token'>(</span><span class='rubyid_file_name identifier id'>file_name</span><span class='rparen token'>)</span></pre></td>
1417
+ </tr>
1418
+
1419
+
1420
+ <tr>
1421
+
1422
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1423
+
1424
+ <td class="date">2012-01-23 02:28:15</td>
1425
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1426
+ <td class="lines">140</td>
1427
+ <td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
1428
+ </tr>
1429
+
1430
+ </table>
1431
+ </td>
1432
+ <td>
1433
+ </tr>
1434
+ </table>
1435
+ </div>
1436
+
1437
+ <div class="method_details ">
1438
+ <p class="signature " id="load_from_file-instance_method">
1439
+
1440
+ - (<tt><span class='object_link'><a href="" title="IO_shuten::Memory (class)">Memory</a></span></tt>) <strong>load_from_file</strong>(file_name = nil)
1441
+
1442
+
1443
+
1444
+ </p><div class="docstring">
1445
+ <div class="discussion">
1446
+ <p>
1447
+ Itself on success
1448
+ </p>
1449
+
1450
+
1451
+ </div>
1452
+ </div>
1453
+ <div class="tags">
1454
+
1455
+ <h3>Returns:</h3>
1456
+ <ul class="return">
1457
+
1458
+ <li>
1459
+
1460
+
1461
+ <span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Memory (class)">Memory</a></span></tt>)</span>
1462
+
1463
+
1464
+
1465
+ &mdash;
1466
+ <div class='inline'><p>
1467
+ itself on success
1468
+ </p>
1469
+ </div>
1470
+
1471
+ </li>
1472
+
1473
+ </ul>
1474
+ <h3>Raises:</h3>
1475
+ <ul class="raise">
1476
+
1477
+ <li>
1478
+
1479
+
1480
+ <span class='type'>(<tt>FileNotFoundError</tt>)</span>
1481
+
1482
+
1483
+
1484
+ </li>
1485
+
1486
+ </ul>
1487
+
1488
+ </div><table class="source_code blame">
1489
+ <caption><span class="info file"># File 'lib/io_shuten/memory.rb', line 112</span></caption>
1490
+ <tr>
1491
+ <td>
1492
+ <table>
1493
+
1494
+
1495
+
1496
+ <tr>
1497
+
1498
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1499
+
1500
+ <td class="date">2012-01-23 02:28:15</td>
1501
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1502
+ <td class="lines">112</td>
1503
+ <td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_load_from_file identifier id'>load_from_file</span> <span class='rubyid_file_name identifier id'>file_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span></pre></td>
1504
+ </tr>
1505
+
1506
+
1507
+ <tr>
1508
+
1509
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1510
+
1511
+ <td class="date">2012-01-23 02:28:15</td>
1512
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1513
+ <td class="lines">113</td>
1514
+ <td><pre class="code"> <span class='rubyid_file_name identifier id'>file_name</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span></pre></td>
1515
+ </tr>
1516
+
1517
+
1518
+ <tr>
1519
+
1520
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1521
+
1522
+ <td class="date">2012-01-23 02:28:15</td>
1523
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1524
+ <td class="lines">114</td>
1525
+ <td><pre class="code"> <span class='rubyid_if if kw'>if</span> <span class='rubyid_file_exists? fid id'>file_exists?</span> <span class='rubyid_file_name identifier id'>file_name</span></pre></td>
1526
+ </tr>
1527
+
1528
+
1529
+ <tr>
1530
+
1531
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1532
+
1533
+ <td class="date">2012-01-23 02:28:15</td>
1534
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1535
+ <td class="lines">115</td>
1536
+ <td><pre class="code"> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_string identifier id'>string</span> <span class='assign token'>=</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_read identifier id'>read</span><span class='lparen token'>(</span><span class='rubyid_file_name identifier id'>file_name</span><span class='rparen token'>)</span></pre></td>
1537
+ </tr>
1538
+
1539
+
1540
+ <tr>
1541
+
1542
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1543
+
1544
+ <td class="date">2012-01-23 02:28:15</td>
1545
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1546
+ <td class="lines">116</td>
1547
+ <td><pre class="code"> <span class='rubyid_self self kw'>self</span></pre></td>
1548
+ </tr>
1549
+
1550
+
1551
+ <tr>
1552
+
1553
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1554
+
1555
+ <td class="date">2012-01-23 02:28:15</td>
1556
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1557
+ <td class="lines">117</td>
1558
+ <td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
1559
+ </tr>
1560
+
1561
+
1562
+ <tr>
1563
+
1564
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1565
+
1566
+ <td class="date">2012-01-23 02:28:15</td>
1567
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1568
+ <td class="lines">118</td>
1569
+ <td><pre class="code"> <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_FileNotFoundError constant id'>FileNotFoundError</span><span class='comma token'>,</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span></pre></td>
1570
+ </tr>
1571
+
1572
+
1573
+ <tr>
1574
+
1575
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1576
+
1577
+ <td class="date">2012-01-23 02:28:15</td>
1578
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1579
+ <td class="lines">119</td>
1580
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1581
+ </tr>
1582
+
1583
+
1584
+ <tr>
1585
+
1586
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1587
+
1588
+ <td class="date">2012-01-23 02:28:15</td>
1589
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1590
+ <td class="lines">120</td>
1591
+ <td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
1592
+ </tr>
1593
+
1594
+ </table>
1595
+ </td>
1596
+ <td>
1597
+ </tr>
1598
+ </table>
1599
+ </div>
1600
+
1601
+ <div class="method_details ">
1602
+ <p class="signature " id="save_to_file-instance_method">
1603
+
1604
+ - (<tt><span class='object_link'><a href="" title="IO_shuten::Memory (class)">Memory</a></span></tt>) <strong>save_to_file</strong>(file_name = nil)
1605
+
1606
+
1607
+
1608
+ </p><div class="docstring">
1609
+ <div class="discussion">
1610
+ <p>
1611
+ Itself on success
1612
+ </p>
1613
+
1614
+
1615
+ </div>
1616
+ </div>
1617
+ <div class="tags">
1618
+
1619
+ <h3>Returns:</h3>
1620
+ <ul class="return">
1621
+
1622
+ <li>
1623
+
1624
+
1625
+ <span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Memory (class)">Memory</a></span></tt>)</span>
1626
+
1627
+
1628
+
1629
+ &mdash;
1630
+ <div class='inline'><p>
1631
+ itself on success
1632
+ </p>
1633
+ </div>
1634
+
1635
+ </li>
1636
+
1637
+ </ul>
1638
+ <h3>Raises:</h3>
1639
+ <ul class="raise">
1640
+
1641
+ <li>
1642
+
1643
+
1644
+ <span class='type'>(<tt>FileAccessError</tt>)</span>
1645
+
1646
+
1647
+
1648
+ </li>
1649
+
1650
+ </ul>
1651
+
1652
+ </div><table class="source_code blame">
1653
+ <caption><span class="info file"># File 'lib/io_shuten/memory.rb', line 124</span></caption>
1654
+ <tr>
1655
+ <td>
1656
+ <table>
1657
+
1658
+
1659
+
1660
+ <tr>
1661
+
1662
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1663
+
1664
+ <td class="date">2012-01-23 02:28:15</td>
1665
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1666
+ <td class="lines">124</td>
1667
+ <td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_save_to_file identifier id'>save_to_file</span> <span class='rubyid_file_name identifier id'>file_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span></pre></td>
1668
+ </tr>
1669
+
1670
+
1671
+ <tr>
1672
+
1673
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1674
+
1675
+ <td class="date">2012-01-23 02:28:15</td>
1676
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1677
+ <td class="lines">125</td>
1678
+ <td><pre class="code"> <span class='rubyid_file_name identifier id'>file_name</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span></pre></td>
1679
+ </tr>
1680
+
1681
+
1682
+ <tr>
1683
+
1684
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1685
+
1686
+ <td class="date">2012-01-23 02:28:15</td>
1687
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1688
+ <td class="lines">126</td>
1689
+ <td><pre class="code"> <span class='rubyid_begin begin kw'>begin</span></pre></td>
1690
+ </tr>
1691
+
1692
+
1693
+ <tr>
1694
+
1695
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1696
+
1697
+ <td class="date">2012-01-23 02:28:15</td>
1698
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1699
+ <td class="lines">127</td>
1700
+ <td><pre class="code"> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_file_name identifier id'>file_name</span><span class='comma token'>,</span> <span class='string val'>'w'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_fh identifier id'>fh</span><span class='bitor op'>|</span></pre></td>
1701
+ </tr>
1702
+
1703
+
1704
+ <tr>
1705
+
1706
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1707
+
1708
+ <td class="date">2012-01-23 02:28:15</td>
1709
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1710
+ <td class="lines">128</td>
1711
+ <td><pre class="code"> <span class='rubyid_fh identifier id'>fh</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_string identifier id'>string</span><span class='rparen token'>)</span></pre></td>
1712
+ </tr>
1713
+
1714
+
1715
+ <tr>
1716
+
1717
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1718
+
1719
+ <td class="date">2012-01-23 02:28:15</td>
1720
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1721
+ <td class="lines">129</td>
1722
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1723
+ </tr>
1724
+
1725
+
1726
+ <tr>
1727
+
1728
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1729
+
1730
+ <td class="date">2012-01-23 02:28:15</td>
1731
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1732
+ <td class="lines">130</td>
1733
+ <td><pre class="code"> <span class='rubyid_self self kw'>self</span></pre></td>
1734
+ </tr>
1735
+
1736
+
1737
+ <tr>
1738
+
1739
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1740
+
1741
+ <td class="date">2012-01-23 02:28:15</td>
1742
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1743
+ <td class="lines">131</td>
1744
+ <td><pre class="code"> <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_Exception constant id'>Exception</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span></pre></td>
1745
+ </tr>
1746
+
1747
+
1748
+ <tr>
1749
+
1750
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1751
+
1752
+ <td class="date">2012-01-23 02:28:15</td>
1753
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1754
+ <td class="lines">132</td>
1755
+ <td><pre class="code"> <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_FileAccessError constant id'>FileAccessError</span><span class='comma token'>,</span> <span class='dstring node'>&quot;Reason: #{e.message}&quot;</span></pre></td>
1756
+ </tr>
1757
+
1758
+
1759
+ <tr>
1760
+
1761
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1762
+
1763
+ <td class="date">2012-01-23 02:28:15</td>
1764
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1765
+ <td class="lines">133</td>
1766
+ <td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
1767
+ </tr>
1768
+
1769
+
1770
+ <tr>
1771
+
1772
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1773
+
1774
+ <td class="date">2012-01-23 02:28:15</td>
1775
+ <td class="commit"><a title="Update class/module structure">56e9fc17</a><td>
1776
+ <td class="lines">134</td>
1777
+ <td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
1778
+ </tr>
1779
+
1780
+ </table>
1781
+ </td>
1782
+ <td>
1783
+ </tr>
1784
+ </table>
1785
+ </div>
1786
+
1787
+ </div>
1788
+
1789
+ </div>
1790
+
1791
+ <div id="footer">
1792
+ Generated on Thu Jan 26 00:45:41 2012 by
1793
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1794
+ 0.7.4 (ruby-1.8.7).
1795
+ </div>
1796
+
1797
+ </body>
1798
+ </html>