netlinx-workspace 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +206 -6
- data/bin/netlinx-workspace +27 -0
- data/doc/NetLinx.html +18 -7
- data/doc/NetLinx/Compile.html +15 -4
- data/doc/NetLinx/Compile/Extension.html +15 -4
- data/doc/NetLinx/Compile/Extension/APW.html +8 -8
- data/doc/NetLinx/Project.html +334 -90
- data/doc/NetLinx/Rake.html +128 -0
- data/doc/NetLinx/Rake/Workspace.html +128 -0
- data/doc/NetLinx/Rake/Workspace/CreateWorkspaceConfig.html +387 -0
- data/doc/NetLinx/Rake/Workspace/GenerateAPW.html +371 -0
- data/doc/NetLinx/System.html +1341 -217
- data/doc/NetLinx/SystemFile.html +454 -51
- data/doc/NetLinx/Workspace.html +434 -69
- data/doc/NetLinx/Workspace/YAML.html +398 -0
- data/doc/_index.html +66 -4
- data/doc/class_list.html +6 -2
- data/doc/file.README.html +218 -10
- data/doc/file.license.html +4 -4
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +218 -10
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +171 -23
- data/doc/top-level-namespace.html +3 -3
- data/lib/netlinx/compile/extension/apw.rb +3 -0
- data/lib/netlinx/rake/workspace.rb +14 -0
- data/lib/netlinx/rake/workspace/create_workspace_config.rb +49 -0
- data/lib/netlinx/rake/workspace/generate_apw.rb +41 -0
- data/lib/netlinx/workspace.rb +58 -14
- data/lib/netlinx/workspace/project.rb +107 -0
- data/lib/netlinx/workspace/system.rb +226 -0
- data/lib/netlinx/workspace/system_file.rb +98 -0
- data/lib/netlinx/workspace/yaml.rb +217 -0
- data/license.txt +1 -1
- metadata +53 -28
- data/lib/netlinx-workspace.rb +0 -1
- data/lib/netlinx/project.rb +0 -83
- data/lib/netlinx/system.rb +0 -122
- data/lib/netlinx/system_file.rb +0 -36
data/doc/NetLinx/Workspace.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: NetLinx::Workspace
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -94,7 +94,9 @@
|
|
94
94
|
|
95
95
|
|
96
96
|
<dt class="r2 last">Defined in:</dt>
|
97
|
-
<dd class="r2 last">lib/netlinx/workspace.rb
|
97
|
+
<dd class="r2 last">lib/netlinx/workspace.rb<span class="defines">,<br />
|
98
|
+
lib/netlinx/workspace/yaml.rb</span>
|
99
|
+
</dd>
|
98
100
|
|
99
101
|
</dl>
|
100
102
|
<div class="clear"></div>
|
@@ -111,7 +113,17 @@
|
|
111
113
|
<div class="tags">
|
112
114
|
|
113
115
|
|
114
|
-
</div>
|
116
|
+
</div><h2>Defined Under Namespace</h2>
|
117
|
+
<p class="children">
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Workspace/YAML.html" title="NetLinx::Workspace::YAML (class)">YAML</a></span>
|
123
|
+
|
124
|
+
|
125
|
+
</p>
|
126
|
+
|
115
127
|
|
116
128
|
|
117
129
|
|
@@ -341,7 +353,7 @@ found.</p>
|
|
341
353
|
|
342
354
|
|
343
355
|
<span class="summary_desc"><div class='inline'>
|
344
|
-
<p>
|
356
|
+
<p>True if the workspace contains the specified file.</p>
|
345
357
|
</div></span>
|
346
358
|
|
347
359
|
</li>
|
@@ -350,7 +362,7 @@ found.</p>
|
|
350
362
|
<li class="public ">
|
351
363
|
<span class="summary_signature">
|
352
364
|
|
353
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Workspace) <strong>initialize</strong>(**
|
365
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Workspace) <strong>initialize</strong>(**kwargs) </a>
|
354
366
|
|
355
367
|
|
356
368
|
|
@@ -370,6 +382,30 @@ found.</p>
|
|
370
382
|
<p>A new instance of Workspace.</p>
|
371
383
|
</div></span>
|
372
384
|
|
385
|
+
</li>
|
386
|
+
|
387
|
+
|
388
|
+
<li class="public ">
|
389
|
+
<span class="summary_signature">
|
390
|
+
|
391
|
+
<a href="#parse_xml-instance_method" title="#parse_xml (instance method)">- (Object) <strong>parse_xml</strong>(string) </a>
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
</span>
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
<span class="summary_desc"><div class='inline'>
|
406
|
+
<p>Generate a <span class='object_link'><a href="" title="NetLinx::Workspace (class)">Workspace</a></span> from an XML string.</p>
|
407
|
+
</div></span>
|
408
|
+
|
373
409
|
</li>
|
374
410
|
|
375
411
|
|
@@ -418,6 +454,54 @@ found.</p>
|
|
418
454
|
<p>Returns the name of the workspace.</p>
|
419
455
|
</div></span>
|
420
456
|
|
457
|
+
</li>
|
458
|
+
|
459
|
+
|
460
|
+
<li class="public ">
|
461
|
+
<span class="summary_signature">
|
462
|
+
|
463
|
+
<a href="#to_xml-instance_method" title="#to_xml (instance method)">- (String) <strong>to_xml</strong>(indent: -1) </a>
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
</span>
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
<span class="summary_desc"><div class='inline'>
|
478
|
+
<p>An XML string representing this workspace.</p>
|
479
|
+
</div></span>
|
480
|
+
|
481
|
+
</li>
|
482
|
+
|
483
|
+
|
484
|
+
<li class="public ">
|
485
|
+
<span class="summary_signature">
|
486
|
+
|
487
|
+
<a href="#to_xml_element-instance_method" title="#to_xml_element (instance method)">- (REXML::Element) <strong>to_xml_element</strong> </a>
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
</span>
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
<span class="summary_desc"><div class='inline'>
|
502
|
+
<p>An XML element representing this workspace.</p>
|
503
|
+
</div></span>
|
504
|
+
|
421
505
|
</li>
|
422
506
|
|
423
507
|
|
@@ -430,7 +514,7 @@ found.</p>
|
|
430
514
|
<div class="method_details first">
|
431
515
|
<h3 class="signature first" id="initialize-instance_method">
|
432
516
|
|
433
|
-
- (<tt><span class='object_link'><a href="" title="NetLinx::Workspace (class)">Workspace</a></span></tt>) <strong>initialize</strong>(**
|
517
|
+
- (<tt><span class='object_link'><a href="" title="NetLinx::Workspace (class)">Workspace</a></span></tt>) <strong>initialize</strong>(**kwargs)
|
434
518
|
|
435
519
|
|
436
520
|
|
@@ -445,7 +529,64 @@ found.</p>
|
|
445
529
|
</div>
|
446
530
|
</div>
|
447
531
|
<div class="tags">
|
532
|
+
<p class="tag_title">Parameters:</p>
|
533
|
+
<ul class="param">
|
448
534
|
|
535
|
+
<li>
|
536
|
+
|
537
|
+
<span class='name'>kwargs</span>
|
538
|
+
|
539
|
+
|
540
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
—
|
545
|
+
<div class='inline'>
|
546
|
+
<p>a customizable set of options</p>
|
547
|
+
</div>
|
548
|
+
|
549
|
+
</li>
|
550
|
+
|
551
|
+
</ul>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
<p class="tag_title">Options Hash (<tt>**kwargs</tt>):</p>
|
557
|
+
<ul class="option">
|
558
|
+
|
559
|
+
<li>
|
560
|
+
<span class="name">:name</span>
|
561
|
+
<span class="type">(<tt>String</tt>)</span>
|
562
|
+
<span class="default">
|
563
|
+
|
564
|
+
— default:
|
565
|
+
<tt>''</tt>
|
566
|
+
|
567
|
+
</span>
|
568
|
+
|
569
|
+
— <div class='inline'>
|
570
|
+
<p>Workspace name.</p>
|
571
|
+
</div>
|
572
|
+
|
573
|
+
</li>
|
574
|
+
|
575
|
+
<li>
|
576
|
+
<span class="name">:description</span>
|
577
|
+
<span class="type">(<tt>String</tt>)</span>
|
578
|
+
<span class="default">
|
579
|
+
|
580
|
+
— default:
|
581
|
+
<tt>''</tt>
|
582
|
+
|
583
|
+
</span>
|
584
|
+
|
585
|
+
</li>
|
586
|
+
|
587
|
+
</ul>
|
588
|
+
|
589
|
+
|
449
590
|
|
450
591
|
</div><table class="source_code">
|
451
592
|
<tr>
|
@@ -453,24 +594,24 @@ found.</p>
|
|
453
594
|
<pre class="lines">
|
454
595
|
|
455
596
|
|
456
|
-
29
|
457
|
-
30
|
458
|
-
31
|
459
|
-
32
|
460
|
-
33
|
461
597
|
34
|
462
598
|
35
|
463
|
-
36
|
599
|
+
36
|
600
|
+
37
|
601
|
+
38
|
602
|
+
39
|
603
|
+
40
|
604
|
+
41</pre>
|
464
605
|
</td>
|
465
606
|
<td>
|
466
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
607
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 34</span>
|
467
608
|
|
468
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span
|
469
|
-
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier
|
470
|
-
<span class='ivar'>@description</span> <span class='op'>=</span> <span class='id identifier
|
609
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
|
610
|
+
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
611
|
+
<span class='ivar'>@description</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:description</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
471
612
|
<span class='ivar'>@projects</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
472
613
|
|
473
|
-
<span class='ivar'>@file</span> <span class='op'>=</span> <span class='id identifier
|
614
|
+
<span class='ivar'>@file</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:file</span><span class='comma'>,</span> <span class='kw'>nil</span>
|
474
615
|
<span class='id identifier rubyid_load_workspace'>load_workspace</span> <span class='ivar'>@file</span> <span class='kw'>if</span> <span class='ivar'>@file</span>
|
475
616
|
<span class='kw'>end</span></pre>
|
476
617
|
</td>
|
@@ -511,12 +652,12 @@ found.</p>
|
|
511
652
|
<pre class="lines">
|
512
653
|
|
513
654
|
|
514
|
-
|
515
|
-
|
516
|
-
|
655
|
+
14
|
656
|
+
15
|
657
|
+
16</pre>
|
517
658
|
</td>
|
518
659
|
<td>
|
519
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
660
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 14</span>
|
520
661
|
|
521
662
|
<span class='kw'>def</span> <span class='id identifier rubyid_description'>description</span>
|
522
663
|
<span class='ivar'>@description</span>
|
@@ -554,12 +695,12 @@ found.</p>
|
|
554
695
|
<pre class="lines">
|
555
696
|
|
556
697
|
|
557
|
-
|
558
|
-
|
559
|
-
|
698
|
+
16
|
699
|
+
17
|
700
|
+
18</pre>
|
560
701
|
</td>
|
561
702
|
<td>
|
562
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
703
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 16</span>
|
563
704
|
|
564
705
|
<span class='kw'>def</span> <span class='id identifier rubyid_file'>file</span>
|
565
706
|
<span class='ivar'>@file</span>
|
@@ -597,12 +738,12 @@ found.</p>
|
|
597
738
|
<pre class="lines">
|
598
739
|
|
599
740
|
|
600
|
-
|
601
|
-
|
602
|
-
|
741
|
+
13
|
742
|
+
14
|
743
|
+
15</pre>
|
603
744
|
</td>
|
604
745
|
<td>
|
605
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
746
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 13</span>
|
606
747
|
|
607
748
|
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
608
749
|
<span class='ivar'>@name</span>
|
@@ -640,12 +781,12 @@ found.</p>
|
|
640
781
|
<pre class="lines">
|
641
782
|
|
642
783
|
|
643
|
-
|
644
|
-
|
645
|
-
|
784
|
+
15
|
785
|
+
16
|
786
|
+
17</pre>
|
646
787
|
</td>
|
647
788
|
<td>
|
648
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
789
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 15</span>
|
649
790
|
|
650
791
|
<span class='kw'>def</span> <span class='id identifier rubyid_projects'>projects</span>
|
651
792
|
<span class='ivar'>@projects</span>
|
@@ -689,9 +830,6 @@ found.</p>
|
|
689
830
|
<pre class="lines">
|
690
831
|
|
691
832
|
|
692
|
-
16
|
693
|
-
17
|
694
|
-
18
|
695
833
|
19
|
696
834
|
20
|
697
835
|
21
|
@@ -700,10 +838,13 @@ found.</p>
|
|
700
838
|
24
|
701
839
|
25
|
702
840
|
26
|
703
|
-
27
|
841
|
+
27
|
842
|
+
28
|
843
|
+
29
|
844
|
+
30</pre>
|
704
845
|
</td>
|
705
846
|
<td>
|
706
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
847
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 19</span>
|
707
848
|
|
708
849
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span> <span class='label'>dir:</span> <span class='kw'>nil</span>
|
709
850
|
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>||=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span>
|
@@ -754,15 +895,15 @@ found.</p>
|
|
754
895
|
<pre class="lines">
|
755
896
|
|
756
897
|
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
898
|
+
44
|
899
|
+
45
|
900
|
+
46
|
901
|
+
47</pre>
|
761
902
|
</td>
|
762
903
|
<td>
|
763
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
904
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 44</span>
|
764
905
|
|
765
|
-
<span class='kw'>def</span> <span class='op'><<</span
|
906
|
+
<span class='kw'>def</span> <span class='op'><<</span> <span class='id identifier rubyid_project'>project</span>
|
766
907
|
<span class='ivar'>@projects</span> <span class='op'><<</span> <span class='id identifier rubyid_project'>project</span>
|
767
908
|
<span class='id identifier rubyid_project'>project</span><span class='period'>.</span><span class='id identifier rubyid_workspace'>workspace</span> <span class='op'>=</span> <span class='kw'>self</span>
|
768
909
|
<span class='kw'>end</span></pre>
|
@@ -797,18 +938,18 @@ found.</p>
|
|
797
938
|
<pre class="lines">
|
798
939
|
|
799
940
|
|
800
|
-
67
|
801
|
-
68
|
802
|
-
69
|
803
|
-
70
|
804
|
-
71
|
805
941
|
72
|
806
942
|
73
|
807
943
|
74
|
808
|
-
75
|
944
|
+
75
|
945
|
+
76
|
946
|
+
77
|
947
|
+
78
|
948
|
+
79
|
949
|
+
80</pre>
|
809
950
|
</td>
|
810
951
|
<td>
|
811
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
952
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 72</span>
|
812
953
|
|
813
954
|
<span class='kw'>def</span> <span class='id identifier rubyid_compile'>compile</span>
|
814
955
|
<span class='id identifier rubyid_compiler_results'>compiler_results</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -853,6 +994,11 @@ found.</p>
|
|
853
994
|
|
854
995
|
|
855
996
|
|
997
|
+
—
|
998
|
+
<div class='inline'>
|
999
|
+
<p>true if the workspace contains the specified file.</p>
|
1000
|
+
</div>
|
1001
|
+
|
856
1002
|
</li>
|
857
1003
|
|
858
1004
|
</ul>
|
@@ -863,21 +1009,21 @@ found.</p>
|
|
863
1009
|
<pre class="lines">
|
864
1010
|
|
865
1011
|
|
866
|
-
55
|
867
|
-
56
|
868
|
-
57
|
869
|
-
58
|
870
|
-
59
|
871
1012
|
60
|
872
1013
|
61
|
873
1014
|
62
|
874
1015
|
63
|
875
|
-
64
|
1016
|
+
64
|
1017
|
+
65
|
1018
|
+
66
|
1019
|
+
67
|
1020
|
+
68
|
1021
|
+
69</pre>
|
876
1022
|
</td>
|
877
1023
|
<td>
|
878
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
1024
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 60</span>
|
879
1025
|
|
880
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_include?'>include?</span
|
1026
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_file'>file</span>
|
881
1027
|
<span class='id identifier rubyid_included'>included</span> <span class='op'>=</span> <span class='kw'>false</span>
|
882
1028
|
|
883
1029
|
<span class='id identifier rubyid_projects'>projects</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_project'>project</span><span class='op'>|</span>
|
@@ -890,6 +1036,67 @@ found.</p>
|
|
890
1036
|
</td>
|
891
1037
|
</tr>
|
892
1038
|
</table>
|
1039
|
+
</div>
|
1040
|
+
|
1041
|
+
<div class="method_details ">
|
1042
|
+
<h3 class="signature " id="parse_xml-instance_method">
|
1043
|
+
|
1044
|
+
- (<tt>Object</tt>) <strong>parse_xml</strong>(string)
|
1045
|
+
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
</h3><div class="docstring">
|
1051
|
+
<div class="discussion">
|
1052
|
+
|
1053
|
+
<p>Generate a <span class='object_link'><a href="" title="NetLinx::Workspace (class)">NetLinx::Workspace</a></span> from an XML string.</p>
|
1054
|
+
|
1055
|
+
|
1056
|
+
</div>
|
1057
|
+
</div>
|
1058
|
+
<div class="tags">
|
1059
|
+
|
1060
|
+
<p class="tag_title">Returns:</p>
|
1061
|
+
<ul class="return">
|
1062
|
+
|
1063
|
+
<li>
|
1064
|
+
|
1065
|
+
|
1066
|
+
<span class='type'></span>
|
1067
|
+
|
1068
|
+
|
1069
|
+
|
1070
|
+
|
1071
|
+
<div class='inline'>
|
1072
|
+
<p>self</p>
|
1073
|
+
</div>
|
1074
|
+
|
1075
|
+
</li>
|
1076
|
+
|
1077
|
+
</ul>
|
1078
|
+
|
1079
|
+
</div><table class="source_code">
|
1080
|
+
<tr>
|
1081
|
+
<td>
|
1082
|
+
<pre class="lines">
|
1083
|
+
|
1084
|
+
|
1085
|
+
112
|
1086
|
+
113
|
1087
|
+
114
|
1088
|
+
115</pre>
|
1089
|
+
</td>
|
1090
|
+
<td>
|
1091
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 112</span>
|
1092
|
+
|
1093
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse_xml'>parse_xml</span> <span class='id identifier rubyid_string'>string</span>
|
1094
|
+
<span class='id identifier rubyid_parse_xml_element'>parse_xml_element</span> <span class='const'>REXML</span><span class='op'>::</span><span class='const'>Document</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
|
1095
|
+
<span class='kw'>self</span>
|
1096
|
+
<span class='kw'>end</span></pre>
|
1097
|
+
</td>
|
1098
|
+
</tr>
|
1099
|
+
</table>
|
893
1100
|
</div>
|
894
1101
|
|
895
1102
|
<div class="method_details ">
|
@@ -918,12 +1125,12 @@ found.</p>
|
|
918
1125
|
<pre class="lines">
|
919
1126
|
|
920
1127
|
|
921
|
-
|
922
|
-
|
923
|
-
|
1128
|
+
55
|
1129
|
+
56
|
1130
|
+
57</pre>
|
924
1131
|
</td>
|
925
1132
|
<td>
|
926
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
1133
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 55</span>
|
927
1134
|
|
928
1135
|
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
|
929
1136
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span> <span class='ivar'>@file</span> <span class='kw'>if</span> <span class='ivar'>@file</span>
|
@@ -959,12 +1166,12 @@ found.</p>
|
|
959
1166
|
<pre class="lines">
|
960
1167
|
|
961
1168
|
|
962
|
-
|
963
|
-
|
964
|
-
|
1169
|
+
50
|
1170
|
+
51
|
1171
|
+
52</pre>
|
965
1172
|
</td>
|
966
1173
|
<td>
|
967
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
1174
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 50</span>
|
968
1175
|
|
969
1176
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
970
1177
|
<span class='ivar'>@name</span>
|
@@ -972,6 +1179,164 @@ found.</p>
|
|
972
1179
|
</td>
|
973
1180
|
</tr>
|
974
1181
|
</table>
|
1182
|
+
</div>
|
1183
|
+
|
1184
|
+
<div class="method_details ">
|
1185
|
+
<h3 class="signature " id="to_xml-instance_method">
|
1186
|
+
|
1187
|
+
- (<tt>String</tt>) <strong>to_xml</strong>(indent: -1)
|
1188
|
+
|
1189
|
+
|
1190
|
+
|
1191
|
+
|
1192
|
+
|
1193
|
+
</h3><div class="docstring">
|
1194
|
+
<div class="discussion">
|
1195
|
+
|
1196
|
+
<div class="note todo">
|
1197
|
+
<strong>TODO:</strong>
|
1198
|
+
<div class='inline'>
|
1199
|
+
<p>REXML bug forces :indent to be -1 or else erroneous line feeds are added.
|
1200
|
+
<a
|
1201
|
+
href="https://bugs.ruby-lang.org/issues/10864">bugs.ruby-lang.org/issues/10864</a></p>
|
1202
|
+
</div>
|
1203
|
+
</div>
|
1204
|
+
|
1205
|
+
|
1206
|
+
<p>Returns an XML string representing this workspace.</p>
|
1207
|
+
|
1208
|
+
|
1209
|
+
</div>
|
1210
|
+
</div>
|
1211
|
+
<div class="tags">
|
1212
|
+
|
1213
|
+
<p class="tag_title">Returns:</p>
|
1214
|
+
<ul class="return">
|
1215
|
+
|
1216
|
+
<li>
|
1217
|
+
|
1218
|
+
|
1219
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1220
|
+
|
1221
|
+
|
1222
|
+
|
1223
|
+
—
|
1224
|
+
<div class='inline'>
|
1225
|
+
<p>an XML string representing this workspace.</p>
|
1226
|
+
</div>
|
1227
|
+
|
1228
|
+
</li>
|
1229
|
+
|
1230
|
+
</ul>
|
1231
|
+
|
1232
|
+
</div><table class="source_code">
|
1233
|
+
<tr>
|
1234
|
+
<td>
|
1235
|
+
<pre class="lines">
|
1236
|
+
|
1237
|
+
|
1238
|
+
99
|
1239
|
+
100
|
1240
|
+
101
|
1241
|
+
102
|
1242
|
+
103
|
1243
|
+
104
|
1244
|
+
105
|
1245
|
+
106
|
1246
|
+
107
|
1247
|
+
108</pre>
|
1248
|
+
</td>
|
1249
|
+
<td>
|
1250
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 99</span>
|
1251
|
+
|
1252
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_xml'>to_xml</span> <span class='label'>indent:</span> <span class='op'>-</span><span class='int'>1</span>
|
1253
|
+
<span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><?xml version="1.0" encoding="UTF-8"?></span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
1254
|
+
|
1255
|
+
<span class='const'>REXML</span><span class='op'>::</span><span class='const'>Document</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_doc'>doc</span><span class='op'>|</span>
|
1256
|
+
<span class='id identifier rubyid_doc'>doc</span> <span class='op'><<</span> <span class='id identifier rubyid_to_xml_element'>to_xml_element</span>
|
1257
|
+
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='label'>output:</span> <span class='id identifier rubyid_str'>str</span><span class='comma'>,</span> <span class='label'>indent:</span> <span class='id identifier rubyid_indent'>indent</span>
|
1258
|
+
<span class='kw'>end</span>
|
1259
|
+
|
1260
|
+
<span class='id identifier rubyid_str'>str</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
1261
|
+
<span class='kw'>end</span></pre>
|
1262
|
+
</td>
|
1263
|
+
</tr>
|
1264
|
+
</table>
|
1265
|
+
</div>
|
1266
|
+
|
1267
|
+
<div class="method_details ">
|
1268
|
+
<h3 class="signature " id="to_xml_element-instance_method">
|
1269
|
+
|
1270
|
+
- (<tt>REXML::Element</tt>) <strong>to_xml_element</strong>
|
1271
|
+
|
1272
|
+
|
1273
|
+
|
1274
|
+
|
1275
|
+
|
1276
|
+
</h3><div class="docstring">
|
1277
|
+
<div class="discussion">
|
1278
|
+
|
1279
|
+
<p>Returns an XML element representing this workspace.</p>
|
1280
|
+
|
1281
|
+
|
1282
|
+
</div>
|
1283
|
+
</div>
|
1284
|
+
<div class="tags">
|
1285
|
+
|
1286
|
+
<p class="tag_title">Returns:</p>
|
1287
|
+
<ul class="return">
|
1288
|
+
|
1289
|
+
<li>
|
1290
|
+
|
1291
|
+
|
1292
|
+
<span class='type'>(<tt>REXML::Element</tt>)</span>
|
1293
|
+
|
1294
|
+
|
1295
|
+
|
1296
|
+
—
|
1297
|
+
<div class='inline'>
|
1298
|
+
<p>an XML element representing this workspace.</p>
|
1299
|
+
</div>
|
1300
|
+
|
1301
|
+
</li>
|
1302
|
+
|
1303
|
+
</ul>
|
1304
|
+
|
1305
|
+
</div><table class="source_code">
|
1306
|
+
<tr>
|
1307
|
+
<td>
|
1308
|
+
<pre class="lines">
|
1309
|
+
|
1310
|
+
|
1311
|
+
83
|
1312
|
+
84
|
1313
|
+
85
|
1314
|
+
86
|
1315
|
+
87
|
1316
|
+
88
|
1317
|
+
89
|
1318
|
+
90
|
1319
|
+
91
|
1320
|
+
92
|
1321
|
+
93</pre>
|
1322
|
+
</td>
|
1323
|
+
<td>
|
1324
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 83</span>
|
1325
|
+
|
1326
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_xml_element'>to_xml_element</span>
|
1327
|
+
<span class='const'>REXML</span><span class='op'>::</span><span class='const'>Element</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Workspace</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_workspace'>workspace</span><span class='op'>|</span>
|
1328
|
+
<span class='id identifier rubyid_workspace'>workspace</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CurrentVersion</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>4.0</span><span class='tstring_end'>'</span></span>
|
1329
|
+
|
1330
|
+
<span class='id identifier rubyid_workspace'>workspace</span><span class='period'>.</span><span class='id identifier rubyid_add_element'>add_element</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Identifier</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span> <span class='rbrace'>}</span>
|
1331
|
+
<span class='id identifier rubyid_workspace'>workspace</span><span class='period'>.</span><span class='id identifier rubyid_add_element'>add_element</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CreateVersion</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>4.0</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
1332
|
+
<span class='id identifier rubyid_workspace'>workspace</span><span class='period'>.</span><span class='id identifier rubyid_add_element'>add_element</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Comments</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_description'>description</span> <span class='rbrace'>}</span>
|
1333
|
+
|
1334
|
+
<span class='ivar'>@projects</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_project'>project</span><span class='op'>|</span> <span class='id identifier rubyid_workspace'>workspace</span> <span class='op'><<</span> <span class='id identifier rubyid_project'>project</span><span class='period'>.</span><span class='id identifier rubyid_to_xml_element'>to_xml_element</span> <span class='rbrace'>}</span>
|
1335
|
+
<span class='kw'>end</span>
|
1336
|
+
<span class='kw'>end</span></pre>
|
1337
|
+
</td>
|
1338
|
+
</tr>
|
1339
|
+
</table>
|
975
1340
|
</div>
|
976
1341
|
|
977
1342
|
</div>
|
@@ -979,9 +1344,9 @@ found.</p>
|
|
979
1344
|
</div>
|
980
1345
|
|
981
1346
|
<div id="footer">
|
982
|
-
Generated on
|
1347
|
+
Generated on Tue Feb 24 17:43:02 2015 by
|
983
1348
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
984
|
-
0.8.7.
|
1349
|
+
0.8.7.6 (ruby-2.1.3).
|
985
1350
|
</div>
|
986
1351
|
|
987
1352
|
</body>
|