rrtf 0.1.2 → 1.0.0
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.
- checksums.yaml +4 -4
- data/.byebug_history +6 -3
- data/CHANGELOG.md +24 -0
- data/README.md +194 -84
- data/documentation/RRTF.html +5 -5
- data/documentation/RRTF/AnonymousStyle.html +792 -0
- data/documentation/RRTF/BorderFormatting.html +821 -0
- data/documentation/RRTF/BorderStyle.html +493 -0
- data/documentation/RRTF/CharacterFormatting.html +293 -162
- data/documentation/RRTF/CharacterStyle.html +53 -109
- data/documentation/RRTF/Colour.html +61 -1
- data/documentation/RRTF/ColourTable.html +52 -52
- data/documentation/RRTF/CommandNode.html +367 -971
- data/documentation/RRTF/ContainerNode.html +44 -44
- data/documentation/RRTF/Converters.html +1 -1
- data/documentation/RRTF/Converters/HTML.html +1 -1
- data/documentation/RRTF/Converters/HTML/Helpers.html +1 -1
- data/documentation/RRTF/Converters/HTML/Node.html +1 -1
- data/documentation/RRTF/Converters/HTML/NodeSet.html +1 -1
- data/documentation/RRTF/Document.html +267 -255
- data/documentation/RRTF/DocumentFormatting.html +833 -0
- data/documentation/RRTF/DocumentProperties.html +444 -0
- data/documentation/RRTF/Font.html +1 -1
- data/documentation/RRTF/FontTable.html +1 -1
- data/documentation/RRTF/FooterNode.html +16 -16
- data/documentation/RRTF/GeometryNode.html +774 -0
- data/documentation/RRTF/GeometryProperties.html +1014 -0
- data/documentation/RRTF/HeaderNode.html +16 -16
- data/documentation/RRTF/ImageNode.html +705 -492
- data/documentation/RRTF/Information.html +1 -1
- data/documentation/RRTF/LinkNode.html +10 -10
- data/documentation/RRTF/ListLevel.html +1 -1
- data/documentation/RRTF/ListLevelNode.html +37 -37
- data/documentation/RRTF/ListMarker.html +1 -1
- data/documentation/RRTF/ListNode.html +19 -19
- data/documentation/RRTF/ListTable.html +1 -1
- data/documentation/RRTF/ListTemplate.html +1 -1
- data/documentation/RRTF/ListTextNode.html +14 -14
- data/documentation/RRTF/Node.html +26 -26
- data/documentation/RRTF/Page.html +129 -0
- data/documentation/RRTF/Page/Margin.html +1158 -0
- data/documentation/RRTF/Page/Size.html +946 -0
- data/documentation/RRTF/PageFormatting.html +954 -0
- data/documentation/RRTF/ParagraphFormatting.html +338 -56
- data/documentation/RRTF/ParagraphNode.html +10 -10
- data/documentation/RRTF/ParagraphStyle.html +72 -111
- data/documentation/RRTF/PositionFormatting.html +780 -0
- data/documentation/RRTF/PositionStyle.html +424 -0
- data/documentation/RRTF/Properties.html +243 -0
- data/documentation/RRTF/RTFError.html +21 -10
- data/documentation/RRTF/ShadingFormatting.html +712 -0
- data/documentation/RRTF/ShadingStyle.html +424 -0
- data/documentation/RRTF/Style.html +284 -697
- data/documentation/RRTF/Stylesheet.html +36 -3
- data/documentation/RRTF/TableCellNode.html +131 -131
- data/documentation/RRTF/TableNode.html +82 -82
- data/documentation/RRTF/TableRowNode.html +53 -53
- data/documentation/RRTF/TextNode.html +46 -46
- data/documentation/RRTF/Utilities.html +837 -17
- data/documentation/_index.html +139 -6
- data/documentation/class_list.html +1 -1
- data/documentation/file.README.html +218 -87
- data/documentation/index.html +218 -87
- data/documentation/method_list.html +631 -391
- data/documentation/top-level-namespace.html +1 -1
- data/examples/01.rtf +947 -20
- data/examples/01_everything.rb +176 -0
- data/examples/02.rtf +13 -0
- data/examples/02_basic_paragraph.rb +10 -0
- data/examples/03.rtf +20 -0
- data/examples/03_paragraph_inline_style.rb +14 -0
- data/examples/04.rtf +21 -0
- data/examples/04_paragraph_with_character_style.rb +18 -0
- data/examples/05.rtf +21 -0
- data/examples/05_hyperlinks.rb +21 -0
- data/examples/06.rtf +21 -0
- data/examples/06_basic_list.rb +21 -0
- data/examples/07.rtf +28 -0
- data/examples/07_nested_list.rb +27 -0
- data/examples/08.rtf +807 -0
- data/examples/08_images.rb +17 -0
- data/examples/09.rtf +84 -0
- data/examples/09_shapes.rb +56 -0
- data/examples/10.rtf +34 -0
- data/examples/10_stylesheet.rb +18 -0
- data/examples/resources/images/redshirt.png +0 -0
- data/examples/resources/images/redshirts.jpg +0 -0
- data/examples/resources/json/redshirt_styles.json +72 -8
- data/examples/~$01.rtf +0 -0
- data/lib/rrtf.rb +4 -16
- data/lib/rrtf/colour.rb +8 -0
- data/lib/rrtf/formatting.rb +988 -0
- data/lib/rrtf/node.rb +17 -1851
- data/lib/rrtf/node/command_node.rb +242 -0
- data/lib/rrtf/node/container_node.rb +75 -0
- data/lib/rrtf/node/document.rb +339 -0
- data/lib/rrtf/node/footer_node.rb +47 -0
- data/lib/rrtf/node/geometry_node.rb +65 -0
- data/lib/rrtf/node/header_node.rb +47 -0
- data/lib/rrtf/node/image_node.rb +175 -0
- data/lib/rrtf/node/link_node.rb +10 -0
- data/lib/rrtf/node/list_level_node.rb +44 -0
- data/lib/rrtf/node/list_node.rb +30 -0
- data/lib/rrtf/node/list_text_node.rb +22 -0
- data/lib/rrtf/node/node.rb +53 -0
- data/lib/rrtf/node/paragraph_node.rb +11 -0
- data/lib/rrtf/node/table_cell_node.rb +233 -0
- data/lib/rrtf/node/table_node.rb +136 -0
- data/lib/rrtf/node/table_row_node.rb +92 -0
- data/lib/rrtf/node/text_node.rb +76 -0
- data/lib/rrtf/page.rb +7 -0
- data/lib/rrtf/page/margin.rb +98 -0
- data/lib/rrtf/page/size.rb +98 -0
- data/lib/rrtf/properties.rb +3 -0
- data/lib/rrtf/properties/document_properties.rb +34 -0
- data/lib/rrtf/properties/geometry_properties.rb +380 -0
- data/lib/rrtf/properties/properties.rb +13 -0
- data/lib/rrtf/style.rb +4 -5
- data/lib/rrtf/style/anonymous_style.rb +73 -0
- data/lib/rrtf/style/border_style.rb +27 -0
- data/lib/rrtf/style/character_style.rb +1 -7
- data/lib/rrtf/style/paragraph_style.rb +0 -6
- data/lib/rrtf/style/position_style.rb +26 -0
- data/lib/rrtf/style/shading_style.rb +26 -0
- data/lib/rrtf/style/style.rb +60 -101
- data/lib/rrtf/utilities.rb +138 -0
- data/lib/rrtf/version.rb +1 -1
- data/rrtf.gemspec +1 -0
- metadata +85 -10
- data/examples/01_mac_libreoffice5_2_3_3.png +0 -0
- data/examples/01_mac_pages6_2.png +0 -0
- data/examples/01_mac_textedit1_12.png +0 -0
- data/examples/01_mac_word15_36.png +0 -0
- data/examples/01_styles_and_paragraphs.rb +0 -32
- data/lib/rrtf/paper.rb +0 -53
- data/lib/rrtf/style/document_style.rb +0 -116
- data/lib/rrtf/style/formatting.rb +0 -320
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
|
|
99
99
|
<dl>
|
|
100
100
|
<dt>Defined in:</dt>
|
|
101
|
-
<dd>lib/rrtf/node.rb</dd>
|
|
101
|
+
<dd>lib/rrtf/node/table_node.rb</dd>
|
|
102
102
|
</dl>
|
|
103
103
|
|
|
104
104
|
</div>
|
|
@@ -451,7 +451,7 @@ class to forbid addition of further nodes.</p>
|
|
|
451
451
|
<p>A reference to the node that owns the table.</p>
|
|
452
452
|
</dd><dt>rows
|
|
453
453
|
<dd>
|
|
454
|
-
<p>The number of rows in the
|
|
454
|
+
<p>The number of rows in the table.</p>
|
|
455
455
|
</dd><dt>columns
|
|
456
456
|
<dd>
|
|
457
457
|
<p>The number of columns in the table.</p>
|
|
@@ -472,27 +472,27 @@ class to forbid addition of further nodes.</p>
|
|
|
472
472
|
<pre class="lines">
|
|
473
473
|
|
|
474
474
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
475
|
+
17
|
|
476
|
+
18
|
|
477
|
+
19
|
|
478
|
+
20
|
|
479
|
+
21
|
|
480
|
+
22
|
|
481
|
+
23
|
|
482
|
+
24
|
|
483
|
+
25
|
|
484
|
+
26
|
|
485
|
+
27
|
|
486
|
+
28
|
|
487
|
+
29
|
|
488
|
+
30
|
|
489
|
+
31
|
|
490
|
+
32
|
|
491
|
+
33
|
|
492
|
+
34</pre>
|
|
493
493
|
</td>
|
|
494
494
|
<td>
|
|
495
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
495
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 17</span>
|
|
496
496
|
|
|
497
497
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</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><span class='rparen'>)</span>
|
|
498
498
|
<span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='op'>>=</span><span class='int'>2</span>
|
|
@@ -550,12 +550,12 @@ class to forbid addition of further nodes.</p>
|
|
|
550
550
|
<pre class="lines">
|
|
551
551
|
|
|
552
552
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
553
|
+
7
|
|
554
|
+
8
|
|
555
|
+
9</pre>
|
|
556
556
|
</td>
|
|
557
557
|
<td>
|
|
558
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
558
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 7</span>
|
|
559
559
|
|
|
560
560
|
<span class='kw'>def</span> <span class='id identifier rubyid_cell_margin'>cell_margin</span>
|
|
561
561
|
<span class='ivar'>@cell_margin</span>
|
|
@@ -606,12 +606,12 @@ switches the border off.</p>
|
|
|
606
606
|
<pre class="lines">
|
|
607
607
|
|
|
608
608
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
609
|
+
52
|
|
610
|
+
53
|
|
611
|
+
54</pre>
|
|
612
612
|
</td>
|
|
613
613
|
<td>
|
|
614
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
614
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 52</span>
|
|
615
615
|
|
|
616
616
|
<span class='kw'>def</span> <span class='id identifier rubyid_border_width='>border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
|
617
617
|
<span class='kw'>self</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_row'>row</span><span class='op'>|</span> <span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_border_width'>border_width</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='rbrace'>}</span>
|
|
@@ -663,15 +663,15 @@ Set to nil to clear shading.</p>
|
|
|
663
663
|
<pre class="lines">
|
|
664
664
|
|
|
665
665
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
666
|
+
77
|
|
667
|
+
78
|
|
668
|
+
79
|
|
669
|
+
80
|
|
670
|
+
81
|
|
671
|
+
82</pre>
|
|
672
672
|
</td>
|
|
673
673
|
<td>
|
|
674
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
674
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 77</span>
|
|
675
675
|
|
|
676
676
|
<span class='kw'>def</span> <span class='id identifier rubyid_column_shading_colour'>column_shading_colour</span><span class='lparen'>(</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span>
|
|
677
677
|
<span class='kw'>self</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_row'>row</span><span class='op'>|</span>
|
|
@@ -710,12 +710,12 @@ Set to nil to clear shading.</p>
|
|
|
710
710
|
<pre class="lines">
|
|
711
711
|
|
|
712
712
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
42
|
|
714
|
+
43
|
|
715
|
+
44</pre>
|
|
716
716
|
</td>
|
|
717
717
|
<td>
|
|
718
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
718
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 42</span>
|
|
719
719
|
|
|
720
720
|
<span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span>
|
|
721
721
|
<span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
|
@@ -766,13 +766,13 @@ Set to nil to clear shading.</p>
|
|
|
766
766
|
<pre class="lines">
|
|
767
767
|
|
|
768
768
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
769
|
+
64
|
|
770
|
+
65
|
|
771
|
+
66
|
|
772
|
+
67</pre>
|
|
773
773
|
</td>
|
|
774
774
|
<td>
|
|
775
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
775
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 64</span>
|
|
776
776
|
|
|
777
777
|
<span class='kw'>def</span> <span class='id identifier rubyid_row_shading_colour'>row_shading_colour</span><span class='lparen'>(</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span>
|
|
778
778
|
<span class='id identifier rubyid_row'>row</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span>
|
|
@@ -809,12 +809,12 @@ Set to nil to clear shading.</p>
|
|
|
809
809
|
<pre class="lines">
|
|
810
810
|
|
|
811
811
|
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
812
|
+
37
|
|
813
|
+
38
|
|
814
|
+
39</pre>
|
|
815
815
|
</td>
|
|
816
816
|
<td>
|
|
817
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
817
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 37</span>
|
|
818
818
|
|
|
819
819
|
<span class='kw'>def</span> <span class='id identifier rubyid_rows'>rows</span>
|
|
820
820
|
<span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
|
|
@@ -866,20 +866,20 @@ applied. Set to nil to remove shading.</p>
|
|
|
866
866
|
<pre class="lines">
|
|
867
867
|
|
|
868
868
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
869
|
+
94
|
|
870
|
+
95
|
|
871
|
+
96
|
|
872
|
+
97
|
|
873
|
+
98
|
|
874
|
+
99
|
|
875
|
+
100
|
|
876
|
+
101
|
|
877
|
+
102
|
|
878
|
+
103
|
|
879
|
+
104</pre>
|
|
880
880
|
</td>
|
|
881
881
|
<td>
|
|
882
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
882
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 94</span>
|
|
883
883
|
|
|
884
884
|
<span class='kw'>def</span> <span class='id identifier rubyid_shading_colour'>shading_colour</span><span class='lparen'>(</span><span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span>
|
|
885
885
|
<span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
@@ -930,12 +930,12 @@ class to forbid addition of further nodes.</p>
|
|
|
930
930
|
<pre class="lines">
|
|
931
931
|
|
|
932
932
|
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
933
|
+
111
|
|
934
|
+
112
|
|
935
|
+
113</pre>
|
|
936
936
|
</td>
|
|
937
937
|
<td>
|
|
938
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
938
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 111</span>
|
|
939
939
|
|
|
940
940
|
<span class='kw'>def</span> <span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
|
941
941
|
<span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Table nodes cannot have nodes added to.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
@@ -971,24 +971,24 @@ class to forbid addition of further nodes.</p>
|
|
|
971
971
|
<pre class="lines">
|
|
972
972
|
|
|
973
973
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
974
|
+
116
|
|
975
|
+
117
|
|
976
|
+
118
|
|
977
|
+
119
|
|
978
|
+
120
|
|
979
|
+
121
|
|
980
|
+
122
|
|
981
|
+
123
|
|
982
|
+
124
|
|
983
|
+
125
|
|
984
|
+
126
|
|
985
|
+
127
|
|
986
|
+
128
|
|
987
|
+
129
|
|
988
|
+
130</pre>
|
|
989
989
|
</td>
|
|
990
990
|
<td>
|
|
991
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
991
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_node.rb', line 116</span>
|
|
992
992
|
|
|
993
993
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
|
|
994
994
|
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
@@ -1015,7 +1015,7 @@ class to forbid addition of further nodes.</p>
|
|
|
1015
1015
|
</div>
|
|
1016
1016
|
|
|
1017
1017
|
<div id="footer">
|
|
1018
|
-
Generated on Mon Jul
|
|
1018
|
+
Generated on Mon Jul 31 21:49:00 2017 by
|
|
1019
1019
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1020
1020
|
0.9.9 (ruby-2.3.3).
|
|
1021
1021
|
</div>
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
|
|
99
99
|
<dl>
|
|
100
100
|
<dt>Defined in:</dt>
|
|
101
|
-
<dd>lib/rrtf/node.rb</dd>
|
|
101
|
+
<dd>lib/rrtf/node/table_row_node.rb</dd>
|
|
102
102
|
</dl>
|
|
103
103
|
|
|
104
104
|
</div>
|
|
@@ -357,18 +357,18 @@ forbid the alteration of the cells parent.</p>
|
|
|
357
357
|
<pre class="lines">
|
|
358
358
|
|
|
359
359
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
360
|
+
14
|
|
361
|
+
15
|
|
362
|
+
16
|
|
363
|
+
17
|
|
364
|
+
18
|
|
365
|
+
19
|
|
366
|
+
20
|
|
367
|
+
21
|
|
368
|
+
22</pre>
|
|
369
369
|
</td>
|
|
370
370
|
<td>
|
|
371
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
371
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_row_node.rb', line 14</span>
|
|
372
372
|
|
|
373
373
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='comma'>,</span> <span class='id identifier rubyid_cells'>cells</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_widths'>widths</span><span class='rparen'>)</span>
|
|
374
374
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
|
@@ -425,12 +425,12 @@ switches the border off.</p>
|
|
|
425
425
|
<pre class="lines">
|
|
426
426
|
|
|
427
427
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
428
|
+
35
|
|
429
|
+
36
|
|
430
|
+
37</pre>
|
|
431
431
|
</td>
|
|
432
432
|
<td>
|
|
433
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
433
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_row_node.rb', line 35</span>
|
|
434
434
|
|
|
435
435
|
<span class='kw'>def</span> <span class='id identifier rubyid_border_width='>border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
|
436
436
|
<span class='kw'>self</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_cell'>cell</span><span class='op'>|</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_border_width'>border_width</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='rbrace'>}</span>
|
|
@@ -466,12 +466,12 @@ switches the border off.</p>
|
|
|
466
466
|
<pre class="lines">
|
|
467
467
|
|
|
468
468
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
469
|
+
25
|
|
470
|
+
26
|
|
471
|
+
27</pre>
|
|
472
472
|
</td>
|
|
473
473
|
<td>
|
|
474
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
474
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_row_node.rb', line 25</span>
|
|
475
475
|
|
|
476
476
|
<span class='kw'>def</span> <span class='id identifier rubyid_length'>length</span>
|
|
477
477
|
<span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
|
|
@@ -514,12 +514,12 @@ forbid the alteration of the cells parent.</p>
|
|
|
514
514
|
<pre class="lines">
|
|
515
515
|
|
|
516
516
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
517
|
+
44
|
|
518
|
+
45
|
|
519
|
+
46</pre>
|
|
520
520
|
</td>
|
|
521
521
|
<td>
|
|
522
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
522
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_row_node.rb', line 44</span>
|
|
523
523
|
|
|
524
524
|
<span class='kw'>def</span> <span class='id identifier rubyid_parent='>parent=</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
|
|
525
525
|
<span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Table row nodes cannot have their parent changed.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
@@ -562,12 +562,12 @@ Set to nil to switch shading off.</p>
|
|
|
562
562
|
<pre class="lines">
|
|
563
563
|
|
|
564
564
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
565
|
+
53
|
|
566
|
+
54
|
|
567
|
+
55</pre>
|
|
568
568
|
</td>
|
|
569
569
|
<td>
|
|
570
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
570
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_row_node.rb', line 53</span>
|
|
571
571
|
|
|
572
572
|
<span class='kw'>def</span> <span class='id identifier rubyid_shading_colour='>shading_colour=</span><span class='lparen'>(</span><span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span>
|
|
573
573
|
<span class='kw'>self</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_cell'>cell</span><span class='op'>|</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_shading_colour'>shading_colour</span> <span class='op'>=</span> <span class='id identifier rubyid_colour'>colour</span><span class='rbrace'>}</span>
|
|
@@ -603,33 +603,33 @@ Set to nil to switch shading off.</p>
|
|
|
603
603
|
<pre class="lines">
|
|
604
604
|
|
|
605
605
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
606
|
+
67
|
|
607
|
+
68
|
|
608
|
+
69
|
|
609
|
+
70
|
|
610
|
+
71
|
|
611
|
+
72
|
|
612
|
+
73
|
|
613
|
+
74
|
|
614
|
+
75
|
|
615
|
+
76
|
|
616
|
+
77
|
|
617
|
+
78
|
|
618
|
+
79
|
|
619
|
+
80
|
|
620
|
+
81
|
|
621
|
+
82
|
|
622
|
+
83
|
|
623
|
+
84
|
|
624
|
+
85
|
|
625
|
+
86
|
|
626
|
+
87
|
|
627
|
+
88
|
|
628
|
+
89
|
|
629
|
+
90</pre>
|
|
630
630
|
</td>
|
|
631
631
|
<td>
|
|
632
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
632
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/table_row_node.rb', line 67</span>
|
|
633
633
|
|
|
634
634
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
|
|
635
635
|
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
@@ -665,7 +665,7 @@ Set to nil to switch shading off.</p>
|
|
|
665
665
|
</div>
|
|
666
666
|
|
|
667
667
|
<div id="footer">
|
|
668
|
-
Generated on Mon Jul
|
|
668
|
+
Generated on Mon Jul 31 21:49:00 2017 by
|
|
669
669
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
670
670
|
0.9.9 (ruby-2.3.3).
|
|
671
671
|
</div>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
<dl>
|
|
98
98
|
<dt>Defined in:</dt>
|
|
99
|
-
<dd>lib/rrtf/node.rb</dd>
|
|
99
|
+
<dd>lib/rrtf/node/text_node.rb</dd>
|
|
100
100
|
</dl>
|
|
101
101
|
|
|
102
102
|
</div>
|
|
@@ -323,17 +323,17 @@ object.</p>
|
|
|
323
323
|
<pre class="lines">
|
|
324
324
|
|
|
325
325
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
326
|
+
20
|
|
327
|
+
21
|
|
328
|
+
22
|
|
329
|
+
23
|
|
330
|
+
24
|
|
331
|
+
25
|
|
332
|
+
26
|
|
333
|
+
27</pre>
|
|
334
334
|
</td>
|
|
335
335
|
<td>
|
|
336
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
336
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/text_node.rb', line 20</span>
|
|
337
337
|
|
|
338
338
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
|
339
339
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
|
|
@@ -381,12 +381,12 @@ object.</p>
|
|
|
381
381
|
<pre class="lines">
|
|
382
382
|
|
|
383
383
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
384
|
+
8
|
|
385
|
+
9
|
|
386
|
+
10</pre>
|
|
387
387
|
</td>
|
|
388
388
|
<td>
|
|
389
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
389
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/text_node.rb', line 8</span>
|
|
390
390
|
|
|
391
391
|
<span class='kw'>def</span> <span class='id identifier rubyid_text'>text</span>
|
|
392
392
|
<span class='ivar'>@text</span>
|
|
@@ -436,12 +436,12 @@ a TextNode object.</p>
|
|
|
436
436
|
<pre class="lines">
|
|
437
437
|
|
|
438
438
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
439
|
+
34
|
|
440
|
+
35
|
|
441
|
+
36</pre>
|
|
442
442
|
</td>
|
|
443
443
|
<td>
|
|
444
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
444
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/text_node.rb', line 34</span>
|
|
445
445
|
|
|
446
446
|
<span class='kw'>def</span> <span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
|
|
447
447
|
<span class='ivar'>@text</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='ivar'>@text</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>:</span> <span class='ivar'>@text</span> <span class='op'>+</span> <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
|
@@ -490,16 +490,16 @@ at.</p>
|
|
|
490
490
|
<pre class="lines">
|
|
491
491
|
|
|
492
492
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
493
|
+
47
|
|
494
|
+
48
|
|
495
|
+
49
|
|
496
|
+
50
|
|
497
|
+
51
|
|
498
|
+
52
|
|
499
|
+
53</pre>
|
|
500
500
|
</td>
|
|
501
501
|
<td>
|
|
502
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
502
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/text_node.rb', line 47</span>
|
|
503
503
|
|
|
504
504
|
<span class='kw'>def</span> <span class='id identifier rubyid_insert'>insert</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='id identifier rubyid_offset'>offset</span><span class='rparen'>)</span>
|
|
505
505
|
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@text</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
@@ -540,27 +540,27 @@ escapes any special sequences that appear in the text.</p>
|
|
|
540
540
|
<pre class="lines">
|
|
541
541
|
|
|
542
542
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
543
|
+
57
|
|
544
|
+
58
|
|
545
|
+
59
|
|
546
|
+
60
|
|
547
|
+
61
|
|
548
|
+
62
|
|
549
|
+
63
|
|
550
|
+
64
|
|
551
|
+
65
|
|
552
|
+
66
|
|
553
|
+
67
|
|
554
|
+
68
|
|
555
|
+
69
|
|
556
|
+
70
|
|
557
|
+
71
|
|
558
|
+
72
|
|
559
|
+
73
|
|
560
|
+
74</pre>
|
|
561
561
|
</td>
|
|
562
562
|
<td>
|
|
563
|
-
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line
|
|
563
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/text_node.rb', line 57</span>
|
|
564
564
|
|
|
565
565
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
|
|
566
566
|
<span class='id identifier rubyid_rtf'>rtf</span><span class='op'>=</span><span class='lparen'>(</span><span class='ivar'>@text</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='ivar'>@text</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\{</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\\\</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
@@ -590,7 +590,7 @@ escapes any special sequences that appear in the text.</p>
|
|
|
590
590
|
</div>
|
|
591
591
|
|
|
592
592
|
<div id="footer">
|
|
593
|
-
Generated on Mon Jul
|
|
593
|
+
Generated on Mon Jul 31 21:48:59 2017 by
|
|
594
594
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
595
595
|
0.9.9 (ruby-2.3.3).
|
|
596
596
|
</div>
|