io_shuten 0.0.1.dev4 → 0.0.1.dev5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/.travis.yml +5 -0
  2. data/.yardopts +0 -1
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +0 -3
  5. data/Rakefile +0 -6
  6. data/doc/IO_shuten.html +126 -0
  7. data/doc/IO_shuten/Base.html +2677 -0
  8. data/doc/IO_shuten/Base/FileAccessError.html +129 -0
  9. data/doc/IO_shuten/Base/FileNotFoundError.html +129 -0
  10. data/doc/IO_shuten/Base/NodeNameError.html +129 -0
  11. data/doc/IO_shuten/Base/NodeNotFoundError.html +129 -0
  12. data/doc/IO_shuten/Base/NotYetImplemented.html +129 -0
  13. data/doc/IO_shuten/Errors.html +119 -0
  14. data/doc/IO_shuten/Errors/FileAccessError.html +129 -0
  15. data/doc/IO_shuten/Errors/FileNotFoundError.html +129 -0
  16. data/doc/IO_shuten/Errors/NodeExistsError.html +129 -0
  17. data/doc/IO_shuten/Errors/NodeNameError.html +129 -0
  18. data/doc/IO_shuten/Errors/NodeNameExistsError.html +129 -0
  19. data/doc/IO_shuten/Errors/NodeNotFoundError.html +129 -0
  20. data/doc/IO_shuten/Errors/NotYetImplemented.html +129 -0
  21. data/doc/IO_shuten/Mongo.html +172 -0
  22. data/doc/IO_shuten/Redis.html +172 -0
  23. data/doc/IO_shuten/Stores.html +121 -0
  24. data/doc/IO_shuten/Stores/Mongo.html +121 -0
  25. data/doc/IO_shuten/Stores/Mongo/Collection.html +109 -0
  26. data/doc/IO_shuten/Stores/Mongo/GridFS.html +109 -0
  27. data/doc/IO_shuten/Stores/Redis.html +121 -0
  28. data/doc/IO_shuten/Stores/Redis/KeyValue.html +109 -0
  29. data/doc/IO_shuten/Stores/Redis/PubSub.html +109 -0
  30. data/doc/_index.html +318 -0
  31. data/doc/class_list.html +47 -0
  32. data/doc/css/blame.css +11 -0
  33. data/doc/css/common.css +1 -0
  34. data/doc/css/full_list.css +55 -0
  35. data/doc/css/style.css +322 -0
  36. data/doc/file.README.html +136 -0
  37. data/doc/file_list.html +49 -0
  38. data/doc/frames.html +13 -0
  39. data/doc/index.html +136 -0
  40. data/doc/js/app.js +205 -0
  41. data/doc/js/full_list.js +167 -0
  42. data/doc/js/jquery.js +16 -0
  43. data/doc/method_list.html +150 -0
  44. data/doc/top-level-namespace.html +105 -0
  45. data/io_shuten.gemspec +57 -10
  46. data/lib/io_shuten.rb +3 -1
  47. data/lib/io_shuten/base.rb +105 -67
  48. data/lib/io_shuten/errors.rb +42 -0
  49. data/lib/io_shuten/redis.rb +2 -0
  50. data/lib/io_shuten/stores.rb +11 -0
  51. data/lib/io_shuten/stores/mongo.rb +11 -0
  52. data/lib/io_shuten/stores/mongo/collection.rb +7 -0
  53. data/lib/io_shuten/stores/mongo/gridfs.rb +7 -0
  54. data/lib/io_shuten/stores/redis.rb +11 -0
  55. data/lib/io_shuten/stores/redis/key_value.rb +7 -0
  56. data/lib/io_shuten/stores/redis/pub_sub.rb +7 -0
  57. data/lib/io_shuten/version.rb +1 -1
  58. data/spec/lib/base_spec.rb +163 -73
  59. data/spec/lib/mongo_spec.rb +1 -1
  60. data/spec/lib/redis_spec.rb +1 -1
  61. data/spec/lib/stores/mongo/collection_spec.rb +7 -0
  62. data/spec/lib/stores/mongo/gridfs_spec.rb +7 -0
  63. data/spec/lib/stores/mongo_spec.rb +7 -0
  64. data/spec/lib/stores/redis/key_value_spec.rb +7 -0
  65. data/spec/lib/stores/redis/pub_sub_spec.rb +7 -0
  66. data/spec/lib/stores/redis_spec.rb +7 -0
  67. data/spec/lib/stores_spec.rb +7 -0
  68. data/spec/spec_helper.rb +9 -0
  69. metadata +90 -51
  70. data/.rdoc_options +0 -20
  71. data/.yardoc/checksums +0 -5
  72. data/.yardoc/objects/root.dat +0 -0
  73. data/.yardoc/proxy_types +0 -0
data/.travis.yml CHANGED
@@ -1,8 +1,13 @@
1
1
  rvm:
2
2
  - 1.9.3
3
3
  - 1.9.2
4
+ - 1.8.7
4
5
 
5
6
  branches:
6
7
  only:
7
8
  - develop
8
9
  - master
10
+
11
+ notifications:
12
+ email:
13
+ - chris@dinarrr.com
data/.yardopts CHANGED
@@ -1,4 +1,3 @@
1
1
  --title 'IO::shuten 【五百::終点】'
2
2
  --no-private
3
- --plugin rspec
4
3
  --plugin blame
data/Gemfile CHANGED
@@ -18,7 +18,7 @@ group :development, :test do
18
18
  gem "redcarpet"
19
19
  gem "rdoc"
20
20
  gem "yard"
21
- gem "yard-rspec"
21
+ #gem "yard-rspec" # not working :(
22
22
  gem "yard-blame"
23
23
 
24
24
  gem "pry"
data/Gemfile.lock CHANGED
@@ -54,8 +54,6 @@ GEM
54
54
  yard (0.7.4)
55
55
  yard-blame (0.0.1)
56
56
  yard
57
- yard-rspec (0.1)
58
- yard
59
57
 
60
58
  PLATFORMS
61
59
  ruby
@@ -77,4 +75,3 @@ DEPENDENCIES
77
75
  simplecov-rcov
78
76
  yard
79
77
  yard-blame
80
- yard-rspec
data/Rakefile CHANGED
@@ -7,7 +7,6 @@ require "jeweler"
7
7
  require "rspec"
8
8
  require "rspec/core/rake_task"
9
9
 
10
- require 'rdoc/task'
11
10
  require "yard"
12
11
 
13
12
 
@@ -54,11 +53,6 @@ end
54
53
 
55
54
 
56
55
 
57
- RDoc::Task.new do |rdoc|
58
- #rdoc.main = "README.md"
59
- rdoc.rdoc_files.include("README.md", "lib/**/*.rb")
60
- end
61
-
62
56
  YARD::Rake::YardocTask.new do |t|
63
57
  t.files = ['lib/**/*.rb']
64
58
  #t.options = ['--any', '--extra', '--opts']
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: IO_shuten
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 (I)</a> &raquo;
39
+
40
+
41
+ <span class="title">IO_shuten</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>Module: IO_shuten
62
+
63
+
64
+
65
+ </h1>
66
+
67
+ <dl class="box">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ <dt class="r1 last">Defined in:</dt>
77
+ <dd class="r1 last">lib/io_shuten.rb<span class="defines">,<br />
78
+ lib/io_shuten/base.rb,<br /> lib/io_shuten/mongo.rb,<br /> lib/io_shuten/redis.rb,<br /> lib/io_shuten/stores.rb,<br /> lib/io_shuten/errors.rb,<br /> lib/io_shuten/version.rb</span>
79
+ </dd>
80
+
81
+ </dl>
82
+ <div class="clear"></div>
83
+
84
+ <h2>Overview</h2><div class="docstring">
85
+ <div class="discussion">
86
+
87
+ <p>Namespace of the IO implementations</p>
88
+
89
+
90
+ </div>
91
+ </div>
92
+ <div class="tags">
93
+
94
+
95
+ </div><h2>Defined Under Namespace</h2>
96
+ <p class="children">
97
+
98
+
99
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="IO_shuten/Errors.html" title="IO_shuten::Errors (module)">Errors</a></span>, <span class='object_link'><a href="IO_shuten/Stores.html" title="IO_shuten::Stores (module)">Stores</a></span>
100
+
101
+
102
+
103
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="IO_shuten/Base.html" title="IO_shuten::Base (class)">Base</a></span>, <span class='object_link'><a href="IO_shuten/Mongo.html" title="IO_shuten::Mongo (class)">Mongo</a></span>, <span class='object_link'><a href="IO_shuten/Redis.html" title="IO_shuten::Redis (class)">Redis</a></span>
104
+
105
+
106
+ </p>
107
+
108
+ <h2>Constant Summary</h2>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ </div>
118
+
119
+ <div id="footer">
120
+ Generated on Mon Jan 23 01:15:28 2012 by
121
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
122
+ 0.7.4 (ruby-1.9.3).
123
+ </div>
124
+
125
+ </body>
126
+ </html>
@@ -0,0 +1,2677 @@
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::Base
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 (B)</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">Base</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::Base
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::Base</li>
77
+
78
+ </ul>
79
+ <a href="#" class="inheritanceTree">show all</a>
80
+
81
+ </dd>
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+ <dt class="r2 last">Defined in:</dt>
92
+ <dd class="r2 last">lib/io_shuten/base.rb</dd>
93
+
94
+ </dl>
95
+ <div class="clear"></div>
96
+
97
+ <h2>Overview</h2><div class="docstring">
98
+ <div class="discussion">
99
+
100
+ <p>IO_shuten::Base is the in-memory implementation and parent class for other
101
+ implementations.</p>
102
+
103
+
104
+ </div>
105
+ </div>
106
+ <div class="tags">
107
+
108
+
109
+ </div><div id="subclasses">
110
+ <h2>Direct Known Subclasses</h2>
111
+ <p class="children"><span class='object_link'><a href="Mongo.html" title="IO_shuten::Mongo (class)">Mongo</a></span>, <span class='object_link'><a href="Redis.html" title="IO_shuten::Redis (class)">Redis</a></span></p>
112
+ </div>
113
+
114
+ <h2>Constant Summary</h2>
115
+
116
+ <dl class="constants">
117
+
118
+ <dt id="instances-classvariable" class="">@@instances =
119
+ <div class="docstring">
120
+ <div class="discussion">
121
+
122
+ <p>Storage of current Base instances of the running process</p>
123
+
124
+
125
+ </div>
126
+ </div>
127
+ <div class="tags">
128
+
129
+ <h3>Returns:</h3>
130
+ <ul class="return">
131
+
132
+ <li>
133
+
134
+
135
+ <span class='type'>(<tt>Array</tt>)</span>
136
+
137
+
138
+
139
+ </li>
140
+
141
+ </ul>
142
+
143
+ </div>
144
+ </dt>
145
+ <dd><pre class="code"><span class='lbracket'>[</span><span class='rbracket'>]</span></pre></dd>
146
+
147
+ </dl>
148
+
149
+
150
+
151
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
152
+ <ul class="summary">
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#container-instance_method" title="#container (instance method)">- (StringIO) <strong>container</strong> </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+ <span class="note title readonly">readonly</span>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'>
174
+ <p>holds StringIO node.</p>
175
+ </div></span>
176
+
177
+ </li>
178
+
179
+
180
+ <li class="public ">
181
+ <span class="summary_signature">
182
+
183
+ <a href="#node_name-instance_method" title="#node_name (instance method)">- (String) <strong>node_name</strong> </a>
184
+
185
+
186
+
187
+ </span>
188
+
189
+
190
+ <span class="note title readonly">readonly</span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+ <span class="summary_desc"><div class='inline'>
200
+ <p>Name of current node instance.</p>
201
+ </div></span>
202
+
203
+ </li>
204
+
205
+
206
+ </ul>
207
+
208
+
209
+
210
+
211
+
212
+ <h2>
213
+ Class 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="#delete_instance-class_method" title="delete_instance (class method)">+ (Object) <strong>delete_instance</strong>(node_name_or_instance) </a>
223
+
224
+
225
+
226
+ </span>
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+ <span class="summary_desc"><div class='inline'>
236
+ <p>Deletes a single instance of the pool.</p>
237
+ </div></span>
238
+
239
+ </li>
240
+
241
+
242
+ <li class="public ">
243
+ <span class="summary_signature">
244
+
245
+ <a href="#instance_exists%3F-class_method" title="instance_exists? (class method)">+ (Boolean) <strong>instance_exists?</strong>(node_name) </a>
246
+
247
+
248
+
249
+ (also: instance_exist?, exists?, exist?)
250
+
251
+ </span>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <span class="summary_desc"><div class='inline'>
261
+ <p>Checks for existence of a node.</p>
262
+ </div></span>
263
+
264
+ </li>
265
+
266
+
267
+ <li class="public ">
268
+ <span class="summary_signature">
269
+
270
+ <a href="#instances-class_method" title="instances (class method)">+ (Array) <strong>instances</strong> </a>
271
+
272
+
273
+
274
+ (also: pool, nodes)
275
+
276
+ </span>
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+ <span class="summary_desc"><div class='inline'>
286
+ <p>Current instances.</p>
287
+ </div></span>
288
+
289
+ </li>
290
+
291
+
292
+ <li class="public ">
293
+ <span class="summary_signature">
294
+
295
+ <a href="#load_instances-class_method" title="load_instances (class method)">+ (Boolean) <strong>load_instances</strong>(source) </a>
296
+
297
+
298
+
299
+ </span>
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+ <span class="summary_desc"><div class='inline'>
309
+ <p>Loads instances from disk.</p>
310
+ </div></span>
311
+
312
+ </li>
313
+
314
+
315
+ <li class="public ">
316
+ <span class="summary_signature">
317
+
318
+ <a href="#open-class_method" title="open (class method)">+ (Base) <strong>open</strong>(node_name, *args) </a>
319
+
320
+
321
+
322
+ (also: open_node)
323
+
324
+ </span>
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+ <span class="summary_desc"><div class='inline'>
334
+ <p>Itself on success.</p>
335
+ </div></span>
336
+
337
+ </li>
338
+
339
+
340
+ <li class="public ">
341
+ <span class="summary_signature">
342
+
343
+ <a href="#purge_instances%21-class_method" title="purge_instances! (class method)">+ (Boolean) <strong>purge_instances!</strong> </a>
344
+
345
+
346
+
347
+ </span>
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+ <span class="summary_desc"><div class='inline'>
357
+ <p>Deletes ALL instances in the pool!.</p>
358
+ </div></span>
359
+
360
+ </li>
361
+
362
+
363
+ <li class="public ">
364
+ <span class="summary_signature">
365
+
366
+ <a href="#save_instances-class_method" title="save_instances (class method)">+ (Boolean) <strong>save_instances</strong> </a>
367
+
368
+
369
+
370
+ </span>
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+ <span class="summary_desc"><div class='inline'>
380
+ <p>Saves all instances to disk.</p>
381
+ </div></span>
382
+
383
+ </li>
384
+
385
+
386
+ </ul>
387
+
388
+ <h2>
389
+ Instance Method Summary
390
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
391
+ </h2>
392
+
393
+ <ul class="summary">
394
+
395
+ <li class="public ">
396
+ <span class="summary_signature">
397
+
398
+ <a href="#file_exists%3F-instance_method" title="#file_exists? (instance method)">- (Boolean) <strong>file_exists?</strong>(file_name = nil) </a>
399
+
400
+
401
+
402
+ (also: #file_exist?)
403
+
404
+ </span>
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+ <span class="summary_desc"><div class='inline'></div></span>
414
+
415
+ </li>
416
+
417
+
418
+ <li class="public ">
419
+ <span class="summary_signature">
420
+
421
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Base) <strong>initialize</strong>(node_name = nil, *args) </a>
422
+
423
+
424
+
425
+ </span>
426
+
427
+ <span class="note title constructor">constructor</span>
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+ <span class="summary_desc"><div class='inline'>
437
+ <p>Creates a new Base node and stores it in the pool.</p>
438
+ </div></span>
439
+
440
+ </li>
441
+
442
+
443
+ <li class="public ">
444
+ <span class="summary_signature">
445
+
446
+ <a href="#load_from_file-instance_method" title="#load_from_file (instance method)">- (Base) <strong>load_from_file</strong>(file_name = nil) </a>
447
+
448
+
449
+
450
+ </span>
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+ <span class="summary_desc"><div class='inline'>
460
+ <p>Itself on success.</p>
461
+ </div></span>
462
+
463
+ </li>
464
+
465
+
466
+ <li class="public ">
467
+ <span class="summary_signature">
468
+
469
+ <a href="#save_to_file-instance_method" title="#save_to_file (instance method)">- (Base) <strong>save_to_file</strong>(file_name = nil) </a>
470
+
471
+
472
+
473
+ </span>
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+ <span class="summary_desc"><div class='inline'>
483
+ <p>Itself on success.</p>
484
+ </div></span>
485
+
486
+ </li>
487
+
488
+
489
+ </ul>
490
+
491
+
492
+ <div id="constructor_details" class="method_details_list">
493
+ <h2>Constructor Details</h2>
494
+
495
+ <div class="method_details first">
496
+ <p class="signature first" id="initialize-instance_method">
497
+
498
+ - (<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>) <strong>initialize</strong>(node_name = nil, *args)
499
+
500
+
501
+
502
+ </p><div class="docstring">
503
+ <div class="discussion">
504
+
505
+ <p>Creates a new Base node and stores it in the pool</p>
506
+
507
+
508
+ </div>
509
+ </div>
510
+ <div class="tags">
511
+ <h3>Parameters:</h3>
512
+ <ul class="param">
513
+
514
+ <li>
515
+
516
+ <span class='name'>node_name</span>
517
+
518
+
519
+ <span class='type'>(<tt>String</tt>)</span>
520
+
521
+
522
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
523
+
524
+
525
+ &mdash;
526
+ <div class='inline'>
527
+ <p>Name of the node node (container)</p>
528
+ </div>
529
+
530
+ </li>
531
+
532
+ <li>
533
+
534
+ <span class='name'>node_name</span>
535
+
536
+
537
+ <span class='type'>(<tt>Symbol</tt>)</span>
538
+
539
+
540
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
541
+
542
+
543
+ &mdash;
544
+ <div class='inline'>
545
+ <p>also a symbol is allowed</p>
546
+ </div>
547
+
548
+ </li>
549
+
550
+ <li>
551
+
552
+ <span class='name'>*args</span>
553
+
554
+
555
+ <span class='type'>(<tt>not used</tt>)</span>
556
+
557
+
558
+
559
+ </li>
560
+
561
+ </ul>
562
+
563
+ <h3>Raises:</h3>
564
+ <ul class="raise">
565
+
566
+ <li>
567
+
568
+
569
+ <span class='type'>(<tt>NodeNameError</tt>)</span>
570
+
571
+
572
+
573
+ </li>
574
+
575
+ </ul>
576
+
577
+ </div><table class="source_code blame">
578
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 26</span></caption>
579
+ <tr>
580
+ <td>
581
+ <table>
582
+
583
+
584
+
585
+ <tr>
586
+
587
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
588
+
589
+ <td class="date">2012-01-22 21:35:53</td>
590
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
591
+ <td class="lines">26</td>
592
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_node_name'>node_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span></pre></td>
593
+ </tr>
594
+
595
+
596
+ <tr>
597
+
598
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
599
+
600
+ <td class="date">2012-01-22 21:35:53</td>
601
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
602
+ <td class="lines">27</td>
603
+ <td><pre class="code"> <span class='kw'>if</span> <span class='lbracket'>[</span><span class='const'>String</span><span class='comma'>,</span> <span class='const'>Symbol</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_node_name'>node_name</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span></pre></td>
604
+ </tr>
605
+
606
+
607
+ <tr>
608
+
609
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
610
+
611
+ <td class="date">2012-01-22 21:35:53</td>
612
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
613
+ <td class="lines">28</td>
614
+ <td><pre class="code"> <span class='kw'>unless</span> <span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_instance_exists?'>instance_exists?</span> <span class='id identifier rubyid_node_name'>node_name</span></pre></td>
615
+ </tr>
616
+
617
+
618
+ <tr>
619
+
620
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
621
+
622
+ <td class="date">2012-01-21 16:25:37</td>
623
+ <td class="commit"><a title="Base works as a wrapper/proxy to StringIO.">361b9ae2</a><td>
624
+ <td class="lines">29</td>
625
+ <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>
626
+ </tr>
627
+
628
+
629
+ <tr>
630
+
631
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
632
+
633
+ <td class="date">2012-01-21 14:44:16</td>
634
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
635
+ <td class="lines">30</td>
636
+ <td><pre class="code"> <span class='ivar'>@container</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w+</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span></pre></td>
637
+ </tr>
638
+
639
+
640
+ <tr>
641
+
642
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
643
+
644
+ <td class="date">2012-01-21 14:44:16</td>
645
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
646
+ <td class="lines">31</td>
647
+ <td><pre class="code"></pre></td>
648
+ </tr>
649
+
650
+
651
+ <tr>
652
+
653
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
654
+
655
+ <td class="date">2012-01-22 15:46:58</td>
656
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
657
+ <td class="lines">32</td>
658
+ <td><pre class="code"> <span class='cvar'>@@instances</span> <span class='op'>&lt;&lt;</span> <span class='kw'>self</span> <span class='kw'>unless</span> <span class='cvar'>@@instances</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span></pre></td>
659
+ </tr>
660
+
661
+
662
+ <tr>
663
+
664
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
665
+
666
+ <td class="date">2012-01-22 16:18:47</td>
667
+ <td class="commit"><a title="Update specs for some exceptions.">53887b37</a><td>
668
+ <td class="lines">33</td>
669
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
670
+ </tr>
671
+
672
+
673
+ <tr>
674
+
675
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
676
+
677
+ <td class="date">2012-01-22 15:46:58</td>
678
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
679
+ <td class="lines">34</td>
680
+ <td><pre class="code"> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>NodeExistsError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Node already in pool, replacement is not allowed.</span><span class='tstring_end'>&quot;</span></span></pre></td>
681
+ </tr>
682
+
683
+
684
+ <tr>
685
+
686
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
687
+
688
+ <td class="date">2012-01-21 14:44:16</td>
689
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
690
+ <td class="lines">35</td>
691
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
692
+ </tr>
693
+
694
+
695
+ <tr>
696
+
697
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
698
+
699
+ <td class="date">2012-01-22 21:35:53</td>
700
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
701
+ <td class="lines">36</td>
702
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
703
+ </tr>
704
+
705
+
706
+ <tr>
707
+
708
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
709
+
710
+ <td class="date">2012-01-21 14:44:16</td>
711
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
712
+ <td class="lines">37</td>
713
+ <td><pre class="code"> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>NodeNameError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Name must be kind of String or Symbol and can't be nil.</span><span class='tstring_end'>&quot;</span></span></pre></td>
714
+ </tr>
715
+
716
+
717
+ <tr>
718
+
719
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
720
+
721
+ <td class="date">2012-01-21 12:30:09</td>
722
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
723
+ <td class="lines">38</td>
724
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
725
+ </tr>
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-21 12:30:09</td>
733
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
734
+ <td class="lines">39</td>
735
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
736
+ </tr>
737
+
738
+ </table>
739
+ </td>
740
+ <td>
741
+ </tr>
742
+ </table>
743
+ </div>
744
+
745
+ </div>
746
+ <div id="method_missing_details" class="method_details_list">
747
+ <h2>Dynamic Method Handling</h2>
748
+ <p class="notice this">
749
+ This class handles dynamic methods through the <tt>method_missing</tt> method
750
+
751
+ </p>
752
+
753
+ <div class="method_details first">
754
+ <p class="signature first" id="method_missing-instance_method">
755
+
756
+ - (<tt>Object</tt>) <strong>method_missing</strong>(method, *args, &amp;block)
757
+
758
+
759
+
760
+ </p><table class="source_code blame">
761
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 207</span></caption>
762
+ <tr>
763
+ <td>
764
+ <table>
765
+
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-21 18:02:36</td>
773
+ <td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
774
+ <td class="lines">207</td>
775
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span> <span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</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-21 18:02:36</td>
784
+ <td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
785
+ <td class="lines">208</td>
786
+ <td><pre class="code"> <span class='kw'>if</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span> <span class='id identifier rubyid_method'>method</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-22 21:35:53</td>
795
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
796
+ <td class="lines">209</td>
797
+ <td><pre class="code"> <span class='ivar'>@container</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</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-22 21:35:53</td>
806
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
807
+ <td class="lines">210</td>
808
+ <td><pre class="code"> <span class='kw'>else</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-21 18:02:36</td>
817
+ <td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
818
+ <td class="lines">211</td>
819
+ <td><pre class="code"> <span class='id identifier rubyid_not_yet_implemented!'>not_yet_implemented!</span> <span class='id identifier rubyid_method'>method</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-21 18:02:36</td>
828
+ <td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
829
+ <td class="lines">212</td>
830
+ <td><pre class="code"> <span class='kw'>end</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-21 18:02:36</td>
839
+ <td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
840
+ <td class="lines">213</td>
841
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
842
+ </tr>
843
+
844
+ </table>
845
+ </td>
846
+ <td>
847
+ </tr>
848
+ </table>
849
+ </div>
850
+
851
+ </div>
852
+
853
+ <div id="instance_attr_details" class="attr_details">
854
+ <h2>Instance Attribute Details</h2>
855
+
856
+
857
+ <span id=""></span>
858
+ <span id="container-instance_method"></span>
859
+ <div class="method_details first">
860
+ <p class="signature first" id="container-instance_method">
861
+
862
+ - (<tt>StringIO</tt>) <strong>container</strong> <span class="extras">(readonly)</span>
863
+
864
+
865
+
866
+ </p><div class="docstring">
867
+ <div class="discussion">
868
+
869
+ <p>holds StringIO node</p>
870
+
871
+
872
+ </div>
873
+ </div>
874
+ <div class="tags">
875
+
876
+ <h3>Returns:</h3>
877
+ <ul class="return">
878
+
879
+ <li>
880
+
881
+
882
+ <span class='type'>(<tt>StringIO</tt>)</span>
883
+
884
+
885
+
886
+ </li>
887
+
888
+ </ul>
889
+
890
+ </div><table class="source_code blame">
891
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 17</span></caption>
892
+ <tr>
893
+ <td>
894
+ <table>
895
+
896
+
897
+
898
+ <tr>
899
+
900
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
901
+
902
+ <td class="date">2012-01-21 23:54:47</td>
903
+ <td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
904
+ <td class="lines">17</td>
905
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_container'>container</span></pre></td>
906
+ </tr>
907
+
908
+
909
+ <tr>
910
+
911
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
912
+
913
+ <td class="date">2012-01-22 21:35:53</td>
914
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
915
+ <td class="lines">18</td>
916
+ <td><pre class="code"> <span class='ivar'>@container</span></pre></td>
917
+ </tr>
918
+
919
+
920
+ <tr>
921
+
922
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
923
+
924
+ <td class="date">2012-01-21 23:54:47</td>
925
+ <td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
926
+ <td class="lines">19</td>
927
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
928
+ </tr>
929
+
930
+ </table>
931
+ </td>
932
+ <td>
933
+ </tr>
934
+ </table>
935
+ </div>
936
+
937
+
938
+ <span id=""></span>
939
+ <span id="node_name-instance_method"></span>
940
+ <div class="method_details ">
941
+ <p class="signature " id="node_name-instance_method">
942
+
943
+ - (<tt>String</tt>) <strong>node_name</strong> <span class="extras">(readonly)</span>
944
+
945
+
946
+
947
+ </p><div class="docstring">
948
+ <div class="discussion">
949
+
950
+ <p>Name of current node instance</p>
951
+
952
+
953
+ </div>
954
+ </div>
955
+ <div class="tags">
956
+
957
+ <h3>Returns:</h3>
958
+ <ul class="return">
959
+
960
+ <li>
961
+
962
+
963
+ <span class='type'>(<tt>String</tt>)</span>
964
+
965
+
966
+
967
+ </li>
968
+
969
+ </ul>
970
+
971
+ </div><table class="source_code blame">
972
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 13</span></caption>
973
+ <tr>
974
+ <td>
975
+ <table>
976
+
977
+
978
+
979
+ <tr>
980
+
981
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
982
+
983
+ <td class="date">2012-01-21 23:54:47</td>
984
+ <td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
985
+ <td class="lines">13</td>
986
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_node_name'>node_name</span></pre></td>
987
+ </tr>
988
+
989
+
990
+ <tr>
991
+
992
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
993
+
994
+ <td class="date">2012-01-22 21:35:53</td>
995
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
996
+ <td class="lines">14</td>
997
+ <td><pre class="code"> <span class='ivar'>@node_name</span></pre></td>
998
+ </tr>
999
+
1000
+
1001
+ <tr>
1002
+
1003
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1004
+
1005
+ <td class="date">2012-01-21 23:54:47</td>
1006
+ <td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
1007
+ <td class="lines">15</td>
1008
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
1009
+ </tr>
1010
+
1011
+ </table>
1012
+ </td>
1013
+ <td>
1014
+ </tr>
1015
+ </table>
1016
+ </div>
1017
+
1018
+ </div>
1019
+
1020
+
1021
+ <div id="class_method_details" class="method_details_list">
1022
+ <h2>Class Method Details</h2>
1023
+
1024
+
1025
+ <div class="method_details first">
1026
+ <p class="signature first" id="delete_instance-class_method">
1027
+
1028
+ + (<tt>Object</tt>) <strong>delete_instance</strong>(node_name_or_instance)
1029
+
1030
+
1031
+
1032
+ </p><div class="docstring">
1033
+ <div class="discussion">
1034
+
1035
+ <p>Deletes a single instance of the pool</p>
1036
+
1037
+
1038
+ </div>
1039
+ </div>
1040
+ <div class="tags">
1041
+ <h3>Parameters:</h3>
1042
+ <ul class="param">
1043
+
1044
+ <li>
1045
+
1046
+ <span class='name'>node</span>
1047
+
1048
+
1049
+ <span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>)</span>
1050
+
1051
+
1052
+
1053
+ &mdash;
1054
+ <div class='inline'>
1055
+ <p>instance</p>
1056
+ </div>
1057
+
1058
+ </li>
1059
+
1060
+ <li>
1061
+
1062
+ <span class='name'>name</span>
1063
+
1064
+
1065
+ <span class='type'>(<tt>String</tt>)</span>
1066
+
1067
+
1068
+
1069
+ &mdash;
1070
+ <div class='inline'>
1071
+ <p>of node as String</p>
1072
+ </div>
1073
+
1074
+ </li>
1075
+
1076
+ <li>
1077
+
1078
+ <span class='name'>name</span>
1079
+
1080
+
1081
+ <span class='type'>(<tt>Symbol</tt>)</span>
1082
+
1083
+
1084
+
1085
+ &mdash;
1086
+ <div class='inline'>
1087
+ <p>of node as Symbol</p>
1088
+ </div>
1089
+
1090
+ </li>
1091
+
1092
+ </ul>
1093
+
1094
+
1095
+ </div><table class="source_code blame">
1096
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 64</span></caption>
1097
+ <tr>
1098
+ <td>
1099
+ <table>
1100
+
1101
+
1102
+
1103
+ <tr>
1104
+
1105
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1106
+
1107
+ <td class="date">2012-01-22 21:35:53</td>
1108
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1109
+ <td class="lines">64</td>
1110
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_delete_instance'>delete_instance</span> <span class='id identifier rubyid_node_name_or_instance'>node_name_or_instance</span></pre></td>
1111
+ </tr>
1112
+
1113
+
1114
+ <tr>
1115
+
1116
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1117
+
1118
+ <td class="date">2012-01-22 21:35:53</td>
1119
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1120
+ <td class="lines">65</td>
1121
+ <td><pre class="code"> <span class='cvar'>@@instances</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span></pre></td>
1122
+ </tr>
1123
+
1124
+
1125
+ <tr>
1126
+
1127
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1128
+
1129
+ <td class="date">2012-01-22 21:35:53</td>
1130
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1131
+ <td class="lines">66</td>
1132
+ <td><pre class="code"> <span class='lparen'>(</span><span class='id identifier rubyid_node_name_or_instance'>node_name_or_instance</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Symbol</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span> <span class='op'>==</span> <span class='id identifier rubyid_node_name_or_instance'>node_name_or_instance</span><span class='rparen'>)</span> <span class='op'>||</span></pre></td>
1133
+ </tr>
1134
+
1135
+
1136
+ <tr>
1137
+
1138
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1139
+
1140
+ <td class="date">2012-01-22 21:35:53</td>
1141
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1142
+ <td class="lines">67</td>
1143
+ <td><pre class="code"> <span class='lparen'>(</span><span class='id identifier rubyid_node_name_or_instance'>node_name_or_instance</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span> <span class='op'>==</span> <span class='id identifier rubyid_node_name_or_instance'>node_name_or_instance</span><span class='rparen'>)</span> <span class='op'>||</span></pre></td>
1144
+ </tr>
1145
+
1146
+
1147
+ <tr>
1148
+
1149
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1150
+
1151
+ <td class="date">2012-01-21 14:44:16</td>
1152
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
1153
+ <td class="lines">68</td>
1154
+ <td><pre class="code"> <span class='lparen'>(</span><span class='id identifier rubyid_node_name_or_instance'>node_name_or_instance</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Base</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_node'>node</span> <span class='op'>==</span> <span class='id identifier rubyid_node_name_or_instance'>node_name_or_instance</span><span class='rparen'>)</span></pre></td>
1155
+ </tr>
1156
+
1157
+
1158
+ <tr>
1159
+
1160
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1161
+
1162
+ <td class="date">2012-01-21 14:44:16</td>
1163
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
1164
+ <td class="lines">69</td>
1165
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
1166
+ </tr>
1167
+
1168
+
1169
+ <tr>
1170
+
1171
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1172
+
1173
+ <td class="date">2012-01-21 14:44:16</td>
1174
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
1175
+ <td class="lines">70</td>
1176
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
1177
+ </tr>
1178
+
1179
+ </table>
1180
+ </td>
1181
+ <td>
1182
+ </tr>
1183
+ </table>
1184
+ </div>
1185
+
1186
+ <div class="method_details ">
1187
+ <p class="signature " id="instance_exists?-class_method">
1188
+
1189
+ + (<tt>Boolean</tt>) <strong>instance_exists?</strong>(node_name)
1190
+
1191
+
1192
+
1193
+ <span class="aliases">Also known as:
1194
+ <span class="names"><span id='instance_exist?-class_method'>instance_exist?</span>, <span id='exists?-class_method'>exists?</span>, <span id='exist?-class_method'>exist?</span></span>
1195
+ </span>
1196
+
1197
+ </p><div class="docstring">
1198
+ <div class="discussion">
1199
+
1200
+ <p>Checks for existence of a node</p>
1201
+
1202
+
1203
+ </div>
1204
+ </div>
1205
+ <div class="tags">
1206
+ <h3>Parameters:</h3>
1207
+ <ul class="param">
1208
+
1209
+ <li>
1210
+
1211
+ <span class='name'>name</span>
1212
+
1213
+
1214
+ <span class='type'>(<tt>String</tt>)</span>
1215
+
1216
+
1217
+
1218
+ &mdash;
1219
+ <div class='inline'>
1220
+ <p>of node as String</p>
1221
+ </div>
1222
+
1223
+ </li>
1224
+
1225
+ <li>
1226
+
1227
+ <span class='name'>name</span>
1228
+
1229
+
1230
+ <span class='type'>(<tt>Symbol</tt>)</span>
1231
+
1232
+
1233
+
1234
+ &mdash;
1235
+ <div class='inline'>
1236
+ <p>of node as Symbol</p>
1237
+ </div>
1238
+
1239
+ </li>
1240
+
1241
+ </ul>
1242
+
1243
+ <h3>Returns:</h3>
1244
+ <ul class="return">
1245
+
1246
+ <li>
1247
+
1248
+
1249
+ <span class='type'>(<tt>Boolean</tt>)</span>
1250
+
1251
+
1252
+
1253
+ </li>
1254
+
1255
+ </ul>
1256
+
1257
+ </div><table class="source_code blame">
1258
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 118</span></caption>
1259
+ <tr>
1260
+ <td>
1261
+ <table>
1262
+
1263
+
1264
+
1265
+ <tr>
1266
+
1267
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1268
+
1269
+ <td class="date">2012-01-22 21:35:53</td>
1270
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1271
+ <td class="lines">118</td>
1272
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_instance_exists?'>instance_exists?</span> <span class='id identifier rubyid_node_name'>node_name</span></pre></td>
1273
+ </tr>
1274
+
1275
+
1276
+ <tr>
1277
+
1278
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1279
+
1280
+ <td class="date">2012-01-22 21:35:53</td>
1281
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1282
+ <td class="lines">119</td>
1283
+ <td><pre class="code"> <span class='comment'># we need to check for node_name, otherwise it will fail though node exists</pre></td>
1284
+ </tr>
1285
+
1286
+
1287
+ <tr>
1288
+
1289
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1290
+
1291
+ <td class="date">2012-01-22 15:46:58</td>
1292
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
1293
+ <td class="lines">120</td>
1294
+ <td><pre class="code"></span> <span class='op'>!</span><span class='id identifier rubyid_instances'>instances</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_node_name'>node_name</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_instances'>instances</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:node_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_node_name'>node_name</span><span class='rparen'>)</span></pre></td>
1295
+ </tr>
1296
+
1297
+
1298
+ <tr>
1299
+
1300
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1301
+
1302
+ <td class="date">2012-01-22 15:46:58</td>
1303
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
1304
+ <td class="lines">121</td>
1305
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
1306
+ </tr>
1307
+
1308
+ </table>
1309
+ </td>
1310
+ <td>
1311
+ </tr>
1312
+ </table>
1313
+ </div>
1314
+
1315
+ <div class="method_details ">
1316
+ <p class="signature " id="instances-class_method">
1317
+
1318
+ + (<tt>Array</tt>) <strong>instances</strong>
1319
+
1320
+
1321
+
1322
+ <span class="aliases">Also known as:
1323
+ <span class="names"><span id='pool-class_method'>pool</span>, <span id='nodes-class_method'>nodes</span></span>
1324
+ </span>
1325
+
1326
+ </p><div class="docstring">
1327
+ <div class="discussion">
1328
+
1329
+ <p>Current instances</p>
1330
+
1331
+
1332
+ </div>
1333
+ </div>
1334
+ <div class="tags">
1335
+
1336
+ <h3>Returns:</h3>
1337
+ <ul class="return">
1338
+
1339
+ <li>
1340
+
1341
+
1342
+ <span class='type'>(<tt>Array</tt>)</span>
1343
+
1344
+
1345
+
1346
+ &mdash;
1347
+ <div class='inline'>
1348
+ <p>current instances</p>
1349
+ </div>
1350
+
1351
+ </li>
1352
+
1353
+ </ul>
1354
+
1355
+ </div><table class="source_code blame">
1356
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 46</span></caption>
1357
+ <tr>
1358
+ <td>
1359
+ <table>
1360
+
1361
+
1362
+
1363
+ <tr>
1364
+
1365
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1366
+
1367
+ <td class="date">2012-01-21 14:44:16</td>
1368
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
1369
+ <td class="lines">46</td>
1370
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_instances'>instances</span></pre></td>
1371
+ </tr>
1372
+
1373
+
1374
+ <tr>
1375
+
1376
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1377
+
1378
+ <td class="date">2012-01-21 14:44:16</td>
1379
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
1380
+ <td class="lines">47</td>
1381
+ <td><pre class="code"> <span class='cvar'>@@instances</span></pre></td>
1382
+ </tr>
1383
+
1384
+
1385
+ <tr>
1386
+
1387
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1388
+
1389
+ <td class="date">2012-01-22 21:35:53</td>
1390
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1391
+ <td class="lines">48</td>
1392
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
1393
+ </tr>
1394
+
1395
+ </table>
1396
+ </td>
1397
+ <td>
1398
+ </tr>
1399
+ </table>
1400
+ </div>
1401
+
1402
+ <div class="method_details ">
1403
+ <p class="signature " id="load_instances-class_method">
1404
+
1405
+ + (<tt>Boolean</tt>) <strong>load_instances</strong>(source)
1406
+
1407
+
1408
+
1409
+ </p><div class="docstring">
1410
+ <div class="discussion">
1411
+
1412
+ <p>Loads instances from disk</p>
1413
+
1414
+
1415
+ </div>
1416
+ </div>
1417
+ <div class="tags">
1418
+ <h3>Parameters:</h3>
1419
+ <ul class="param">
1420
+
1421
+ <li>
1422
+
1423
+ <span class='name'>Directory</span>
1424
+
1425
+
1426
+ <span class='type'>(<tt>String</tt>)</span>
1427
+
1428
+
1429
+
1430
+ &mdash;
1431
+ <div class='inline'>
1432
+ <p>name</p>
1433
+ </div>
1434
+
1435
+ </li>
1436
+
1437
+ <li>
1438
+
1439
+ <span class='name'>File</span>
1440
+
1441
+
1442
+ <span class='type'>(<tt>Array</tt>)</span>
1443
+
1444
+
1445
+
1446
+ &mdash;
1447
+ <div class='inline'>
1448
+ <p>names (HINT: you can provide a Dir.glob)</p>
1449
+ </div>
1450
+
1451
+ </li>
1452
+
1453
+ </ul>
1454
+
1455
+ <h3>Returns:</h3>
1456
+ <ul class="return">
1457
+
1458
+ <li>
1459
+
1460
+
1461
+ <span class='type'>(<tt>Boolean</tt>)</span>
1462
+
1463
+
1464
+
1465
+ </li>
1466
+
1467
+ </ul>
1468
+
1469
+ </div><table class="source_code blame">
1470
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 77</span></caption>
1471
+ <tr>
1472
+ <td>
1473
+ <table>
1474
+
1475
+
1476
+
1477
+ <tr>
1478
+
1479
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1480
+
1481
+ <td class="date">2012-01-22 21:35:53</td>
1482
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1483
+ <td class="lines">77</td>
1484
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_load_instances'>load_instances</span> <span class='id identifier rubyid_source'>source</span></pre></td>
1485
+ </tr>
1486
+
1487
+
1488
+ <tr>
1489
+
1490
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1491
+
1492
+ <td class="date">2012-01-22 21:35:53</td>
1493
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1494
+ <td class="lines">78</td>
1495
+ <td><pre class="code"> <span class='kw'>case</span> <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span></pre></td>
1496
+ </tr>
1497
+
1498
+
1499
+ <tr>
1500
+
1501
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1502
+
1503
+ <td class="date">2012-01-22 21:35:53</td>
1504
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1505
+ <td class="lines">79</td>
1506
+ <td><pre class="code"> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Array</span><span class='tstring_end'>&quot;</span></span></pre></td>
1507
+ </tr>
1508
+
1509
+
1510
+ <tr>
1511
+
1512
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1513
+
1514
+ <td class="date">2012-01-22 21:35:53</td>
1515
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1516
+ <td class="lines">80</td>
1517
+ <td><pre class="code"> <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file_name'>file_name</span><span class='op'>|</span></pre></td>
1518
+ </tr>
1519
+
1520
+
1521
+ <tr>
1522
+
1523
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1524
+
1525
+ <td class="date">2012-01-22 21:35:53</td>
1526
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1527
+ <td class="lines">81</td>
1528
+ <td><pre class="code"> <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span></pre></td>
1529
+ </tr>
1530
+
1531
+
1532
+ <tr>
1533
+
1534
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1535
+
1536
+ <td class="date">2012-01-22 21:35:53</td>
1537
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1538
+ <td class="lines">82</td>
1539
+ <td><pre class="code"> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span></pre></td>
1540
+ </tr>
1541
+
1542
+
1543
+ <tr>
1544
+
1545
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1546
+
1547
+ <td class="date">2012-01-22 21:35:53</td>
1548
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1549
+ <td class="lines">83</td>
1550
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
1551
+ </tr>
1552
+
1553
+
1554
+ <tr>
1555
+
1556
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1557
+
1558
+ <td class="date">2012-01-22 21:35:53</td>
1559
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1560
+ <td class="lines">84</td>
1561
+ <td><pre class="code"> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>String</span><span class='tstring_end'>&quot;</span></span></pre></td>
1562
+ </tr>
1563
+
1564
+
1565
+ <tr>
1566
+
1567
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1568
+
1569
+ <td class="date">2012-01-22 21:35:53</td>
1570
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1571
+ <td class="lines">85</td>
1572
+ <td><pre class="code"> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_directory?'>directory?</span><span class='lparen'>(</span><span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span></pre></td>
1573
+ </tr>
1574
+
1575
+
1576
+ <tr>
1577
+
1578
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1579
+
1580
+ <td class="date">2012-01-22 21:35:53</td>
1581
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1582
+ <td class="lines">86</td>
1583
+ <td><pre class="code"> <span class='const'>Dir</span><span class='lbracket'>[</span><span class='id identifier rubyid_source'>source</span><span class='op'>+</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/**/*</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file_name'>file_name</span><span class='op'>|</span></pre></td>
1584
+ </tr>
1585
+
1586
+
1587
+ <tr>
1588
+
1589
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1590
+
1591
+ <td class="date">2012-01-22 21:35:53</td>
1592
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1593
+ <td class="lines">87</td>
1594
+ <td><pre class="code"> <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span></pre></td>
1595
+ </tr>
1596
+
1597
+
1598
+ <tr>
1599
+
1600
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1601
+
1602
+ <td class="date">2012-01-22 21:35:53</td>
1603
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1604
+ <td class="lines">88</td>
1605
+ <td><pre class="code"> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span></pre></td>
1606
+ </tr>
1607
+
1608
+
1609
+ <tr>
1610
+
1611
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1612
+
1613
+ <td class="date">2012-01-22 21:35:53</td>
1614
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1615
+ <td class="lines">89</td>
1616
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
1617
+ </tr>
1618
+
1619
+
1620
+ <tr>
1621
+
1622
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1623
+
1624
+ <td class="date">2012-01-22 21:35:53</td>
1625
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1626
+ <td class="lines">90</td>
1627
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
1628
+ </tr>
1629
+
1630
+
1631
+ <tr>
1632
+
1633
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1634
+
1635
+ <td class="date">2012-01-22 21:35:53</td>
1636
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1637
+ <td class="lines">91</td>
1638
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
1639
+ </tr>
1640
+
1641
+
1642
+ <tr>
1643
+
1644
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1645
+
1646
+ <td class="date">2012-01-22 21:35:53</td>
1647
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1648
+ <td class="lines">92</td>
1649
+ <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'>Input must be a kind of Array or String (but was: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbrace'>}</span><span class='tstring_content'>).</span><span class='tstring_end'>&quot;</span></span></pre></td>
1650
+ </tr>
1651
+
1652
+
1653
+ <tr>
1654
+
1655
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1656
+
1657
+ <td class="date">2012-01-22 21:35:53</td>
1658
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1659
+ <td class="lines">93</td>
1660
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
1661
+ </tr>
1662
+
1663
+
1664
+ <tr>
1665
+
1666
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1667
+
1668
+ <td class="date">2012-01-22 21:35:53</td>
1669
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1670
+ <td class="lines">94</td>
1671
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
1672
+ </tr>
1673
+
1674
+ </table>
1675
+ </td>
1676
+ <td>
1677
+ </tr>
1678
+ </table>
1679
+ </div>
1680
+
1681
+ <div class="method_details ">
1682
+ <p class="signature " id="open-class_method">
1683
+
1684
+ + (<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>) <strong>open</strong>(node_name, *args)
1685
+
1686
+
1687
+
1688
+ <span class="aliases">Also known as:
1689
+ <span class="names"><span id='open_node-class_method'>open_node</span></span>
1690
+ </span>
1691
+
1692
+ </p><div class="docstring">
1693
+ <div class="discussion">
1694
+
1695
+ <p>Itself on success</p>
1696
+
1697
+
1698
+ </div>
1699
+ </div>
1700
+ <div class="tags">
1701
+
1702
+ <h3>Returns:</h3>
1703
+ <ul class="return">
1704
+
1705
+ <li>
1706
+
1707
+
1708
+ <span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>)</span>
1709
+
1710
+
1711
+
1712
+ &mdash;
1713
+ <div class='inline'>
1714
+ <p>itself on success</p>
1715
+ </div>
1716
+
1717
+ </li>
1718
+
1719
+ </ul>
1720
+ <h3>Raises:</h3>
1721
+ <ul class="raise">
1722
+
1723
+ <li>
1724
+
1725
+
1726
+ <span class='type'>(<tt>NodeNotFoundError</tt>)</span>
1727
+
1728
+
1729
+
1730
+ </li>
1731
+
1732
+ </ul>
1733
+
1734
+ </div><table class="source_code blame">
1735
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 128</span></caption>
1736
+ <tr>
1737
+ <td>
1738
+ <table>
1739
+
1740
+
1741
+
1742
+ <tr>
1743
+
1744
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1745
+
1746
+ <td class="date">2012-01-22 21:35:53</td>
1747
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1748
+ <td class="lines">128</td>
1749
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_open'>open</span> <span class='id identifier rubyid_node_name'>node_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span></pre></td>
1750
+ </tr>
1751
+
1752
+
1753
+ <tr>
1754
+
1755
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1756
+
1757
+ <td class="date">2012-01-21 12:30:09</td>
1758
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1759
+ <td class="lines">129</td>
1760
+ <td><pre class="code"> <span class='kw'>if</span> <span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_instance_exists?'>instance_exists?</span> <span class='id identifier rubyid_node_name'>node_name</span></pre></td>
1761
+ </tr>
1762
+
1763
+
1764
+ <tr>
1765
+
1766
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1767
+
1768
+ <td class="date">2012-01-22 21:35:53</td>
1769
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1770
+ <td class="lines">130</td>
1771
+ <td><pre class="code"> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span></pre></td>
1772
+ </tr>
1773
+
1774
+
1775
+ <tr>
1776
+
1777
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1778
+
1779
+ <td class="date">2012-01-22 21:35:53</td>
1780
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1781
+ <td class="lines">131</td>
1782
+ <td><pre class="code"> <span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='symbol'>:load</span><span class='comma'>,</span> <span class='id identifier rubyid_node_name'>node_name</span></pre></td>
1783
+ </tr>
1784
+
1785
+
1786
+ <tr>
1787
+
1788
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1789
+
1790
+ <td class="date">2012-01-21 12:30:09</td>
1791
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1792
+ <td class="lines">132</td>
1793
+ <td><pre class="code"> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_reopen'>reopen</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_container'>container</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_container'>container</span><span class='period'>.</span><span class='id identifier rubyid_closed_write?'>closed_write?</span></pre></td>
1794
+ </tr>
1795
+
1796
+
1797
+ <tr>
1798
+
1799
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1800
+
1801
+ <td class="date">2012-01-22 16:18:47</td>
1802
+ <td class="commit"><a title="Update specs for some exceptions.">53887b37</a><td>
1803
+ <td class="lines">133</td>
1804
+ <td><pre class="code"> <span class='kw'>yield</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span><span class='rparen'>)</span></pre></td>
1805
+ </tr>
1806
+
1807
+
1808
+ <tr>
1809
+
1810
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1811
+
1812
+ <td class="date">2012-01-22 16:18:47</td>
1813
+ <td class="commit"><a title="Update specs for some exceptions.">53887b37</a><td>
1814
+ <td class="lines">134</td>
1815
+ <td><pre class="code"> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_container'>container</span><span class='period'>.</span><span class='id identifier rubyid_close_write'>close_write</span></pre></td>
1816
+ </tr>
1817
+
1818
+
1819
+ <tr>
1820
+
1821
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1822
+
1823
+ <td class="date">2012-01-21 12:30:09</td>
1824
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1825
+ <td class="lines">135</td>
1826
+ <td><pre class="code"> <span class='id identifier rubyid_base'>base</span></pre></td>
1827
+ </tr>
1828
+
1829
+
1830
+ <tr>
1831
+
1832
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1833
+
1834
+ <td class="date">2012-01-21 12:30:09</td>
1835
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1836
+ <td class="lines">136</td>
1837
+ <td><pre class="code"></pre></td>
1838
+ </tr>
1839
+
1840
+
1841
+ <tr>
1842
+
1843
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1844
+
1845
+ <td class="date">2012-01-22 21:35:53</td>
1846
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1847
+ <td class="lines">137</td>
1848
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
1849
+ </tr>
1850
+
1851
+
1852
+ <tr>
1853
+
1854
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1855
+
1856
+ <td class="date">2012-01-22 21:35:53</td>
1857
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1858
+ <td class="lines">138</td>
1859
+ <td><pre class="code"> <span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='symbol'>:load</span><span class='comma'>,</span> <span class='id identifier rubyid_node_name'>node_name</span></pre></td>
1860
+ </tr>
1861
+
1862
+
1863
+ <tr>
1864
+
1865
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1866
+
1867
+ <td class="date">2012-01-22 21:35:53</td>
1868
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1869
+ <td class="lines">139</td>
1870
+ <td><pre class="code"> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_reopen'>reopen</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_container'>container</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_container'>container</span><span class='period'>.</span><span class='id identifier rubyid_closed_write?'>closed_write?</span></pre></td>
1871
+ </tr>
1872
+
1873
+
1874
+ <tr>
1875
+
1876
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1877
+
1878
+ <td class="date">2012-01-21 12:30:09</td>
1879
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1880
+ <td class="lines">140</td>
1881
+ <td><pre class="code"> <span class='id identifier rubyid_base'>base</span></pre></td>
1882
+ </tr>
1883
+
1884
+
1885
+ <tr>
1886
+
1887
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1888
+
1889
+ <td class="date">2012-01-21 12:30:09</td>
1890
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1891
+ <td class="lines">141</td>
1892
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
1893
+ </tr>
1894
+
1895
+
1896
+ <tr>
1897
+
1898
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1899
+
1900
+ <td class="date">2012-01-21 12:30:09</td>
1901
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1902
+ <td class="lines">142</td>
1903
+ <td><pre class="code"></pre></td>
1904
+ </tr>
1905
+
1906
+
1907
+ <tr>
1908
+
1909
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1910
+
1911
+ <td class="date">2012-01-22 15:46:58</td>
1912
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
1913
+ <td class="lines">143</td>
1914
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
1915
+ </tr>
1916
+
1917
+
1918
+ <tr>
1919
+
1920
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1921
+
1922
+ <td class="date">2012-01-21 12:30:09</td>
1923
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1924
+ <td class="lines">144</td>
1925
+ <td><pre class="code"> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>NodeNotFoundError</span></pre></td>
1926
+ </tr>
1927
+
1928
+
1929
+ <tr>
1930
+
1931
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1932
+
1933
+ <td class="date">2012-01-21 12:30:09</td>
1934
+ <td class="commit"><a title="Update stuff">bfd768dc</a><td>
1935
+ <td class="lines">145</td>
1936
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
1937
+ </tr>
1938
+
1939
+
1940
+ <tr>
1941
+
1942
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1943
+
1944
+ <td class="date">2012-01-22 21:35:53</td>
1945
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
1946
+ <td class="lines">146</td>
1947
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
1948
+ </tr>
1949
+
1950
+ </table>
1951
+ </td>
1952
+ <td>
1953
+ </tr>
1954
+ </table>
1955
+ </div>
1956
+
1957
+ <div class="method_details ">
1958
+ <p class="signature " id="purge_instances!-class_method">
1959
+
1960
+ + (<tt>Boolean</tt>) <strong>purge_instances!</strong>
1961
+
1962
+
1963
+
1964
+ </p><div class="docstring">
1965
+ <div class="discussion">
1966
+
1967
+ <p>Deletes ALL instances in the pool!</p>
1968
+
1969
+
1970
+ </div>
1971
+ </div>
1972
+ <div class="tags">
1973
+
1974
+ <h3>Returns:</h3>
1975
+ <ul class="return">
1976
+
1977
+ <li>
1978
+
1979
+
1980
+ <span class='type'>(<tt>Boolean</tt>)</span>
1981
+
1982
+
1983
+
1984
+ </li>
1985
+
1986
+ </ul>
1987
+
1988
+ </div><table class="source_code blame">
1989
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 55</span></caption>
1990
+ <tr>
1991
+ <td>
1992
+ <table>
1993
+
1994
+
1995
+
1996
+ <tr>
1997
+
1998
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
1999
+
2000
+ <td class="date">2012-01-22 15:46:58</td>
2001
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
2002
+ <td class="lines">55</td>
2003
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_purge_instances!'>purge_instances!</span></pre></td>
2004
+ </tr>
2005
+
2006
+
2007
+ <tr>
2008
+
2009
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2010
+
2011
+ <td class="date">2012-01-21 14:44:16</td>
2012
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
2013
+ <td class="lines">56</td>
2014
+ <td><pre class="code"> <span class='cvar'>@@instances</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='kw'>and</span> <span class='kw'>true</span></pre></td>
2015
+ </tr>
2016
+
2017
+
2018
+ <tr>
2019
+
2020
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2021
+
2022
+ <td class="date">2012-01-21 14:44:16</td>
2023
+ <td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
2024
+ <td class="lines">57</td>
2025
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
2026
+ </tr>
2027
+
2028
+ </table>
2029
+ </td>
2030
+ <td>
2031
+ </tr>
2032
+ </table>
2033
+ </div>
2034
+
2035
+ <div class="method_details ">
2036
+ <p class="signature " id="save_instances-class_method">
2037
+
2038
+ + (<tt>Boolean</tt>) <strong>save_instances</strong>
2039
+
2040
+
2041
+
2042
+ </p><div class="docstring">
2043
+ <div class="discussion">
2044
+
2045
+ <p>Saves all instances to disk</p>
2046
+
2047
+
2048
+ </div>
2049
+ </div>
2050
+ <div class="tags">
2051
+
2052
+ <h3>Returns:</h3>
2053
+ <ul class="return">
2054
+
2055
+ <li>
2056
+
2057
+
2058
+ <span class='type'>(<tt>Boolean</tt>)</span>
2059
+
2060
+
2061
+
2062
+ </li>
2063
+
2064
+ </ul>
2065
+
2066
+ </div><table class="source_code blame">
2067
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 99</span></caption>
2068
+ <tr>
2069
+ <td>
2070
+ <table>
2071
+
2072
+
2073
+
2074
+ <tr>
2075
+
2076
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2077
+
2078
+ <td class="date">2012-01-22 21:35:53</td>
2079
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2080
+ <td class="lines">99</td>
2081
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_save_instances'>save_instances</span></pre></td>
2082
+ </tr>
2083
+
2084
+
2085
+ <tr>
2086
+
2087
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2088
+
2089
+ <td class="date">2012-01-22 21:35:53</td>
2090
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2091
+ <td class="lines">100</td>
2092
+ <td><pre class="code"> <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='cvar'>@@instances</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_result'>result</span><span class='comma'>,</span> <span class='id identifier rubyid_node'>node</span><span class='op'>|</span></pre></td>
2093
+ </tr>
2094
+
2095
+
2096
+ <tr>
2097
+
2098
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2099
+
2100
+ <td class="date">2012-01-22 21:35:53</td>
2101
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2102
+ <td class="lines">101</td>
2103
+ <td><pre class="code"> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fh'>fh</span><span class='op'>|</span></pre></td>
2104
+ </tr>
2105
+
2106
+
2107
+ <tr>
2108
+
2109
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2110
+
2111
+ <td class="date">2012-01-22 21:35:53</td>
2112
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2113
+ <td class="lines">102</td>
2114
+ <td><pre class="code"> <span class='id identifier rubyid_fh'>fh</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span></pre></td>
2115
+ </tr>
2116
+
2117
+
2118
+ <tr>
2119
+
2120
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2121
+
2122
+ <td class="date">2012-01-22 21:35:53</td>
2123
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2124
+ <td class="lines">103</td>
2125
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
2126
+ </tr>
2127
+
2128
+
2129
+ <tr>
2130
+
2131
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2132
+
2133
+ <td class="date">2012-01-22 15:46:58</td>
2134
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
2135
+ <td class="lines">104</td>
2136
+ <td><pre class="code"> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='symbol'>:failed</span> <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span><span class='rparen'>)</span></pre></td>
2137
+ </tr>
2138
+
2139
+
2140
+ <tr>
2141
+
2142
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2143
+
2144
+ <td class="date">2012-01-22 21:35:53</td>
2145
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2146
+ <td class="lines">105</td>
2147
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
2148
+ </tr>
2149
+
2150
+
2151
+ <tr>
2152
+
2153
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2154
+
2155
+ <td class="date">2012-01-22 21:35:53</td>
2156
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2157
+ <td class="lines">106</td>
2158
+ <td><pre class="code"> <span class='kw'>if</span> <span class='id identifier rubyid_results'>results</span></pre></td>
2159
+ </tr>
2160
+
2161
+
2162
+ <tr>
2163
+
2164
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2165
+
2166
+ <td class="date">2012-01-22 21:35:53</td>
2167
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2168
+ <td class="lines">107</td>
2169
+ <td><pre class="code"> <span class='kw'>false</span></pre></td>
2170
+ </tr>
2171
+
2172
+
2173
+ <tr>
2174
+
2175
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2176
+
2177
+ <td class="date">2012-01-22 21:35:53</td>
2178
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2179
+ <td class="lines">108</td>
2180
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
2181
+ </tr>
2182
+
2183
+
2184
+ <tr>
2185
+
2186
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2187
+
2188
+ <td class="date">2012-01-22 21:35:53</td>
2189
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2190
+ <td class="lines">109</td>
2191
+ <td><pre class="code"> <span class='kw'>true</span></pre></td>
2192
+ </tr>
2193
+
2194
+
2195
+ <tr>
2196
+
2197
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2198
+
2199
+ <td class="date">2012-01-22 21:35:53</td>
2200
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2201
+ <td class="lines">110</td>
2202
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
2203
+ </tr>
2204
+
2205
+
2206
+ <tr>
2207
+
2208
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2209
+
2210
+ <td class="date">2012-01-22 21:35:53</td>
2211
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2212
+ <td class="lines">111</td>
2213
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
2214
+ </tr>
2215
+
2216
+ </table>
2217
+ </td>
2218
+ <td>
2219
+ </tr>
2220
+ </table>
2221
+ </div>
2222
+
2223
+ </div>
2224
+
2225
+ <div id="instance_method_details" class="method_details_list">
2226
+ <h2>Instance Method Details</h2>
2227
+
2228
+
2229
+ <div class="method_details first">
2230
+ <p class="signature first" id="file_exists?-instance_method">
2231
+
2232
+ - (<tt>Boolean</tt>) <strong>file_exists?</strong>(file_name = nil)
2233
+
2234
+
2235
+
2236
+ <span class="aliases">Also known as:
2237
+ <span class="names"><span id='file_exist?-instance_method'>file_exist?</span></span>
2238
+ </span>
2239
+
2240
+ </p><div class="docstring">
2241
+ <div class="discussion">
2242
+
2243
+
2244
+ </div>
2245
+ </div>
2246
+ <div class="tags">
2247
+
2248
+ <h3>Returns:</h3>
2249
+ <ul class="return">
2250
+
2251
+ <li>
2252
+
2253
+
2254
+ <span class='type'>(<tt>Boolean</tt>)</span>
2255
+
2256
+
2257
+
2258
+ </li>
2259
+
2260
+ </ul>
2261
+
2262
+ </div><table class="source_code blame">
2263
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 190</span></caption>
2264
+ <tr>
2265
+ <td>
2266
+ <table>
2267
+
2268
+
2269
+
2270
+ <tr>
2271
+
2272
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2273
+
2274
+ <td class="date">2012-01-22 21:35:53</td>
2275
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2276
+ <td class="lines">190</td>
2277
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_file_exists?'>file_exists?</span> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='kw'>nil</span></pre></td>
2278
+ </tr>
2279
+
2280
+
2281
+ <tr>
2282
+
2283
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2284
+
2285
+ <td class="date">2012-01-21 20:50:50</td>
2286
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2287
+ <td class="lines">191</td>
2288
+ <td><pre class="code"> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span></pre></td>
2289
+ </tr>
2290
+
2291
+
2292
+ <tr>
2293
+
2294
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2295
+
2296
+ <td class="date">2012-01-21 20:02:53</td>
2297
+ <td class="commit"><a title="Fix respond_to logic and exception.">2bfef608</a><td>
2298
+ <td class="lines">192</td>
2299
+ <td><pre class="code"> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span></pre></td>
2300
+ </tr>
2301
+
2302
+
2303
+ <tr>
2304
+
2305
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2306
+
2307
+ <td class="date">2012-01-21 20:02:53</td>
2308
+ <td class="commit"><a title="Fix respond_to logic and exception.">2bfef608</a><td>
2309
+ <td class="lines">193</td>
2310
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
2311
+ </tr>
2312
+
2313
+ </table>
2314
+ </td>
2315
+ <td>
2316
+ </tr>
2317
+ </table>
2318
+ </div>
2319
+
2320
+ <div class="method_details ">
2321
+ <p class="signature " id="load_from_file-instance_method">
2322
+
2323
+ - (<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>) <strong>load_from_file</strong>(file_name = nil)
2324
+
2325
+
2326
+
2327
+ </p><div class="docstring">
2328
+ <div class="discussion">
2329
+
2330
+ <p>Itself on success</p>
2331
+
2332
+
2333
+ </div>
2334
+ </div>
2335
+ <div class="tags">
2336
+
2337
+ <h3>Returns:</h3>
2338
+ <ul class="return">
2339
+
2340
+ <li>
2341
+
2342
+
2343
+ <span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>)</span>
2344
+
2345
+
2346
+
2347
+ &mdash;
2348
+ <div class='inline'>
2349
+ <p>itself on success</p>
2350
+ </div>
2351
+
2352
+ </li>
2353
+
2354
+ </ul>
2355
+ <h3>Raises:</h3>
2356
+ <ul class="raise">
2357
+
2358
+ <li>
2359
+
2360
+
2361
+ <span class='type'>(<tt>FileNotFoundError</tt>)</span>
2362
+
2363
+
2364
+
2365
+ </li>
2366
+
2367
+ </ul>
2368
+
2369
+ </div><table class="source_code blame">
2370
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 165</span></caption>
2371
+ <tr>
2372
+ <td>
2373
+ <table>
2374
+
2375
+
2376
+
2377
+ <tr>
2378
+
2379
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2380
+
2381
+ <td class="date">2012-01-22 21:35:53</td>
2382
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2383
+ <td class="lines">165</td>
2384
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_load_from_file'>load_from_file</span> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='kw'>nil</span></pre></td>
2385
+ </tr>
2386
+
2387
+
2388
+ <tr>
2389
+
2390
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2391
+
2392
+ <td class="date">2012-01-21 20:50:50</td>
2393
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2394
+ <td class="lines">166</td>
2395
+ <td><pre class="code"> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span></pre></td>
2396
+ </tr>
2397
+
2398
+
2399
+ <tr>
2400
+
2401
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2402
+
2403
+ <td class="date">2012-01-21 20:50:50</td>
2404
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2405
+ <td class="lines">167</td>
2406
+ <td><pre class="code"> <span class='kw'>if</span> <span class='id identifier rubyid_file_exists?'>file_exists?</span> <span class='id identifier rubyid_file_name'>file_name</span></pre></td>
2407
+ </tr>
2408
+
2409
+
2410
+ <tr>
2411
+
2412
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2413
+
2414
+ <td class="date">2012-01-21 23:54:47</td>
2415
+ <td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
2416
+ <td class="lines">168</td>
2417
+ <td><pre class="code"> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_container'>container</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span></pre></td>
2418
+ </tr>
2419
+
2420
+
2421
+ <tr>
2422
+
2423
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2424
+
2425
+ <td class="date">2012-01-21 20:50:50</td>
2426
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2427
+ <td class="lines">169</td>
2428
+ <td><pre class="code"> <span class='kw'>self</span></pre></td>
2429
+ </tr>
2430
+
2431
+
2432
+ <tr>
2433
+
2434
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2435
+
2436
+ <td class="date">2012-01-22 21:35:53</td>
2437
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2438
+ <td class="lines">170</td>
2439
+ <td><pre class="code"> <span class='kw'>else</span></pre></td>
2440
+ </tr>
2441
+
2442
+
2443
+ <tr>
2444
+
2445
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2446
+
2447
+ <td class="date">2012-01-21 20:50:50</td>
2448
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2449
+ <td class="lines">171</td>
2450
+ <td><pre class="code"> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>FileNotFoundError</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span></pre></td>
2451
+ </tr>
2452
+
2453
+
2454
+ <tr>
2455
+
2456
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2457
+
2458
+ <td class="date">2012-01-21 20:02:53</td>
2459
+ <td class="commit"><a title="Fix respond_to logic and exception.">2bfef608</a><td>
2460
+ <td class="lines">172</td>
2461
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
2462
+ </tr>
2463
+
2464
+
2465
+ <tr>
2466
+
2467
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2468
+
2469
+ <td class="date">2012-01-21 20:02:53</td>
2470
+ <td class="commit"><a title="Fix respond_to logic and exception.">2bfef608</a><td>
2471
+ <td class="lines">173</td>
2472
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
2473
+ </tr>
2474
+
2475
+ </table>
2476
+ </td>
2477
+ <td>
2478
+ </tr>
2479
+ </table>
2480
+ </div>
2481
+
2482
+ <div class="method_details ">
2483
+ <p class="signature " id="save_to_file-instance_method">
2484
+
2485
+ - (<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>) <strong>save_to_file</strong>(file_name = nil)
2486
+
2487
+
2488
+
2489
+ </p><div class="docstring">
2490
+ <div class="discussion">
2491
+
2492
+ <p>Itself on success</p>
2493
+
2494
+
2495
+ </div>
2496
+ </div>
2497
+ <div class="tags">
2498
+
2499
+ <h3>Returns:</h3>
2500
+ <ul class="return">
2501
+
2502
+ <li>
2503
+
2504
+
2505
+ <span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>)</span>
2506
+
2507
+
2508
+
2509
+ &mdash;
2510
+ <div class='inline'>
2511
+ <p>itself on success</p>
2512
+ </div>
2513
+
2514
+ </li>
2515
+
2516
+ </ul>
2517
+ <h3>Raises:</h3>
2518
+ <ul class="raise">
2519
+
2520
+ <li>
2521
+
2522
+
2523
+ <span class='type'>(<tt>FileAccessError</tt>)</span>
2524
+
2525
+
2526
+
2527
+ </li>
2528
+
2529
+ </ul>
2530
+
2531
+ </div><table class="source_code blame">
2532
+ <caption><span class="info file"># File 'lib/io_shuten/base.rb', line 177</span></caption>
2533
+ <tr>
2534
+ <td>
2535
+ <table>
2536
+
2537
+
2538
+
2539
+ <tr>
2540
+
2541
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2542
+
2543
+ <td class="date">2012-01-22 21:35:53</td>
2544
+ <td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
2545
+ <td class="lines">177</td>
2546
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_save_to_file'>save_to_file</span> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='kw'>nil</span></pre></td>
2547
+ </tr>
2548
+
2549
+
2550
+ <tr>
2551
+
2552
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2553
+
2554
+ <td class="date">2012-01-21 20:50:50</td>
2555
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2556
+ <td class="lines">178</td>
2557
+ <td><pre class="code"> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_node_name'>node_name</span></pre></td>
2558
+ </tr>
2559
+
2560
+
2561
+ <tr>
2562
+
2563
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2564
+
2565
+ <td class="date">2012-01-21 20:50:50</td>
2566
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2567
+ <td class="lines">179</td>
2568
+ <td><pre class="code"> <span class='kw'>begin</span></pre></td>
2569
+ </tr>
2570
+
2571
+
2572
+ <tr>
2573
+
2574
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2575
+
2576
+ <td class="date">2012-01-21 20:50:50</td>
2577
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2578
+ <td class="lines">180</td>
2579
+ <td><pre class="code"> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fh'>fh</span><span class='op'>|</span></pre></td>
2580
+ </tr>
2581
+
2582
+
2583
+ <tr>
2584
+
2585
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2586
+
2587
+ <td class="date">2012-01-21 20:50:50</td>
2588
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2589
+ <td class="lines">181</td>
2590
+ <td><pre class="code"> <span class='id identifier rubyid_fh'>fh</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_container'>container</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span></pre></td>
2591
+ </tr>
2592
+
2593
+
2594
+ <tr>
2595
+
2596
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2597
+
2598
+ <td class="date">2012-01-21 23:54:47</td>
2599
+ <td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
2600
+ <td class="lines">182</td>
2601
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
2602
+ </tr>
2603
+
2604
+
2605
+ <tr>
2606
+
2607
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2608
+
2609
+ <td class="date">2012-01-21 20:50:50</td>
2610
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2611
+ <td class="lines">183</td>
2612
+ <td><pre class="code"> <span class='kw'>self</span></pre></td>
2613
+ </tr>
2614
+
2615
+
2616
+ <tr>
2617
+
2618
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2619
+
2620
+ <td class="date">2012-01-22 15:46:58</td>
2621
+ <td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
2622
+ <td class="lines">184</td>
2623
+ <td><pre class="code"> <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span></pre></td>
2624
+ </tr>
2625
+
2626
+
2627
+ <tr>
2628
+
2629
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2630
+
2631
+ <td class="date">2012-01-21 20:50:50</td>
2632
+ <td class="commit"><a title="Base can load and save files.">a1da5745</a><td>
2633
+ <td class="lines">185</td>
2634
+ <td><pre class="code"> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>FileAccessError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Reason: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span></pre></td>
2635
+ </tr>
2636
+
2637
+
2638
+ <tr>
2639
+
2640
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2641
+
2642
+ <td class="date">2012-01-21 20:02:53</td>
2643
+ <td class="commit"><a title="Fix respond_to logic and exception.">2bfef608</a><td>
2644
+ <td class="lines">186</td>
2645
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
2646
+ </tr>
2647
+
2648
+
2649
+ <tr>
2650
+
2651
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
2652
+
2653
+ <td class="date">2012-01-21 20:02:53</td>
2654
+ <td class="commit"><a title="Fix respond_to logic and exception.">2bfef608</a><td>
2655
+ <td class="lines">187</td>
2656
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
2657
+ </tr>
2658
+
2659
+ </table>
2660
+ </td>
2661
+ <td>
2662
+ </tr>
2663
+ </table>
2664
+ </div>
2665
+
2666
+ </div>
2667
+
2668
+ </div>
2669
+
2670
+ <div id="footer">
2671
+ Generated on Mon Jan 23 01:15:28 2012 by
2672
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2673
+ 0.7.4 (ruby-1.9.3).
2674
+ </div>
2675
+
2676
+ </body>
2677
+ </html>