io_shuten 0.0.1.dev5 → 0.0.3.dev1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +7 -0
- data/Gemfile +3 -4
- data/Gemfile.lock +2 -8
- data/README.md +17 -3
- data/Rakefile +25 -1
- data/benchmark/compare_mem_w_buf.rb +134 -0
- data/doc/IO_3A_3ABuffer.html +198 -0
- data/doc/IO_shuten/Base.html +349 -1943
- data/doc/IO_shuten/Buffer.html +1842 -0
- data/doc/IO_shuten/Errors/FileAccessError.html +5 -4
- data/doc/IO_shuten/Errors/FileNotFoundError.html +5 -4
- data/doc/IO_shuten/Errors/NodeExistsError.html +5 -4
- data/doc/IO_shuten/Errors/NodeNameError.html +5 -4
- data/doc/IO_shuten/Errors/NodeNotFoundError.html +5 -4
- data/doc/IO_shuten/Errors/NotYetImplemented.html +5 -4
- data/doc/IO_shuten/Errors.html +5 -4
- data/doc/IO_shuten/Memory.html +1798 -0
- data/doc/IO_shuten/Mongo.html +9 -13
- data/doc/IO_shuten/Redis.html +803 -8
- data/doc/IO_shuten/Stores/Mongo/Collection.html +5 -4
- data/doc/IO_shuten/Stores/Mongo/GridFS.html +5 -4
- data/doc/IO_shuten/Stores/Mongo.html +5 -4
- data/doc/IO_shuten/Stores/Redis/KeyValue.html +5 -4
- data/doc/IO_shuten/Stores/Redis/PubSub.html +5 -4
- data/doc/IO_shuten/Stores/Redis.html +5 -4
- data/doc/IO_shuten/Stores.html +5 -4
- data/doc/IO_shuten.html +7 -6
- data/doc/_index.html +20 -6
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +21 -6
- data/doc/index.html +21 -6
- data/doc/method_list.html +119 -15
- data/doc/top-level-namespace.html +2 -2
- data/io_shuten.gemspec +16 -12
- data/lib/io_shuten/base.rb +1 -129
- data/lib/io_shuten/buffer.rb +156 -0
- data/lib/io_shuten/memory.rb +145 -0
- data/lib/io_shuten/redis.rb +65 -0
- data/lib/io_shuten/version.rb +1 -1
- data/lib/io_shuten.rb +2 -0
- data/spec/examples/logger_spec.rb +18 -2
- data/spec/lib/buffer_spec.rb +387 -0
- data/spec/lib/{base_spec.rb → memory_spec.rb} +92 -82
- data/spec/lib/mongo_spec.rb +1 -1
- data/spec/lib/redis_spec.rb +1 -1
- data/spec/spec_helper.rb +16 -12
- metadata +233 -163
data/doc/IO_shuten/Base.html
CHANGED
@@ -96,9 +96,9 @@
|
|
96
96
|
|
97
97
|
<h2>Overview</h2><div class="docstring">
|
98
98
|
<div class="discussion">
|
99
|
-
|
100
|
-
|
101
|
-
|
99
|
+
<p>
|
100
|
+
IO_shuten::Base is interface class for other implementations.
|
101
|
+
</p>
|
102
102
|
|
103
103
|
|
104
104
|
</div>
|
@@ -108,7 +108,7 @@ implementations.</p>
|
|
108
108
|
|
109
109
|
</div><div id="subclasses">
|
110
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>
|
111
|
+
<p class="children"><span class='object_link'><a href="Buffer.html" title="IO_shuten::Buffer (class)">Buffer</a></span>, <span class='object_link'><a href="Memory.html" title="IO_shuten::Memory (class)">Memory</a></span>, <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
112
|
</div>
|
113
113
|
|
114
114
|
<h2>Constant Summary</h2>
|
@@ -118,8 +118,9 @@ implementations.</p>
|
|
118
118
|
<dt id="instances-classvariable" class="">@@instances =
|
119
119
|
<div class="docstring">
|
120
120
|
<div class="discussion">
|
121
|
-
|
122
|
-
|
121
|
+
<p>
|
122
|
+
Storage of current Base instances of the running process
|
123
|
+
</p>
|
123
124
|
|
124
125
|
|
125
126
|
</div>
|
@@ -142,7 +143,8 @@ implementations.</p>
|
|
142
143
|
|
143
144
|
</div>
|
144
145
|
</dt>
|
145
|
-
<dd><pre class="code"><span class='
|
146
|
+
<dd><pre class="code"><span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
147
|
+
</pre></dd>
|
146
148
|
|
147
149
|
</dl>
|
148
150
|
|
@@ -170,8 +172,9 @@ implementations.</p>
|
|
170
172
|
|
171
173
|
|
172
174
|
|
173
|
-
<span class="summary_desc"><div class='inline'>
|
174
|
-
|
175
|
+
<span class="summary_desc"><div class='inline'><p>
|
176
|
+
holds StringIO node.
|
177
|
+
</p>
|
175
178
|
</div></span>
|
176
179
|
|
177
180
|
</li>
|
@@ -196,8 +199,9 @@ implementations.</p>
|
|
196
199
|
|
197
200
|
|
198
201
|
|
199
|
-
<span class="summary_desc"><div class='inline'>
|
200
|
-
|
202
|
+
<span class="summary_desc"><div class='inline'><p>
|
203
|
+
Name of current node instance.
|
204
|
+
</p>
|
201
205
|
</div></span>
|
202
206
|
|
203
207
|
</li>
|
@@ -232,8 +236,9 @@ implementations.</p>
|
|
232
236
|
|
233
237
|
|
234
238
|
|
235
|
-
<span class="summary_desc"><div class='inline'>
|
236
|
-
|
239
|
+
<span class="summary_desc"><div class='inline'><p>
|
240
|
+
Deletes a single instance of the pool.
|
241
|
+
</p>
|
237
242
|
</div></span>
|
238
243
|
|
239
244
|
</li>
|
@@ -246,7 +251,7 @@ implementations.</p>
|
|
246
251
|
|
247
252
|
|
248
253
|
|
249
|
-
(also: instance_exist?,
|
254
|
+
(also: instance_exist?, exist?, exists?)
|
250
255
|
|
251
256
|
</span>
|
252
257
|
|
@@ -257,8 +262,9 @@ implementations.</p>
|
|
257
262
|
|
258
263
|
|
259
264
|
|
260
|
-
<span class="summary_desc"><div class='inline'>
|
261
|
-
|
265
|
+
<span class="summary_desc"><div class='inline'><p>
|
266
|
+
Checks for existence of a node.
|
267
|
+
</p>
|
262
268
|
</div></span>
|
263
269
|
|
264
270
|
</li>
|
@@ -271,55 +277,7 @@ implementations.</p>
|
|
271
277
|
|
272
278
|
|
273
279
|
|
274
|
-
(also:
|
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)
|
280
|
+
(also: nodes, pool)
|
323
281
|
|
324
282
|
</span>
|
325
283
|
|
@@ -330,8 +288,9 @@ implementations.</p>
|
|
330
288
|
|
331
289
|
|
332
290
|
|
333
|
-
<span class="summary_desc"><div class='inline'>
|
334
|
-
|
291
|
+
<span class="summary_desc"><div class='inline'><p>
|
292
|
+
Current instances.
|
293
|
+
</p>
|
335
294
|
</div></span>
|
336
295
|
|
337
296
|
</li>
|
@@ -353,31 +312,9 @@ implementations.</p>
|
|
353
312
|
|
354
313
|
|
355
314
|
|
356
|
-
<span class="summary_desc"><div class='inline'>
|
357
|
-
|
358
|
-
</
|
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>
|
315
|
+
<span class="summary_desc"><div class='inline'><p>
|
316
|
+
Deletes ALL instances in the pool!.
|
317
|
+
</p>
|
381
318
|
</div></span>
|
382
319
|
|
383
320
|
</li>
|
@@ -385,197 +322,23 @@ implementations.</p>
|
|
385
322
|
|
386
323
|
</ul>
|
387
324
|
|
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
325
|
|
326
|
+
<div id="method_missing_details" class="method_details_list">
|
327
|
+
<h2>Dynamic Method Handling</h2>
|
328
|
+
<p class="notice this">
|
329
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
472
330
|
|
473
|
-
</
|
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>
|
331
|
+
</p>
|
494
332
|
|
495
333
|
<div class="method_details first">
|
496
|
-
<p class="signature first" id="
|
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
|
-
—
|
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
|
-
—
|
544
|
-
<div class='inline'>
|
545
|
-
<p>also a symbol is allowed</p>
|
546
|
-
</div>
|
547
|
-
|
548
|
-
</li>
|
334
|
+
<p class="signature first" id="method_missing-instance_method">
|
549
335
|
|
550
|
-
<
|
551
|
-
|
552
|
-
<span class='name'>*args</span>
|
553
|
-
|
554
|
-
|
555
|
-
<span class='type'>(<tt>not used</tt>)</span>
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
</li>
|
336
|
+
- (<tt>Object</tt>) <strong>method_missing</strong>(method, *args, &block)
|
560
337
|
|
561
|
-
</ul>
|
562
338
|
|
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
339
|
|
575
|
-
</
|
576
|
-
|
577
|
-
</div><table class="source_code blame">
|
578
|
-
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line 26</span></caption>
|
340
|
+
</p><table class="source_code blame">
|
341
|
+
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line 79</span></caption>
|
579
342
|
<tr>
|
580
343
|
<td>
|
581
344
|
<table>
|
@@ -586,10 +349,10 @@ implementations.</p>
|
|
586
349
|
|
587
350
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
588
351
|
|
589
|
-
<td class="date">2012-01-
|
590
|
-
<td class="commit"><a title="
|
591
|
-
<td class="lines">
|
592
|
-
<td><pre class="code"><span class='kw'>def</span> <span class='
|
352
|
+
<td class="date">2012-01-21 18:02:36</td>
|
353
|
+
<td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
|
354
|
+
<td class="lines">79</td>
|
355
|
+
<td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_method_missing identifier id'>method_missing</span> <span class='rubyid_method identifier id'>method</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span></pre></td>
|
593
356
|
</tr>
|
594
357
|
|
595
358
|
|
@@ -597,10 +360,10 @@ implementations.</p>
|
|
597
360
|
|
598
361
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
599
362
|
|
600
|
-
<td class="date">2012-01-
|
601
|
-
<td class="commit"><a title="
|
602
|
-
<td class="lines">
|
603
|
-
<td><pre class="code"> <span class='kw'>if</span> <span class='
|
363
|
+
<td class="date">2012-01-21 18:02:36</td>
|
364
|
+
<td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
|
365
|
+
<td class="lines">80</td>
|
366
|
+
<td><pre class="code"> <span class='rubyid_if if kw'>if</span> <span class='rubyid_respond_to_missing? fid id'>respond_to_missing?</span> <span class='rubyid_method identifier id'>method</span></pre></td>
|
604
367
|
</tr>
|
605
368
|
|
606
369
|
|
@@ -610,8 +373,8 @@ implementations.</p>
|
|
610
373
|
|
611
374
|
<td class="date">2012-01-22 21:35:53</td>
|
612
375
|
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
613
|
-
<td class="lines">
|
614
|
-
<td><pre class="code"> <span class='
|
376
|
+
<td class="lines">81</td>
|
377
|
+
<td><pre class="code"> <span class='rubyid_@container ivar id'>@container</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span> <span class='rubyid_method identifier id'>method</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span></pre></td>
|
615
378
|
</tr>
|
616
379
|
|
617
380
|
|
@@ -619,10 +382,10 @@ implementations.</p>
|
|
619
382
|
|
620
383
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
621
384
|
|
622
|
-
<td class="date">2012-01-21
|
623
|
-
<td class="commit"><a title="Base
|
624
|
-
<td class="lines">
|
625
|
-
<td><pre class="code">
|
385
|
+
<td class="date">2012-01-22 21:35:53</td>
|
386
|
+
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
387
|
+
<td class="lines">82</td>
|
388
|
+
<td><pre class="code"> <span class='rubyid_else else kw'>else</span></pre></td>
|
626
389
|
</tr>
|
627
390
|
|
628
391
|
|
@@ -630,10 +393,10 @@ implementations.</p>
|
|
630
393
|
|
631
394
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
632
395
|
|
633
|
-
<td class="date">2012-01-21
|
634
|
-
<td class="commit"><a title="
|
635
|
-
<td class="lines">
|
636
|
-
<td><pre class="code"> <span class='
|
396
|
+
<td class="date">2012-01-21 18:02:36</td>
|
397
|
+
<td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
|
398
|
+
<td class="lines">83</td>
|
399
|
+
<td><pre class="code"> <span class='rubyid_not_yet_implemented! fid id'>not_yet_implemented!</span> <span class='rubyid_method identifier id'>method</span></pre></td>
|
637
400
|
</tr>
|
638
401
|
|
639
402
|
|
@@ -641,10 +404,10 @@ implementations.</p>
|
|
641
404
|
|
642
405
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
643
406
|
|
644
|
-
<td class="date">2012-01-21
|
645
|
-
<td class="commit"><a title="
|
646
|
-
<td class="lines">
|
647
|
-
<td><pre class="code"></pre></td>
|
407
|
+
<td class="date">2012-01-21 18:02:36</td>
|
408
|
+
<td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
|
409
|
+
<td class="lines">84</td>
|
410
|
+
<td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
|
648
411
|
</tr>
|
649
412
|
|
650
413
|
|
@@ -652,193 +415,10 @@ implementations.</p>
|
|
652
415
|
|
653
416
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
654
417
|
|
655
|
-
<td class="date">2012-01-
|
656
|
-
<td class="commit"><a title="
|
657
|
-
<td class="lines">
|
658
|
-
<td><pre class="code"
|
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'>"</span><span class='tstring_content'>Node already in pool, replacement is not allowed.</span><span class='tstring_end'>"</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'>"</span><span class='tstring_content'>Name must be kind of String or Symbol and can't be nil.</span><span class='tstring_end'>"</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, &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'>&</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'>&</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>
|
418
|
+
<td class="date">2012-01-21 18:02:36</td>
|
419
|
+
<td class="commit"><a title="Reimplement #method_missing">3369fd59</a><td>
|
420
|
+
<td class="lines">85</td>
|
421
|
+
<td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
|
842
422
|
</tr>
|
843
423
|
|
844
424
|
</table>
|
@@ -865,8 +445,9 @@ implementations.</p>
|
|
865
445
|
|
866
446
|
</p><div class="docstring">
|
867
447
|
<div class="discussion">
|
868
|
-
|
869
|
-
|
448
|
+
<p>
|
449
|
+
holds StringIO node
|
450
|
+
</p>
|
870
451
|
|
871
452
|
|
872
453
|
</div>
|
@@ -902,7 +483,7 @@ implementations.</p>
|
|
902
483
|
<td class="date">2012-01-21 23:54:47</td>
|
903
484
|
<td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
|
904
485
|
<td class="lines">17</td>
|
905
|
-
<td><pre class="code"><span class='kw'>def</span> <span class='
|
486
|
+
<td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_container identifier id'>container</span></pre></td>
|
906
487
|
</tr>
|
907
488
|
|
908
489
|
|
@@ -910,10 +491,10 @@ implementations.</p>
|
|
910
491
|
|
911
492
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
912
493
|
|
913
|
-
<td class="date">2012-01-22
|
914
|
-
<td class="commit"><a title="
|
494
|
+
<td class="date">2012-01-22 15:46:58</td>
|
495
|
+
<td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
|
915
496
|
<td class="lines">18</td>
|
916
|
-
<td><pre class="code"> <span class='ivar'>@container</span></pre></td>
|
497
|
+
<td><pre class="code"> <span class='rubyid_@container ivar id'>@container</span></pre></td>
|
917
498
|
</tr>
|
918
499
|
|
919
500
|
|
@@ -921,1325 +502,35 @@ implementations.</p>
|
|
921
502
|
|
922
503
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
923
504
|
|
924
|
-
<td class="date">2012-01-
|
925
|
-
<td class="commit"><a title="
|
505
|
+
<td class="date">2012-01-22 15:46:58</td>
|
506
|
+
<td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
|
926
507
|
<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>
|
508
|
+
<td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
|
1009
509
|
</tr>
|
1010
510
|
|
1011
511
|
</table>
|
1012
512
|
</td>
|
1013
513
|
<td>
|
1014
514
|
</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
|
-
—
|
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
|
-
—
|
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
|
-
—
|
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'>&&</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'>&&</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'>&&</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
|
-
—
|
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
|
-
—
|
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'>&&</span> <span class='id identifier rubyid_node_name'>node_name</span> <span class='op'>&&</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'>&</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
|
-
—
|
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
|
-
—
|
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
|
-
—
|
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'>"</span><span class='tstring_content'>Array</span><span class='tstring_end'>"</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'>"</span><span class='tstring_content'>String</span><span class='tstring_end'>"</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'>&&</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'>"</span><span class='tstring_content'>/**/*</span><span class='tstring_end'>"</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'>"</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'>"</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
|
-
—
|
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'>"</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>
|
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
|
-
|
515
|
+
</table>
|
516
|
+
</div>
|
2228
517
|
|
2229
|
-
|
2230
|
-
|
518
|
+
|
519
|
+
<span id=""></span>
|
520
|
+
<span id="node_name-instance_method"></span>
|
521
|
+
<div class="method_details ">
|
522
|
+
<p class="signature " id="node_name-instance_method">
|
2231
523
|
|
2232
|
-
- (<tt>
|
524
|
+
- (<tt>String</tt>) <strong>node_name</strong> <span class="extras">(readonly)</span>
|
2233
525
|
|
2234
526
|
|
2235
527
|
|
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
528
|
</p><div class="docstring">
|
2241
529
|
<div class="discussion">
|
2242
|
-
|
530
|
+
<p>
|
531
|
+
Name of current node instance
|
532
|
+
</p>
|
533
|
+
|
2243
534
|
|
2244
535
|
</div>
|
2245
536
|
</div>
|
@@ -2251,7 +542,7 @@ implementations.</p>
|
|
2251
542
|
<li>
|
2252
543
|
|
2253
544
|
|
2254
|
-
<span class='type'>(<tt>
|
545
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2255
546
|
|
2256
547
|
|
2257
548
|
|
@@ -2260,7 +551,7 @@ implementations.</p>
|
|
2260
551
|
</ul>
|
2261
552
|
|
2262
553
|
</div><table class="source_code blame">
|
2263
|
-
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line
|
554
|
+
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line 13</span></caption>
|
2264
555
|
<tr>
|
2265
556
|
<td>
|
2266
557
|
<table>
|
@@ -2271,21 +562,10 @@ implementations.</p>
|
|
2271
562
|
|
2272
563
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2273
564
|
|
2274
|
-
<td class="date">2012-01-
|
2275
|
-
<td class="commit"><a title="
|
2276
|
-
<td class="lines">
|
2277
|
-
<td><pre class="code"><span class='kw'>def</span> <span class='
|
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>
|
565
|
+
<td class="date">2012-01-21 23:54:47</td>
|
566
|
+
<td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
|
567
|
+
<td class="lines">13</td>
|
568
|
+
<td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_node_name identifier id'>node_name</span></pre></td>
|
2289
569
|
</tr>
|
2290
570
|
|
2291
571
|
|
@@ -2293,10 +573,10 @@ implementations.</p>
|
|
2293
573
|
|
2294
574
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2295
575
|
|
2296
|
-
<td class="date">2012-01-21
|
2297
|
-
<td class="commit"><a title="
|
2298
|
-
<td class="lines">
|
2299
|
-
<td><pre class="code"> <span class='
|
576
|
+
<td class="date">2012-01-22 21:35:53</td>
|
577
|
+
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
578
|
+
<td class="lines">14</td>
|
579
|
+
<td><pre class="code"> <span class='rubyid_@node_name ivar id'>@node_name</span></pre></td>
|
2300
580
|
</tr>
|
2301
581
|
|
2302
582
|
|
@@ -2304,10 +584,10 @@ implementations.</p>
|
|
2304
584
|
|
2305
585
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2306
586
|
|
2307
|
-
<td class="date">2012-01-21
|
2308
|
-
<td class="commit"><a title="
|
2309
|
-
<td class="lines">
|
2310
|
-
<td><pre class="code"><span class='kw'>end</span></pre></td>
|
587
|
+
<td class="date">2012-01-21 23:54:47</td>
|
588
|
+
<td class="commit"><a title="Add more specs and yardoc task.">434c2c13</a><td>
|
589
|
+
<td class="lines">15</td>
|
590
|
+
<td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
|
2311
591
|
</tr>
|
2312
592
|
|
2313
593
|
</table>
|
@@ -2317,57 +597,89 @@ implementations.</p>
|
|
2317
597
|
</table>
|
2318
598
|
</div>
|
2319
599
|
|
2320
|
-
|
2321
|
-
|
600
|
+
</div>
|
601
|
+
|
602
|
+
|
603
|
+
<div id="class_method_details" class="method_details_list">
|
604
|
+
<h2>Class Method Details</h2>
|
605
|
+
|
606
|
+
|
607
|
+
<div class="method_details first">
|
608
|
+
<p class="signature first" id="delete_instance-class_method">
|
2322
609
|
|
2323
|
-
|
610
|
+
+ (<tt>Object</tt>) <strong>delete_instance</strong>(node_name_or_instance)
|
2324
611
|
|
2325
612
|
|
2326
613
|
|
2327
614
|
</p><div class="docstring">
|
2328
615
|
<div class="discussion">
|
2329
|
-
|
2330
|
-
|
616
|
+
<p>
|
617
|
+
Deletes a single instance of the pool
|
618
|
+
</p>
|
2331
619
|
|
2332
620
|
|
2333
621
|
</div>
|
2334
622
|
</div>
|
2335
623
|
<div class="tags">
|
2336
|
-
|
2337
|
-
<
|
2338
|
-
<ul class="return">
|
624
|
+
<h3>Parameters:</h3>
|
625
|
+
<ul class="param">
|
2339
626
|
|
2340
627
|
<li>
|
2341
628
|
|
629
|
+
<span class='name'>node</span>
|
630
|
+
|
2342
631
|
|
2343
632
|
<span class='type'>(<tt><span class='object_link'><a href="" title="IO_shuten::Base (class)">Base</a></span></tt>)</span>
|
2344
633
|
|
2345
634
|
|
2346
635
|
|
2347
636
|
—
|
2348
|
-
<div class='inline'>
|
2349
|
-
|
637
|
+
<div class='inline'><p>
|
638
|
+
instance
|
639
|
+
</p>
|
2350
640
|
</div>
|
2351
641
|
|
2352
642
|
</li>
|
2353
643
|
|
2354
|
-
|
2355
|
-
|
2356
|
-
<
|
644
|
+
<li>
|
645
|
+
|
646
|
+
<span class='name'>name</span>
|
647
|
+
|
648
|
+
|
649
|
+
<span class='type'>(<tt>String</tt>)</span>
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
—
|
654
|
+
<div class='inline'><p>
|
655
|
+
of node as String
|
656
|
+
</p>
|
657
|
+
</div>
|
658
|
+
|
659
|
+
</li>
|
2357
660
|
|
2358
661
|
<li>
|
2359
662
|
|
663
|
+
<span class='name'>name</span>
|
664
|
+
|
665
|
+
|
666
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
2360
667
|
|
2361
|
-
<span class='type'>(<tt>FileNotFoundError</tt>)</span>
|
2362
668
|
|
2363
669
|
|
670
|
+
—
|
671
|
+
<div class='inline'><p>
|
672
|
+
of node as Symbol
|
673
|
+
</p>
|
674
|
+
</div>
|
2364
675
|
|
2365
676
|
</li>
|
2366
677
|
|
2367
678
|
</ul>
|
2368
679
|
|
680
|
+
|
2369
681
|
</div><table class="source_code blame">
|
2370
|
-
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line
|
682
|
+
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line 42</span></caption>
|
2371
683
|
<tr>
|
2372
684
|
<td>
|
2373
685
|
<table>
|
@@ -2380,30 +692,8 @@ implementations.</p>
|
|
2380
692
|
|
2381
693
|
<td class="date">2012-01-22 21:35:53</td>
|
2382
694
|
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
2383
|
-
<td class="lines">
|
2384
|
-
<td><pre class="code"><span class='kw'>def</span> <span class='
|
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>
|
695
|
+
<td class="lines">42</td>
|
696
|
+
<td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_delete_instance identifier id'>delete_instance</span> <span class='rubyid_node_name_or_instance identifier id'>node_name_or_instance</span></pre></td>
|
2407
697
|
</tr>
|
2408
698
|
|
2409
699
|
|
@@ -2411,10 +701,10 @@ implementations.</p>
|
|
2411
701
|
|
2412
702
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2413
703
|
|
2414
|
-
<td class="date">2012-01-21
|
2415
|
-
<td class="commit"><a title="
|
2416
|
-
<td class="lines">
|
2417
|
-
<td><pre class="code">
|
704
|
+
<td class="date">2012-01-22 21:35:53</td>
|
705
|
+
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
706
|
+
<td class="lines">43</td>
|
707
|
+
<td><pre class="code"> <span class='rubyid_@@instances ivar id'>@@instances</span><span class='dot token'>.</span><span class='rubyid_delete_if identifier id'>delete_if</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_node identifier id'>node</span><span class='bitor op'>|</span></pre></td>
|
2418
708
|
</tr>
|
2419
709
|
|
2420
710
|
|
@@ -2422,10 +712,10 @@ implementations.</p>
|
|
2422
712
|
|
2423
713
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2424
714
|
|
2425
|
-
<td class="date">2012-01-21
|
2426
|
-
<td class="commit"><a title="Base
|
2427
|
-
<td class="lines">
|
2428
|
-
<td><pre class="code"> <span class='
|
715
|
+
<td class="date">2012-01-22 21:35:53</td>
|
716
|
+
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
717
|
+
<td class="lines">44</td>
|
718
|
+
<td><pre class="code"> <span class='lparen token'>(</span><span class='rubyid_node_name_or_instance identifier id'>node_name_or_instance</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Symbol constant id'>Symbol</span><span class='rparen token'>)</span> <span class='andop op'>&&</span> <span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span> <span class='eq op'>==</span> <span class='rubyid_node_name_or_instance identifier id'>node_name_or_instance</span><span class='rparen token'>)</span> <span class='orop op'>||</span></pre></td>
|
2429
719
|
</tr>
|
2430
720
|
|
2431
721
|
|
@@ -2435,8 +725,8 @@ implementations.</p>
|
|
2435
725
|
|
2436
726
|
<td class="date">2012-01-22 21:35:53</td>
|
2437
727
|
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
2438
|
-
<td class="lines">
|
2439
|
-
<td><pre class="code">
|
728
|
+
<td class="lines">45</td>
|
729
|
+
<td><pre class="code"> <span class='lparen token'>(</span><span class='rubyid_node_name_or_instance identifier id'>node_name_or_instance</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_String constant id'>String</span><span class='rparen token'>)</span> <span class='andop op'>&&</span> <span class='rubyid_node identifier id'>node</span><span class='dot token'>.</span><span class='rubyid_node_name identifier id'>node_name</span> <span class='eq op'>==</span> <span class='rubyid_node_name_or_instance identifier id'>node_name_or_instance</span><span class='rparen token'>)</span> <span class='orop op'>||</span></pre></td>
|
2440
730
|
</tr>
|
2441
731
|
|
2442
732
|
|
@@ -2444,10 +734,10 @@ implementations.</p>
|
|
2444
734
|
|
2445
735
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2446
736
|
|
2447
|
-
<td class="date">2012-01-21
|
2448
|
-
<td class="commit"><a title="Base
|
2449
|
-
<td class="lines">
|
2450
|
-
<td><pre class="code"> <span class='
|
737
|
+
<td class="date">2012-01-21 14:44:16</td>
|
738
|
+
<td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
|
739
|
+
<td class="lines">46</td>
|
740
|
+
<td><pre class="code"> <span class='lparen token'>(</span><span class='rubyid_node_name_or_instance identifier id'>node_name_or_instance</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Base constant id'>Base</span><span class='rparen token'>)</span> <span class='andop op'>&&</span> <span class='rubyid_node identifier id'>node</span> <span class='eq op'>==</span> <span class='rubyid_node_name_or_instance identifier id'>node_name_or_instance</span><span class='rparen token'>)</span></pre></td>
|
2451
741
|
</tr>
|
2452
742
|
|
2453
743
|
|
@@ -2455,10 +745,10 @@ implementations.</p>
|
|
2455
745
|
|
2456
746
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2457
747
|
|
2458
|
-
<td class="date">2012-01-21
|
2459
|
-
<td class="commit"><a title="
|
2460
|
-
<td class="lines">
|
2461
|
-
<td><pre class="code"> <span class='kw'>end</span></pre></td>
|
748
|
+
<td class="date">2012-01-21 14:44:16</td>
|
749
|
+
<td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
|
750
|
+
<td class="lines">47</td>
|
751
|
+
<td><pre class="code"> <span class='rubyid_end end kw'>end</span></pre></td>
|
2462
752
|
</tr>
|
2463
753
|
|
2464
754
|
|
@@ -2466,10 +756,10 @@ implementations.</p>
|
|
2466
756
|
|
2467
757
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2468
758
|
|
2469
|
-
<td class="date">2012-01-21
|
2470
|
-
<td class="commit"><a title="
|
2471
|
-
<td class="lines">
|
2472
|
-
<td><pre class="code"><span class='kw'>end</span></pre></td>
|
759
|
+
<td class="date">2012-01-21 14:44:16</td>
|
760
|
+
<td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
|
761
|
+
<td class="lines">48</td>
|
762
|
+
<td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
|
2473
763
|
</tr>
|
2474
764
|
|
2475
765
|
</table>
|
@@ -2480,47 +770,72 @@ implementations.</p>
|
|
2480
770
|
</div>
|
2481
771
|
|
2482
772
|
<div class="method_details ">
|
2483
|
-
<p class="signature " id="
|
773
|
+
<p class="signature " id="instance_exists?-class_method">
|
2484
774
|
|
2485
|
-
|
775
|
+
+ (<tt>Boolean</tt>) <strong>instance_exists?</strong>(node_name)
|
2486
776
|
|
2487
777
|
|
2488
778
|
|
779
|
+
<span class="aliases">Also known as:
|
780
|
+
<span class="names"><span id='instance_exist?-class_method'>instance_exist?</span>, <span id='exist?-class_method'>exist?</span>, <span id='exists?-class_method'>exists?</span></span>
|
781
|
+
</span>
|
782
|
+
|
2489
783
|
</p><div class="docstring">
|
2490
784
|
<div class="discussion">
|
2491
|
-
|
2492
|
-
|
785
|
+
<p>
|
786
|
+
Checks for existence of a node
|
787
|
+
</p>
|
2493
788
|
|
2494
789
|
|
2495
790
|
</div>
|
2496
791
|
</div>
|
2497
792
|
<div class="tags">
|
793
|
+
<h3>Parameters:</h3>
|
794
|
+
<ul class="param">
|
2498
795
|
|
2499
|
-
<
|
2500
|
-
|
796
|
+
<li>
|
797
|
+
|
798
|
+
<span class='name'>name</span>
|
799
|
+
|
800
|
+
|
801
|
+
<span class='type'>(<tt>String</tt>)</span>
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
—
|
806
|
+
<div class='inline'><p>
|
807
|
+
of node as String
|
808
|
+
</p>
|
809
|
+
</div>
|
810
|
+
|
811
|
+
</li>
|
2501
812
|
|
2502
813
|
<li>
|
2503
814
|
|
815
|
+
<span class='name'>name</span>
|
816
|
+
|
2504
817
|
|
2505
|
-
<span class='type'>(<tt
|
818
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
2506
819
|
|
2507
820
|
|
2508
821
|
|
2509
822
|
—
|
2510
|
-
<div class='inline'>
|
2511
|
-
|
823
|
+
<div class='inline'><p>
|
824
|
+
of node as Symbol
|
825
|
+
</p>
|
2512
826
|
</div>
|
2513
827
|
|
2514
828
|
</li>
|
2515
829
|
|
2516
830
|
</ul>
|
2517
|
-
|
2518
|
-
<
|
831
|
+
|
832
|
+
<h3>Returns:</h3>
|
833
|
+
<ul class="return">
|
2519
834
|
|
2520
835
|
<li>
|
2521
836
|
|
2522
837
|
|
2523
|
-
<span class='type'>(<tt>
|
838
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2524
839
|
|
2525
840
|
|
2526
841
|
|
@@ -2529,7 +844,7 @@ implementations.</p>
|
|
2529
844
|
</ul>
|
2530
845
|
|
2531
846
|
</div><table class="source_code blame">
|
2532
|
-
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line
|
847
|
+
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line 56</span></caption>
|
2533
848
|
<tr>
|
2534
849
|
<td>
|
2535
850
|
<table>
|
@@ -2542,8 +857,8 @@ implementations.</p>
|
|
2542
857
|
|
2543
858
|
<td class="date">2012-01-22 21:35:53</td>
|
2544
859
|
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
2545
|
-
<td class="lines">
|
2546
|
-
<td><pre class="code"><span class='kw'>def</span> <span class='
|
860
|
+
<td class="lines">56</td>
|
861
|
+
<td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_instance_exists? fid id'>instance_exists?</span> <span class='rubyid_node_name identifier id'>node_name</span></pre></td>
|
2547
862
|
</tr>
|
2548
863
|
|
2549
864
|
|
@@ -2551,10 +866,10 @@ implementations.</p>
|
|
2551
866
|
|
2552
867
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2553
868
|
|
2554
|
-
<td class="date">2012-01-21
|
2555
|
-
<td class="commit"><a title="Base
|
2556
|
-
<td class="lines">
|
2557
|
-
<td><pre class="code"> <span class='
|
869
|
+
<td class="date">2012-01-22 21:35:53</td>
|
870
|
+
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
871
|
+
<td class="lines">57</td>
|
872
|
+
<td><pre class="code"> <span class='comment val'># we need to check for node_name, otherwise it will fail though node exists</span></pre></td>
|
2558
873
|
</tr>
|
2559
874
|
|
2560
875
|
|
@@ -2562,10 +877,10 @@ implementations.</p>
|
|
2562
877
|
|
2563
878
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2564
879
|
|
2565
|
-
<td class="date">2012-01-
|
2566
|
-
<td class="commit"><a title="
|
2567
|
-
<td class="lines">
|
2568
|
-
<td><pre class="code"> <span class='
|
880
|
+
<td class="date">2012-01-22 15:46:58</td>
|
881
|
+
<td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
|
882
|
+
<td class="lines">58</td>
|
883
|
+
<td><pre class="code"> <span class='notop op'>!</span><span class='rubyid_instances identifier id'>instances</span><span class='dot token'>.</span><span class='rubyid_empty? fid id'>empty?</span> <span class='andop op'>&&</span> <span class='rubyid_node_name identifier id'>node_name</span> <span class='andop op'>&&</span> <span class='rubyid_instances identifier id'>instances</span><span class='dot token'>.</span><span class='rubyid_map identifier id'>map</span><span class='lparen token'>(</span><span class='bitand op'>&</span><span class='symbol val'>:node_name</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_node_name identifier id'>node_name</span><span class='rparen token'>)</span></pre></td>
|
2569
884
|
</tr>
|
2570
885
|
|
2571
886
|
|
@@ -2573,21 +888,77 @@ implementations.</p>
|
|
2573
888
|
|
2574
889
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2575
890
|
|
2576
|
-
<td class="date">2012-01-
|
2577
|
-
<td class="commit"><a title="
|
2578
|
-
<td class="lines">
|
2579
|
-
<td><pre class="code"
|
891
|
+
<td class="date">2012-01-22 15:46:58</td>
|
892
|
+
<td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
|
893
|
+
<td class="lines">59</td>
|
894
|
+
<td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
|
2580
895
|
</tr>
|
2581
896
|
|
897
|
+
</table>
|
898
|
+
</td>
|
899
|
+
<td>
|
900
|
+
</tr>
|
901
|
+
</table>
|
902
|
+
</div>
|
903
|
+
|
904
|
+
<div class="method_details ">
|
905
|
+
<p class="signature " id="instances-class_method">
|
906
|
+
|
907
|
+
+ (<tt>Array</tt>) <strong>instances</strong>
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
<span class="aliases">Also known as:
|
912
|
+
<span class="names"><span id='nodes-class_method'>nodes</span>, <span id='pool-class_method'>pool</span></span>
|
913
|
+
</span>
|
914
|
+
|
915
|
+
</p><div class="docstring">
|
916
|
+
<div class="discussion">
|
917
|
+
<p>
|
918
|
+
Current instances
|
919
|
+
</p>
|
920
|
+
|
921
|
+
|
922
|
+
</div>
|
923
|
+
</div>
|
924
|
+
<div class="tags">
|
925
|
+
|
926
|
+
<h3>Returns:</h3>
|
927
|
+
<ul class="return">
|
928
|
+
|
929
|
+
<li>
|
930
|
+
|
931
|
+
|
932
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
933
|
+
|
934
|
+
|
935
|
+
|
936
|
+
—
|
937
|
+
<div class='inline'><p>
|
938
|
+
current instances
|
939
|
+
</p>
|
940
|
+
</div>
|
941
|
+
|
942
|
+
</li>
|
943
|
+
|
944
|
+
</ul>
|
945
|
+
|
946
|
+
</div><table class="source_code blame">
|
947
|
+
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line 24</span></caption>
|
948
|
+
<tr>
|
949
|
+
<td>
|
950
|
+
<table>
|
951
|
+
|
952
|
+
|
2582
953
|
|
2583
954
|
<tr>
|
2584
955
|
|
2585
956
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2586
957
|
|
2587
|
-
<td class="date">2012-01-21
|
2588
|
-
<td class="commit"><a title="Base
|
2589
|
-
<td class="lines">
|
2590
|
-
<td><pre class="code"
|
958
|
+
<td class="date">2012-01-21 14:44:16</td>
|
959
|
+
<td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
|
960
|
+
<td class="lines">24</td>
|
961
|
+
<td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_instances identifier id'>instances</span></pre></td>
|
2591
962
|
</tr>
|
2592
963
|
|
2593
964
|
|
@@ -2595,10 +966,10 @@ implementations.</p>
|
|
2595
966
|
|
2596
967
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2597
968
|
|
2598
|
-
<td class="date">2012-01-21
|
2599
|
-
<td class="commit"><a title="Add
|
2600
|
-
<td class="lines">
|
2601
|
-
<td><pre class="code">
|
969
|
+
<td class="date">2012-01-21 14:44:16</td>
|
970
|
+
<td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
|
971
|
+
<td class="lines">25</td>
|
972
|
+
<td><pre class="code"> <span class='rubyid_@@instances ivar id'>@@instances</span></pre></td>
|
2602
973
|
</tr>
|
2603
974
|
|
2604
975
|
|
@@ -2606,12 +977,58 @@ implementations.</p>
|
|
2606
977
|
|
2607
978
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2608
979
|
|
2609
|
-
<td class="date">2012-01-21
|
2610
|
-
<td class="commit"><a title="Base
|
2611
|
-
<td class="lines">
|
2612
|
-
<td><pre class="code"
|
980
|
+
<td class="date">2012-01-22 21:35:53</td>
|
981
|
+
<td class="commit"><a title="Base class is almost feature complete.">f2d93651</a><td>
|
982
|
+
<td class="lines">26</td>
|
983
|
+
<td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
|
2613
984
|
</tr>
|
2614
985
|
|
986
|
+
</table>
|
987
|
+
</td>
|
988
|
+
<td>
|
989
|
+
</tr>
|
990
|
+
</table>
|
991
|
+
</div>
|
992
|
+
|
993
|
+
<div class="method_details ">
|
994
|
+
<p class="signature " id="purge_instances!-class_method">
|
995
|
+
|
996
|
+
+ (<tt>Boolean</tt>) <strong>purge_instances!</strong>
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
</p><div class="docstring">
|
1001
|
+
<div class="discussion">
|
1002
|
+
<p>
|
1003
|
+
Deletes ALL instances in the pool!
|
1004
|
+
</p>
|
1005
|
+
|
1006
|
+
|
1007
|
+
</div>
|
1008
|
+
</div>
|
1009
|
+
<div class="tags">
|
1010
|
+
|
1011
|
+
<h3>Returns:</h3>
|
1012
|
+
<ul class="return">
|
1013
|
+
|
1014
|
+
<li>
|
1015
|
+
|
1016
|
+
|
1017
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1018
|
+
|
1019
|
+
|
1020
|
+
|
1021
|
+
</li>
|
1022
|
+
|
1023
|
+
</ul>
|
1024
|
+
|
1025
|
+
</div><table class="source_code blame">
|
1026
|
+
<caption><span class="info file"># File 'lib/io_shuten/base.rb', line 33</span></caption>
|
1027
|
+
<tr>
|
1028
|
+
<td>
|
1029
|
+
<table>
|
1030
|
+
|
1031
|
+
|
2615
1032
|
|
2616
1033
|
<tr>
|
2617
1034
|
|
@@ -2619,19 +1036,8 @@ implementations.</p>
|
|
2619
1036
|
|
2620
1037
|
<td class="date">2012-01-22 15:46:58</td>
|
2621
1038
|
<td class="commit"><a title="Remove mocks, move errors.">33812483</a><td>
|
2622
|
-
<td class="lines">
|
2623
|
-
<td><pre class="code"
|
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'>"</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'>"</span></span></pre></td>
|
1039
|
+
<td class="lines">33</td>
|
1040
|
+
<td><pre class="code"><span class='rubyid_def def kw'>def</span> <span class='rubyid_purge_instances! fid id'>purge_instances!</span></pre></td>
|
2635
1041
|
</tr>
|
2636
1042
|
|
2637
1043
|
|
@@ -2639,10 +1045,10 @@ implementations.</p>
|
|
2639
1045
|
|
2640
1046
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2641
1047
|
|
2642
|
-
<td class="date">2012-01-21
|
2643
|
-
<td class="commit"><a title="
|
2644
|
-
<td class="lines">
|
2645
|
-
<td><pre class="code"> <span class='kw'>
|
1048
|
+
<td class="date">2012-01-21 14:44:16</td>
|
1049
|
+
<td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
|
1050
|
+
<td class="lines">34</td>
|
1051
|
+
<td><pre class="code"> <span class='rubyid_@@instances ivar id'>@@instances</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_true true kw'>true</span></pre></td>
|
2646
1052
|
</tr>
|
2647
1053
|
|
2648
1054
|
|
@@ -2650,10 +1056,10 @@ implementations.</p>
|
|
2650
1056
|
|
2651
1057
|
<td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
|
2652
1058
|
|
2653
|
-
<td class="date">2012-01-21
|
2654
|
-
<td class="commit"><a title="
|
2655
|
-
<td class="lines">
|
2656
|
-
<td><pre class="code"><span class='kw'>end</span></pre></td>
|
1059
|
+
<td class="date">2012-01-21 14:44:16</td>
|
1060
|
+
<td class="commit"><a title="Add IO_shuten::Base in-memory instance storage.">03ec2d91</a><td>
|
1061
|
+
<td class="lines">35</td>
|
1062
|
+
<td><pre class="code"><span class='rubyid_end end kw'>end</span></pre></td>
|
2657
1063
|
</tr>
|
2658
1064
|
|
2659
1065
|
</table>
|
@@ -2668,9 +1074,9 @@ implementations.</p>
|
|
2668
1074
|
</div>
|
2669
1075
|
|
2670
1076
|
<div id="footer">
|
2671
|
-
Generated on
|
1077
|
+
Generated on Thu Jan 26 00:45:39 2012 by
|
2672
1078
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2673
|
-
0.7.4 (ruby-1.
|
1079
|
+
0.7.4 (ruby-1.8.7).
|
2674
1080
|
</div>
|
2675
1081
|
|
2676
1082
|
</body>
|