rrtf 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -7
  3. data/documentation/RRTF/CharacterFormatting.html +1002 -0
  4. data/documentation/RRTF/CharacterStyle.html +1058 -0
  5. data/documentation/RRTF/Colour.html +813 -0
  6. data/documentation/RRTF/ColourTable.html +770 -0
  7. data/documentation/RRTF/CommandNode.html +2372 -0
  8. data/documentation/RRTF/ContainerNode.html +826 -0
  9. data/documentation/RRTF/Converters/HTML/Helpers.html +272 -0
  10. data/documentation/RRTF/Converters/HTML/Node.html +364 -0
  11. data/documentation/RRTF/Converters/HTML/NodeSet.html +265 -0
  12. data/documentation/RRTF/Converters/HTML.html +337 -0
  13. data/documentation/RRTF/Converters.html +117 -0
  14. data/documentation/RRTF/Document.html +2405 -0
  15. data/documentation/RRTF/DocumentStyle.html +1367 -0
  16. data/documentation/RRTF/Font.html +790 -0
  17. data/documentation/RRTF/FontTable.html +763 -0
  18. data/documentation/RRTF/FooterNode.html +515 -0
  19. data/documentation/RRTF/HeaderNode.html +515 -0
  20. data/documentation/RRTF/ImageNode.html +1374 -0
  21. data/documentation/RRTF/Information.html +809 -0
  22. data/documentation/RRTF/LinkNode.html +264 -0
  23. data/documentation/RRTF/ListLevel.html +799 -0
  24. data/documentation/RRTF/ListLevelNode.html +612 -0
  25. data/documentation/RRTF/ListMarker.html +595 -0
  26. data/documentation/RRTF/ListNode.html +368 -0
  27. data/documentation/RRTF/ListTable.html +343 -0
  28. data/documentation/RRTF/ListTemplate.html +433 -0
  29. data/documentation/RRTF/ListTextNode.html +285 -0
  30. data/documentation/RRTF/Node.html +616 -0
  31. data/documentation/RRTF/Paper.html +624 -0
  32. data/documentation/RRTF/ParagraphFormatting.html +749 -0
  33. data/documentation/RRTF/ParagraphNode.html +275 -0
  34. data/documentation/RRTF/ParagraphStyle.html +1319 -0
  35. data/documentation/RRTF/RTFError.html +295 -0
  36. data/documentation/RRTF/Style.html +1767 -0
  37. data/documentation/RRTF/Stylesheet.html +1768 -0
  38. data/documentation/RRTF/TableCellNode.html +1704 -0
  39. data/documentation/RRTF/TableNode.html +1025 -0
  40. data/documentation/RRTF/TableRowNode.html +675 -0
  41. data/documentation/RRTF/TextNode.html +600 -0
  42. data/documentation/RRTF/Utilities.html +201 -0
  43. data/documentation/RRTF.html +129 -0
  44. data/documentation/_index.html +478 -0
  45. data/documentation/class_list.html +51 -0
  46. data/documentation/css/common.css +1 -0
  47. data/documentation/css/full_list.css +58 -0
  48. data/documentation/css/style.css +492 -0
  49. data/documentation/file.README.html +223 -0
  50. data/documentation/file_list.html +56 -0
  51. data/documentation/frames.html +17 -0
  52. data/documentation/index.html +223 -0
  53. data/documentation/js/app.js +248 -0
  54. data/documentation/js/full_list.js +216 -0
  55. data/documentation/js/jquery.js +4 -0
  56. data/documentation/method_list.html +2203 -0
  57. data/documentation/top-level-namespace.html +110 -0
  58. data/examples/01.rtf +14 -17
  59. data/examples/01_mac_word15_36.png +0 -0
  60. data/examples/01_styles_and_paragraphs.rb +3 -4
  61. data/examples/resources/json/redshirt_styles.json +4 -2
  62. data/lib/rrtf/node.rb +86 -167
  63. data/lib/rrtf/style/character_style.rb +4 -3
  64. data/lib/rrtf/style/formatting.rb +55 -11
  65. data/lib/rrtf/style/paragraph_style.rb +19 -4
  66. data/lib/rrtf/style/style.rb +15 -15
  67. data/lib/rrtf/stylesheet.rb +57 -16
  68. data/lib/rrtf/version.rb +1 -1
  69. data/rrtf.gemspec +1 -0
  70. metadata +70 -1
@@ -0,0 +1,1025 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: RRTF::TableNode
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "RRTF::TableNode";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../RRTF.html" title="RRTF (module)">RRTF</a></span></span>
41
+ &raquo;
42
+ <span class="title">TableNode</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: RRTF::TableNode
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></li>
78
+
79
+ <li class="next"><span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></li>
80
+
81
+ <li class="next">RRTF::TableNode</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/rrtf/node.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>This class represents a table node within an RTF document. Table nodes are
110
+ specialised container nodes that contain only TableRowNodes and have their
111
+ size specified when they are created an cannot be resized after that.</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div>
120
+
121
+
122
+
123
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#cell_margin-instance_method" title="#cell_margin (instance method)">#<strong>cell_margin</strong> &#x21d2; Object </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'>
147
+ <p>Cell margin.</p>
148
+ </div></span>
149
+
150
+ </li>
151
+
152
+
153
+ </ul>
154
+
155
+
156
+
157
+
158
+
159
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
160
+ <p class="inherited"><span class='object_link'><a href="ContainerNode.html#children-instance_method" title="RRTF::ContainerNode#children (method)">#children</a></span></p>
161
+
162
+
163
+
164
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
165
+ <p class="inherited"><span class='object_link'><a href="Node.html#parent-instance_method" title="RRTF::Node#parent (method)">#parent</a></span></p>
166
+
167
+
168
+
169
+ <h2>
170
+ Instance Method Summary
171
+ <small><a href="#" class="summary_toggle">collapse</a></small>
172
+ </h2>
173
+
174
+ <ul class="summary">
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#border_width=-instance_method" title="#border_width= (instance method)">#<strong>border_width=</strong>(width) &#x21d2; Object </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'>
194
+ <p>This method assigns a border width setting to all of the sides on all of
195
+ the cells within a table.</p>
196
+ </div></span>
197
+
198
+ </li>
199
+
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#column_shading_colour-instance_method" title="#column_shading_colour (instance method)">#<strong>column_shading_colour</strong>(index, colour) &#x21d2; Object </a>
205
+
206
+
207
+
208
+ (also: #column_shading_color)
209
+
210
+ </span>
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ <span class="summary_desc"><div class='inline'>
221
+ <p>This method assigns a shading colour to a specified column within a
222
+ TableNode object.</p>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#columns-instance_method" title="#columns (instance method)">#<strong>columns</strong> &#x21d2; Object </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ <span class="summary_desc"><div class='inline'>
246
+ <p>Attribute accessor.</p>
247
+ </div></span>
248
+
249
+ </li>
250
+
251
+
252
+ <li class="public ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(parent, *args, &amp;block) &#x21d2; TableNode </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+ <span class="note title constructor">constructor</span>
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+ <span class="summary_desc"><div class='inline'>
272
+ <p>This is a constructor for the TableNode class.</p>
273
+ </div></span>
274
+
275
+ </li>
276
+
277
+
278
+ <li class="public ">
279
+ <span class="summary_signature">
280
+
281
+ <a href="#row_shading_colour-instance_method" title="#row_shading_colour (instance method)">#<strong>row_shading_colour</strong>(index, colour) &#x21d2; Object </a>
282
+
283
+
284
+
285
+ (also: #row_shading_color)
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'>
298
+ <p>This method assigns a shading colour to a specified row within a TableNode
299
+ object.</p>
300
+ </div></span>
301
+
302
+ </li>
303
+
304
+
305
+ <li class="public ">
306
+ <span class="summary_signature">
307
+
308
+ <a href="#rows-instance_method" title="#rows (instance method)">#<strong>rows</strong> &#x21d2; Object </a>
309
+
310
+
311
+
312
+ </span>
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+ <span class="summary_desc"><div class='inline'>
323
+ <p>Attribute accessor.</p>
324
+ </div></span>
325
+
326
+ </li>
327
+
328
+
329
+ <li class="public ">
330
+ <span class="summary_signature">
331
+
332
+ <a href="#shading_colour-instance_method" title="#shading_colour (instance method)">#<strong>shading_colour</strong>(colour) &#x21d2; Object </a>
333
+
334
+
335
+
336
+ (also: #shading_color)
337
+
338
+ </span>
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+ <span class="summary_desc"><div class='inline'>
349
+ <p>This method provides a means of assigning a shading colour to a selection
350
+ of cells within a table.</p>
351
+ </div></span>
352
+
353
+ </li>
354
+
355
+
356
+ <li class="public ">
357
+ <span class="summary_signature">
358
+
359
+ <a href="#store-instance_method" title="#store (instance method)">#<strong>store</strong>(node) &#x21d2; Object </a>
360
+
361
+
362
+
363
+ </span>
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <span class="summary_desc"><div class='inline'>
374
+ <p>This method overloads the store method inherited from the ContainerNode
375
+ class to forbid addition of further nodes.</p>
376
+ </div></span>
377
+
378
+ </li>
379
+
380
+
381
+ <li class="public ">
382
+ <span class="summary_signature">
383
+
384
+ <a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong> &#x21d2; Object </a>
385
+
386
+
387
+
388
+ </span>
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+ <span class="summary_desc"><div class='inline'>
399
+ <p>This method generates the RTF document text for a TableCellNode object.</p>
400
+ </div></span>
401
+
402
+ </li>
403
+
404
+
405
+ </ul>
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
418
+ <p class="inherited"><span class='object_link'><a href="ContainerNode.html#[]-instance_method" title="RRTF::ContainerNode#[] (method)">#[]</a></span>, <span class='object_link'><a href="ContainerNode.html#each-instance_method" title="RRTF::ContainerNode#each (method)">#each</a></span>, <span class='object_link'><a href="ContainerNode.html#first-instance_method" title="RRTF::ContainerNode#first (method)">#first</a></span>, <span class='object_link'><a href="ContainerNode.html#last-instance_method" title="RRTF::ContainerNode#last (method)">#last</a></span>, <span class='object_link'><a href="ContainerNode.html#size-instance_method" title="RRTF::ContainerNode#size (method)">#size</a></span></p>
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
430
+ <p class="inherited"><span class='object_link'><a href="Node.html#is_root%3F-instance_method" title="RRTF::Node#is_root? (method)">#is_root?</a></span>, <span class='object_link'><a href="Node.html#next_node-instance_method" title="RRTF::Node#next_node (method)">#next_node</a></span>, <span class='object_link'><a href="Node.html#previous_node-instance_method" title="RRTF::Node#previous_node (method)">#previous_node</a></span>, <span class='object_link'><a href="Node.html#root-instance_method" title="RRTF::Node#root (method)">#root</a></span></p>
431
+ <div id="constructor_details" class="method_details_list">
432
+ <h2>Constructor Details</h2>
433
+
434
+ <div class="method_details first">
435
+ <h3 class="signature first" id="initialize-instance_method">
436
+
437
+ #<strong>initialize</strong>(parent, *args, &amp;block) &#x21d2; <tt><span class='object_link'><a href="" title="RRTF::TableNode (class)">TableNode</a></span></tt>
438
+
439
+
440
+
441
+
442
+
443
+ </h3><div class="docstring">
444
+ <div class="discussion">
445
+
446
+ <p>This is a constructor for the TableNode class.</p>
447
+
448
+ <h4 id="label-Parameters">Parameters</h4>
449
+ <dl class="rdoc-list note-list"><dt>parent
450
+ <dd>
451
+ <p>A reference to the node that owns the table.</p>
452
+ </dd><dt>rows
453
+ <dd>
454
+ <p>The number of rows in the tabkle.</p>
455
+ </dd><dt>columns
456
+ <dd>
457
+ <p>The number of columns in the table.</p>
458
+ </dd><dt>*widths
459
+ <dd>
460
+ <p>One or more integers specifying the widths of the table columns.</p>
461
+ </dd></dl>
462
+
463
+
464
+ </div>
465
+ </div>
466
+ <div class="tags">
467
+
468
+
469
+ </div><table class="source_code">
470
+ <tr>
471
+ <td>
472
+ <pre class="lines">
473
+
474
+
475
+ 713
476
+ 714
477
+ 715
478
+ 716
479
+ 717
480
+ 718
481
+ 719
482
+ 720
483
+ 721
484
+ 722
485
+ 723
486
+ 724
487
+ 725
488
+ 726
489
+ 727
490
+ 728
491
+ 729
492
+ 730</pre>
493
+ </td>
494
+ <td>
495
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 713</span>
496
+
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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
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'>&gt;=</span><span class='int'>2</span>
499
+ <span class='id identifier rubyid_rows'>rows</span><span class='op'>=</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span>
500
+ <span class='id identifier rubyid_columns'>columns</span><span class='op'>=</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span>
501
+ <span class='id identifier rubyid_widths'>widths</span><span class='op'>=</span><span class='id identifier rubyid_args'>args</span>
502
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span> <span class='kw'>do</span>
503
+ <span class='id identifier rubyid_entries'>entries</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
504
+ <span class='id identifier rubyid_rows'>rows</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='lbrace'>{</span><span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="TableRowNode.html" title="RRTF::TableRowNode (class)">TableRowNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TableRowNode.html#initialize-instance_method" title="RRTF::TableRowNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_columns'>columns</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_widths'>widths</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rbrace'>}</span>
505
+ <span class='id identifier rubyid_entries'>entries</span>
506
+ <span class='kw'>end</span>
507
+
508
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_block'>block</span>
509
+ <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_arity'>arity</span><span class='op'>&lt;</span><span class='int'>1</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
510
+ <span class='kw'>else</span>
511
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>You should use 0 or &gt;2 args</span><span class='tstring_end'>&quot;</span></span>
512
+ <span class='kw'>end</span>
513
+ <span class='ivar'>@cell_margin</span> <span class='op'>=</span> <span class='int'>100</span>
514
+ <span class='kw'>end</span></pre>
515
+ </td>
516
+ </tr>
517
+ </table>
518
+ </div>
519
+
520
+ </div>
521
+
522
+ <div id="instance_attr_details" class="attr_details">
523
+ <h2>Instance Attribute Details</h2>
524
+
525
+
526
+ <span id="cell_margin=-instance_method"></span>
527
+ <div class="method_details first">
528
+ <h3 class="signature first" id="cell_margin-instance_method">
529
+
530
+ #<strong>cell_margin</strong> &#x21d2; <tt>Object</tt>
531
+
532
+
533
+
534
+
535
+
536
+ </h3><div class="docstring">
537
+ <div class="discussion">
538
+
539
+ <p>Cell margin. Default to 100</p>
540
+
541
+
542
+ </div>
543
+ </div>
544
+ <div class="tags">
545
+
546
+
547
+ </div><table class="source_code">
548
+ <tr>
549
+ <td>
550
+ <pre class="lines">
551
+
552
+
553
+ 703
554
+ 704
555
+ 705</pre>
556
+ </td>
557
+ <td>
558
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 703</span>
559
+
560
+ <span class='kw'>def</span> <span class='id identifier rubyid_cell_margin'>cell_margin</span>
561
+ <span class='ivar'>@cell_margin</span>
562
+ <span class='kw'>end</span></pre>
563
+ </td>
564
+ </tr>
565
+ </table>
566
+ </div>
567
+
568
+ </div>
569
+
570
+
571
+ <div id="instance_method_details" class="method_details_list">
572
+ <h2>Instance Method Details</h2>
573
+
574
+
575
+ <div class="method_details first">
576
+ <h3 class="signature first" id="border_width=-instance_method">
577
+
578
+ #<strong>border_width=</strong>(width) &#x21d2; <tt>Object</tt>
579
+
580
+
581
+
582
+
583
+
584
+ </h3><div class="docstring">
585
+ <div class="discussion">
586
+
587
+ <p>This method assigns a border width setting to all of the sides on all of
588
+ the cells within a table.</p>
589
+
590
+ <h4 id="label-Parameters">Parameters</h4>
591
+ <dl class="rdoc-list note-list"><dt>width
592
+ <dd>
593
+ <p>The border width setting to apply. Negative values are ignored and zero
594
+ switches the border off.</p>
595
+ </dd></dl>
596
+
597
+
598
+ </div>
599
+ </div>
600
+ <div class="tags">
601
+
602
+
603
+ </div><table class="source_code">
604
+ <tr>
605
+ <td>
606
+ <pre class="lines">
607
+
608
+
609
+ 748
610
+ 749
611
+ 750</pre>
612
+ </td>
613
+ <td>
614
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 748</span>
615
+
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
+ <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>
618
+ <span class='kw'>end</span></pre>
619
+ </td>
620
+ </tr>
621
+ </table>
622
+ </div>
623
+
624
+ <div class="method_details ">
625
+ <h3 class="signature " id="column_shading_colour-instance_method">
626
+
627
+ #<strong>column_shading_colour</strong>(index, colour) &#x21d2; <tt>Object</tt>
628
+
629
+
630
+
631
+ <span class="aliases">Also known as:
632
+ <span class="names"><span id='column_shading_color-instance_method'>column_shading_color</span></span>
633
+ </span>
634
+
635
+
636
+
637
+ </h3><div class="docstring">
638
+ <div class="discussion">
639
+
640
+ <p>This method assigns a shading colour to a specified column within a
641
+ TableNode object.</p>
642
+
643
+ <h4 id="label-Parameters">Parameters</h4>
644
+ <dl class="rdoc-list note-list"><dt>index
645
+ <dd>
646
+ <p>The offset from the first column of the column to have shading applied to
647
+ it.</p>
648
+ </dd><dt>colour
649
+ <dd>
650
+ <p>A reference to a Colour object representing the shading colour to be used.
651
+ Set to nil to clear shading.</p>
652
+ </dd></dl>
653
+
654
+
655
+ </div>
656
+ </div>
657
+ <div class="tags">
658
+
659
+
660
+ </div><table class="source_code">
661
+ <tr>
662
+ <td>
663
+ <pre class="lines">
664
+
665
+
666
+ 773
667
+ 774
668
+ 775
669
+ 776
670
+ 777
671
+ 778</pre>
672
+ </td>
673
+ <td>
674
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 773</span>
675
+
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
+ <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>
678
+ <span class='id identifier rubyid_cell'>cell</span> <span class='op'>=</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span>
679
+ <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='kw'>if</span> <span class='id identifier rubyid_cell'>cell</span> <span class='op'>!=</span> <span class='kw'>nil</span>
680
+ <span class='kw'>end</span>
681
+ <span class='kw'>end</span></pre>
682
+ </td>
683
+ </tr>
684
+ </table>
685
+ </div>
686
+
687
+ <div class="method_details ">
688
+ <h3 class="signature " id="columns-instance_method">
689
+
690
+ #<strong>columns</strong> &#x21d2; <tt>Object</tt>
691
+
692
+
693
+
694
+
695
+
696
+ </h3><div class="docstring">
697
+ <div class="discussion">
698
+
699
+ <p>Attribute accessor.</p>
700
+
701
+
702
+ </div>
703
+ </div>
704
+ <div class="tags">
705
+
706
+
707
+ </div><table class="source_code">
708
+ <tr>
709
+ <td>
710
+ <pre class="lines">
711
+
712
+
713
+ 738
714
+ 739
715
+ 740</pre>
716
+ </td>
717
+ <td>
718
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 738</span>
719
+
720
+ <span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span>
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>
722
+ <span class='kw'>end</span></pre>
723
+ </td>
724
+ </tr>
725
+ </table>
726
+ </div>
727
+
728
+ <div class="method_details ">
729
+ <h3 class="signature " id="row_shading_colour-instance_method">
730
+
731
+ #<strong>row_shading_colour</strong>(index, colour) &#x21d2; <tt>Object</tt>
732
+
733
+
734
+
735
+ <span class="aliases">Also known as:
736
+ <span class="names"><span id='row_shading_color-instance_method'>row_shading_color</span></span>
737
+ </span>
738
+
739
+
740
+
741
+ </h3><div class="docstring">
742
+ <div class="discussion">
743
+
744
+ <p>This method assigns a shading colour to a specified row within a TableNode
745
+ object.</p>
746
+
747
+ <h4 id="label-Parameters">Parameters</h4>
748
+ <dl class="rdoc-list note-list"><dt>index
749
+ <dd>
750
+ <p>The offset from the first row of the row to have shading applied to it.</p>
751
+ </dd><dt>colour
752
+ <dd>
753
+ <p>A reference to a Colour object representing the shading colour to be used.
754
+ Set to nil to clear shading.</p>
755
+ </dd></dl>
756
+
757
+
758
+ </div>
759
+ </div>
760
+ <div class="tags">
761
+
762
+
763
+ </div><table class="source_code">
764
+ <tr>
765
+ <td>
766
+ <pre class="lines">
767
+
768
+
769
+ 760
770
+ 761
771
+ 762
772
+ 763</pre>
773
+ </td>
774
+ <td>
775
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 760</span>
776
+
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
+ <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>
779
+ <span class='id identifier rubyid_row'>row</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='kw'>if</span> <span class='id identifier rubyid_row'>row</span> <span class='op'>!=</span> <span class='kw'>nil</span>
780
+ <span class='kw'>end</span></pre>
781
+ </td>
782
+ </tr>
783
+ </table>
784
+ </div>
785
+
786
+ <div class="method_details ">
787
+ <h3 class="signature " id="rows-instance_method">
788
+
789
+ #<strong>rows</strong> &#x21d2; <tt>Object</tt>
790
+
791
+
792
+
793
+
794
+
795
+ </h3><div class="docstring">
796
+ <div class="discussion">
797
+
798
+ <p>Attribute accessor.</p>
799
+
800
+
801
+ </div>
802
+ </div>
803
+ <div class="tags">
804
+
805
+
806
+ </div><table class="source_code">
807
+ <tr>
808
+ <td>
809
+ <pre class="lines">
810
+
811
+
812
+ 733
813
+ 734
814
+ 735</pre>
815
+ </td>
816
+ <td>
817
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 733</span>
818
+
819
+ <span class='kw'>def</span> <span class='id identifier rubyid_rows'>rows</span>
820
+ <span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
821
+ <span class='kw'>end</span></pre>
822
+ </td>
823
+ </tr>
824
+ </table>
825
+ </div>
826
+
827
+ <div class="method_details ">
828
+ <h3 class="signature " id="shading_colour-instance_method">
829
+
830
+ #<strong>shading_colour</strong>(colour) &#x21d2; <tt>Object</tt>
831
+
832
+
833
+
834
+ <span class="aliases">Also known as:
835
+ <span class="names"><span id='shading_color-instance_method'>shading_color</span></span>
836
+ </span>
837
+
838
+
839
+
840
+ </h3><div class="docstring">
841
+ <div class="discussion">
842
+
843
+ <p>This method provides a means of assigning a shading colour to a selection
844
+ of cells within a table. The method accepts a block that takes three
845
+ parameters - a TableCellNode representing a cell within the table, an
846
+ integer representing the x offset of the cell and an integer representing
847
+ the y offset of the cell. If the block returns true then shading will be
848
+ applied to the cell.</p>
849
+
850
+ <h4 id="label-Parameters">Parameters</h4>
851
+ <dl class="rdoc-list note-list"><dt>colour
852
+ <dd>
853
+ <p>A reference to a Colour object representing the shading colour to be
854
+ applied. Set to nil to remove shading.</p>
855
+ </dd></dl>
856
+
857
+
858
+ </div>
859
+ </div>
860
+ <div class="tags">
861
+
862
+
863
+ </div><table class="source_code">
864
+ <tr>
865
+ <td>
866
+ <pre class="lines">
867
+
868
+
869
+ 790
870
+ 791
871
+ 792
872
+ 793
873
+ 794
874
+ 795
875
+ 796
876
+ 797
877
+ 798
878
+ 799
879
+ 800</pre>
880
+ </td>
881
+ <td>
882
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 790</span>
883
+
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
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
886
+ <span class='int'>0</span><span class='period'>.</span><span class='id identifier rubyid_upto'>upto</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span>
887
+ <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_x'>x</span><span class='rbracket'>]</span>
888
+ <span class='int'>0</span><span class='period'>.</span><span class='id identifier rubyid_upto'>upto</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_y'>y</span><span class='op'>|</span>
889
+ <span class='id identifier rubyid_apply'>apply</span> <span class='op'>=</span> <span class='kw'>yield</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='id identifier rubyid_y'>y</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span>
890
+ <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='id identifier rubyid_y'>y</span><span class='rbracket'>]</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='kw'>if</span> <span class='id identifier rubyid_apply'>apply</span>
891
+ <span class='kw'>end</span>
892
+ <span class='kw'>end</span>
893
+ <span class='kw'>end</span>
894
+ <span class='kw'>end</span></pre>
895
+ </td>
896
+ </tr>
897
+ </table>
898
+ </div>
899
+
900
+ <div class="method_details ">
901
+ <h3 class="signature " id="store-instance_method">
902
+
903
+ #<strong>store</strong>(node) &#x21d2; <tt>Object</tt>
904
+
905
+
906
+
907
+
908
+
909
+ </h3><div class="docstring">
910
+ <div class="discussion">
911
+
912
+ <p>This method overloads the store method inherited from the ContainerNode
913
+ class to forbid addition of further nodes.</p>
914
+
915
+ <h4 id="label-Parameters">Parameters</h4>
916
+ <dl class="rdoc-list note-list"><dt>node
917
+ <dd>
918
+ <p>A reference to the node to be added.</p>
919
+ </dd></dl>
920
+
921
+
922
+ </div>
923
+ </div>
924
+ <div class="tags">
925
+
926
+
927
+ </div><table class="source_code">
928
+ <tr>
929
+ <td>
930
+ <pre class="lines">
931
+
932
+
933
+ 807
934
+ 808
935
+ 809</pre>
936
+ </td>
937
+ <td>
938
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 807</span>
939
+
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
+ <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'>&quot;</span><span class='tstring_content'>Table nodes cannot have nodes added to.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
942
+ <span class='kw'>end</span></pre>
943
+ </td>
944
+ </tr>
945
+ </table>
946
+ </div>
947
+
948
+ <div class="method_details ">
949
+ <h3 class="signature " id="to_rtf-instance_method">
950
+
951
+ #<strong>to_rtf</strong> &#x21d2; <tt>Object</tt>
952
+
953
+
954
+
955
+
956
+
957
+ </h3><div class="docstring">
958
+ <div class="discussion">
959
+
960
+ <p>This method generates the RTF document text for a TableCellNode object.</p>
961
+
962
+
963
+ </div>
964
+ </div>
965
+ <div class="tags">
966
+
967
+
968
+ </div><table class="source_code">
969
+ <tr>
970
+ <td>
971
+ <pre class="lines">
972
+
973
+
974
+ 812
975
+ 813
976
+ 814
977
+ 815
978
+ 816
979
+ 817
980
+ 818
981
+ 819
982
+ 820
983
+ 821
984
+ 822
985
+ 823
986
+ 824
987
+ 825
988
+ 826</pre>
989
+ </td>
990
+ <td>
991
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 812</span>
992
+
993
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
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>
995
+ <span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='int'>0</span>
996
+
997
+ <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>
998
+ <span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
999
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
1000
+ <span class='kw'>else</span>
1001
+ <span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='int'>1</span>
1002
+ <span class='kw'>end</span>
1003
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'>to_rtf</span>
1004
+ <span class='kw'>end</span>
1005
+
1006
+ <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\\row(?!.*\\row)</span><span class='regexp_end'>/m</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\\lastrow\n\\row</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1007
+ <span class='kw'>end</span></pre>
1008
+ </td>
1009
+ </tr>
1010
+ </table>
1011
+ </div>
1012
+
1013
+ </div>
1014
+
1015
+ </div>
1016
+
1017
+ <div id="footer">
1018
+ Generated on Mon Jul 24 15:49:00 2017 by
1019
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1020
+ 0.9.9 (ruby-2.3.3).
1021
+ </div>
1022
+
1023
+ </div>
1024
+ </body>
1025
+ </html>