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,2372 @@
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::CommandNode
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::CommandNode";
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 (C)</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">CommandNode</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::CommandNode
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::CommandNode</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 RTF command element within a document. This class
110
+ is concrete enough to be used on its own but will also be used as the base
111
+ class for some specific command node types.</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div><div id="subclasses">
120
+ <h2>Direct Known Subclasses</h2>
121
+ <p class="children"><span class='object_link'><a href="Document.html" title="RRTF::Document (class)">Document</a></span>, <span class='object_link'><a href="FooterNode.html" title="RRTF::FooterNode (class)">FooterNode</a></span>, <span class='object_link'><a href="HeaderNode.html" title="RRTF::HeaderNode (class)">HeaderNode</a></span>, <span class='object_link'><a href="LinkNode.html" title="RRTF::LinkNode (class)">LinkNode</a></span>, <span class='object_link'><a href="ListLevelNode.html" title="RRTF::ListLevelNode (class)">ListLevelNode</a></span>, <span class='object_link'><a href="ListNode.html" title="RRTF::ListNode (class)">ListNode</a></span>, <span class='object_link'><a href="ListTextNode.html" title="RRTF::ListTextNode (class)">ListTextNode</a></span>, <span class='object_link'><a href="ParagraphNode.html" title="RRTF::ParagraphNode (class)">ParagraphNode</a></span>, <span class='object_link'><a href="TableCellNode.html" title="RRTF::TableCellNode (class)">TableCellNode</a></span></p>
122
+ </div>
123
+
124
+
125
+
126
+
127
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#prefix-instance_method" title="#prefix (instance method)">#<strong>prefix</strong> &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ <span class="summary_desc"><div class='inline'>
151
+ <p>String containing the prefix text for the command.</p>
152
+ </div></span>
153
+
154
+ </li>
155
+
156
+
157
+ <li class="public ">
158
+ <span class="summary_signature">
159
+
160
+ <a href="#split-instance_method" title="#split (instance method)">#<strong>split</strong> &#x21d2; Object </a>
161
+
162
+
163
+
164
+ (also: #split?)
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <span class="summary_desc"><div class='inline'>
180
+ <p>A boolean to indicate whether the prefix and suffix should be written to
181
+ separate lines whether the node is converted to RTF.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#suffix-instance_method" title="#suffix (instance method)">#<strong>suffix</strong> &#x21d2; Object </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'>
208
+ <p>String containing the suffix text for the command.</p>
209
+ </div></span>
210
+
211
+ </li>
212
+
213
+
214
+ <li class="public ">
215
+ <span class="summary_signature">
216
+
217
+ <a href="#wrap-instance_method" title="#wrap (instance method)">#<strong>wrap</strong> &#x21d2; Object </a>
218
+
219
+
220
+
221
+ (also: #wrap?)
222
+
223
+ </span>
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+ <span class="summary_desc"><div class='inline'>
237
+ <p>A boolean to indicate whether the prefix and suffix should be wrapped in
238
+ curly braces.</p>
239
+ </div></span>
240
+
241
+ </li>
242
+
243
+
244
+ </ul>
245
+
246
+
247
+
248
+
249
+
250
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
251
+ <p class="inherited"><span class='object_link'><a href="ContainerNode.html#children-instance_method" title="RRTF::ContainerNode#children (method)">#children</a></span></p>
252
+
253
+
254
+
255
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
256
+ <p class="inherited"><span class='object_link'><a href="Node.html#parent-instance_method" title="RRTF::Node#parent (method)">#parent</a></span></p>
257
+
258
+
259
+
260
+ <h2>
261
+ Instance Method Summary
262
+ <small><a href="#" class="summary_toggle">collapse</a></small>
263
+ </h2>
264
+
265
+ <ul class="summary">
266
+
267
+ <li class="public ">
268
+ <span class="summary_signature">
269
+
270
+ <a href="#<<-instance_method" title="#&lt;&lt; (instance method)">#<strong>&lt;&lt;</strong>(text) &#x21d2; Object </a>
271
+
272
+
273
+
274
+ (also: #write)
275
+
276
+ </span>
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+ <span class="summary_desc"><div class='inline'>
287
+ <p>This method adds text to a command node.</p>
288
+ </div></span>
289
+
290
+ </li>
291
+
292
+
293
+ <li class="public ">
294
+ <span class="summary_signature">
295
+
296
+ <a href="#apply-instance_method" title="#apply (instance method)">#<strong>apply</strong>(style) {|node| ... } &#x21d2; Object </a>
297
+
298
+
299
+
300
+ </span>
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+ <span class="summary_desc"><div class='inline'>
311
+ <p>This method provides a short cut means for applying multiple styles via
312
+ single command node.</p>
313
+ </div></span>
314
+
315
+ </li>
316
+
317
+
318
+ <li class="public ">
319
+ <span class="summary_signature">
320
+
321
+ <a href="#background-instance_method" title="#background (instance method)">#<strong>background</strong>(colour) &#x21d2; Object </a>
322
+
323
+
324
+
325
+ </span>
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+ <span class="summary_desc"><div class='inline'>
336
+ <p>This method provides a short cut means of creating a background colour
337
+ command node.</p>
338
+ </div></span>
339
+
340
+ </li>
341
+
342
+
343
+ <li class="public ">
344
+ <span class="summary_signature">
345
+
346
+ <a href="#bold-instance_method" title="#bold (instance method)">#<strong>bold</strong> &#x21d2; Object </a>
347
+
348
+
349
+
350
+ </span>
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+ <span class="summary_desc"><div class='inline'>
361
+ <p>This method provides a short cut means of creating a bold command node.</p>
362
+ </div></span>
363
+
364
+ </li>
365
+
366
+
367
+ <li class="public ">
368
+ <span class="summary_signature">
369
+
370
+ <a href="#colour-instance_method" title="#colour (instance method)">#<strong>colour</strong>(fore, back) &#x21d2; Object </a>
371
+
372
+
373
+
374
+ (also: #color)
375
+
376
+ </span>
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+ <span class="summary_desc"><div class='inline'>
387
+ <p>This method provides a short cut menas of creating a colour node that deals
388
+ with foreground and background colours.</p>
389
+ </div></span>
390
+
391
+ </li>
392
+
393
+
394
+ <li class="public ">
395
+ <span class="summary_signature">
396
+
397
+ <a href="#font-instance_method" title="#font (instance method)">#<strong>font</strong>(font, size = nil) &#x21d2; Object </a>
398
+
399
+
400
+
401
+ </span>
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+ <span class="summary_desc"><div class='inline'>
412
+ <p>This method provides a short cut means of creating a font command node.</p>
413
+ </div></span>
414
+
415
+ </li>
416
+
417
+
418
+ <li class="public ">
419
+ <span class="summary_signature">
420
+
421
+ <a href="#footnote-instance_method" title="#footnote (instance method)">#<strong>footnote</strong>(text) &#x21d2; Object </a>
422
+
423
+
424
+
425
+ </span>
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+ <span class="summary_desc"><div class='inline'>
436
+ <p>This method inserts a footnote at the current position in a node.</p>
437
+ </div></span>
438
+
439
+ </li>
440
+
441
+
442
+ <li class="public ">
443
+ <span class="summary_signature">
444
+
445
+ <a href="#foreground-instance_method" title="#foreground (instance method)">#<strong>foreground</strong>(colour) &#x21d2; Object </a>
446
+
447
+
448
+
449
+ </span>
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+ <span class="summary_desc"><div class='inline'>
460
+ <p>This method provides a short cut means of creating a foreground colour
461
+ command node.</p>
462
+ </div></span>
463
+
464
+ </li>
465
+
466
+
467
+ <li class="public ">
468
+ <span class="summary_signature">
469
+
470
+ <a href="#image-instance_method" title="#image (instance method)">#<strong>image</strong>(source) &#x21d2; Object </a>
471
+
472
+
473
+
474
+ </span>
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+ <span class="summary_desc"><div class='inline'>
485
+ <p>This method inserts a new image at the current position in a node.</p>
486
+ </div></span>
487
+
488
+ </li>
489
+
490
+
491
+ <li class="public ">
492
+ <span class="summary_signature">
493
+
494
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(parent, prefix, suffix = nil, split = true, wrap = true) &#x21d2; CommandNode </a>
495
+
496
+
497
+
498
+ </span>
499
+
500
+
501
+ <span class="note title constructor">constructor</span>
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+ <span class="summary_desc"><div class='inline'>
511
+ <p>This is the constructor for the CommandNode class.</p>
512
+ </div></span>
513
+
514
+ </li>
515
+
516
+
517
+ <li class="public ">
518
+ <span class="summary_signature">
519
+
520
+ <a href="#italic-instance_method" title="#italic (instance method)">#<strong>italic</strong> &#x21d2; Object </a>
521
+
522
+
523
+
524
+ </span>
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+ <span class="summary_desc"><div class='inline'>
535
+ <p>This method provides a short cut means of creating an italic command node.</p>
536
+ </div></span>
537
+
538
+ </li>
539
+
540
+
541
+ <li class="public ">
542
+ <span class="summary_signature">
543
+
544
+ <a href="#line_break-instance_method" title="#line_break (instance method)">#<strong>line_break</strong> &#x21d2; Object </a>
545
+
546
+
547
+
548
+ </span>
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+ <span class="summary_desc"><div class='inline'>
559
+ <p>This method provides a short cut means of creating a line break command
560
+ node.</p>
561
+ </div></span>
562
+
563
+ </li>
564
+
565
+
566
+ <li class="public ">
567
+ <span class="summary_signature">
568
+
569
+ <a href="#link-instance_method" title="#link (instance method)">#<strong>link</strong>(url, text = nil) {|node| ... } &#x21d2; Object </a>
570
+
571
+
572
+
573
+ </span>
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+ <span class="summary_desc"><div class='inline'></div></span>
584
+
585
+ </li>
586
+
587
+
588
+ <li class="public ">
589
+ <span class="summary_signature">
590
+
591
+ <a href="#list-instance_method" title="#list (instance method)">#<strong>list</strong>(kind = :bullets) {|node.list(kind)| ... } &#x21d2; Object </a>
592
+
593
+
594
+
595
+ </span>
596
+
597
+
598
+
599
+
600
+
601
+
602
+
603
+
604
+
605
+ <span class="summary_desc"><div class='inline'>
606
+ <p>This method provides a short cut means of creating a new ordered or
607
+ unordered list.</p>
608
+ </div></span>
609
+
610
+ </li>
611
+
612
+
613
+ <li class="public ">
614
+ <span class="summary_signature">
615
+
616
+ <a href="#paragraph-instance_method" title="#paragraph (instance method)">#<strong>paragraph</strong>(style = nil) {|node| ... } &#x21d2; Object </a>
617
+
618
+
619
+
620
+ </span>
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+ <span class="summary_desc"><div class='inline'>
631
+ <p>This method provides a short cut means of creating a paragraph command
632
+ node.</p>
633
+ </div></span>
634
+
635
+ </li>
636
+
637
+
638
+ <li class="public ">
639
+ <span class="summary_signature">
640
+
641
+ <a href="#strike-instance_method" title="#strike (instance method)">#<strong>strike</strong> &#x21d2; Object </a>
642
+
643
+
644
+
645
+ </span>
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+ <span class="summary_desc"><div class='inline'>
656
+ <p>This method provides a short cut means of creating a strike command node.</p>
657
+ </div></span>
658
+
659
+ </li>
660
+
661
+
662
+ <li class="public ">
663
+ <span class="summary_signature">
664
+
665
+ <a href="#subscript-instance_method" title="#subscript (instance method)">#<strong>subscript</strong> &#x21d2; Object </a>
666
+
667
+
668
+
669
+ </span>
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+ <span class="summary_desc"><div class='inline'>
680
+ <p>This method provides a short cut means of creating a subscript command
681
+ node.</p>
682
+ </div></span>
683
+
684
+ </li>
685
+
686
+
687
+ <li class="public ">
688
+ <span class="summary_signature">
689
+
690
+ <a href="#superscript-instance_method" title="#superscript (instance method)">#<strong>superscript</strong> &#x21d2; Object </a>
691
+
692
+
693
+
694
+ </span>
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+ <span class="summary_desc"><div class='inline'>
705
+ <p>This method provides a short cut means of creating a superscript command
706
+ node.</p>
707
+ </div></span>
708
+
709
+ </li>
710
+
711
+
712
+ <li class="public ">
713
+ <span class="summary_signature">
714
+
715
+ <a href="#table-instance_method" title="#table (instance method)">#<strong>table</strong>(rows, columns, *widths) {|node| ... } &#x21d2; Object </a>
716
+
717
+
718
+
719
+ </span>
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+ <span class="summary_desc"><div class='inline'>
730
+ <p>This method creates a new table node and returns it.</p>
731
+ </div></span>
732
+
733
+ </li>
734
+
735
+
736
+ <li class="public ">
737
+ <span class="summary_signature">
738
+
739
+ <a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong> &#x21d2; Object </a>
740
+
741
+
742
+
743
+ </span>
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+ <span class="summary_desc"><div class='inline'>
754
+ <p>This method generates the RTF text for a CommandNode object.</p>
755
+ </div></span>
756
+
757
+ </li>
758
+
759
+
760
+ <li class="public ">
761
+ <span class="summary_signature">
762
+
763
+ <a href="#underline-instance_method" title="#underline (instance method)">#<strong>underline</strong> &#x21d2; Object </a>
764
+
765
+
766
+
767
+ </span>
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+ <span class="summary_desc"><div class='inline'>
778
+ <p>This method provides a short cut means of creating an underline command
779
+ node.</p>
780
+ </div></span>
781
+
782
+ </li>
783
+
784
+
785
+ </ul>
786
+
787
+
788
+
789
+
790
+
791
+
792
+
793
+
794
+
795
+
796
+
797
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
798
+ <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>, <span class='object_link'><a href="ContainerNode.html#store-instance_method" title="RRTF::ContainerNode#store (method)">#store</a></span></p>
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
810
+ <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>
811
+ <div id="constructor_details" class="method_details_list">
812
+ <h2>Constructor Details</h2>
813
+
814
+ <div class="method_details first">
815
+ <h3 class="signature first" id="initialize-instance_method">
816
+
817
+ #<strong>initialize</strong>(parent, prefix, suffix = nil, split = true, wrap = true) &#x21d2; <tt><span class='object_link'><a href="" title="RRTF::CommandNode (class)">CommandNode</a></span></tt>
818
+
819
+
820
+
821
+
822
+
823
+ </h3><div class="docstring">
824
+ <div class="discussion">
825
+
826
+ <p>This is the constructor for the CommandNode class.</p>
827
+
828
+ <h4 id="label-Parameters">Parameters</h4>
829
+ <dl class="rdoc-list note-list"><dt>parent
830
+ <dd>
831
+ <p>A reference to the node that owns the new node.</p>
832
+ </dd><dt>prefix
833
+ <dd>
834
+ <p>A String containing the prefix text for the command.</p>
835
+ </dd><dt>suffix
836
+ <dd>
837
+ <p>A String containing the suffix text for the command. Defaults to nil.</p>
838
+ </dd><dt>split
839
+ <dd>
840
+ <p>A boolean to indicate whether the prefix and suffix should be written to
841
+ separate lines whether the node is converted to RTF. Defaults to true.</p>
842
+ </dd><dt>wrap
843
+ <dd>
844
+ <p>A boolean to indicate whether the prefix and suffix should be wrapped in
845
+ curly braces. Defaults to true.</p>
846
+ </dd></dl>
847
+
848
+
849
+ </div>
850
+ </div>
851
+ <div class="tags">
852
+
853
+
854
+ </div><table class="source_code">
855
+ <tr>
856
+ <td>
857
+ <pre class="lines">
858
+
859
+
860
+ 234
861
+ 235
862
+ 236
863
+ 237
864
+ 238
865
+ 239
866
+ 240</pre>
867
+ </td>
868
+ <td>
869
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 234</span>
870
+
871
+ <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_prefix'>prefix</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_split'>split</span><span class='op'>=</span><span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='op'>=</span><span class='kw'>true</span><span class='rparen'>)</span>
872
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
873
+ <span class='ivar'>@prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_prefix'>prefix</span>
874
+ <span class='ivar'>@suffix</span> <span class='op'>=</span> <span class='id identifier rubyid_suffix'>suffix</span>
875
+ <span class='ivar'>@split</span> <span class='op'>=</span> <span class='id identifier rubyid_split'>split</span>
876
+ <span class='ivar'>@wrap</span> <span class='op'>=</span> <span class='id identifier rubyid_wrap'>wrap</span>
877
+ <span class='kw'>end</span></pre>
878
+ </td>
879
+ </tr>
880
+ </table>
881
+ </div>
882
+
883
+ </div>
884
+
885
+ <div id="instance_attr_details" class="attr_details">
886
+ <h2>Instance Attribute Details</h2>
887
+
888
+
889
+ <span id="prefix=-instance_method"></span>
890
+ <div class="method_details first">
891
+ <h3 class="signature first" id="prefix-instance_method">
892
+
893
+ #<strong>prefix</strong> &#x21d2; <tt>Object</tt>
894
+
895
+
896
+
897
+
898
+
899
+ </h3><div class="docstring">
900
+ <div class="discussion">
901
+
902
+ <p>String containing the prefix text for the command</p>
903
+
904
+
905
+ </div>
906
+ </div>
907
+ <div class="tags">
908
+
909
+
910
+ </div><table class="source_code">
911
+ <tr>
912
+ <td>
913
+ <pre class="lines">
914
+
915
+
916
+ 211
917
+ 212
918
+ 213</pre>
919
+ </td>
920
+ <td>
921
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 211</span>
922
+
923
+ <span class='kw'>def</span> <span class='id identifier rubyid_prefix'>prefix</span>
924
+ <span class='ivar'>@prefix</span>
925
+ <span class='kw'>end</span></pre>
926
+ </td>
927
+ </tr>
928
+ </table>
929
+ </div>
930
+
931
+
932
+ <span id="split=-instance_method"></span>
933
+ <div class="method_details ">
934
+ <h3 class="signature " id="split-instance_method">
935
+
936
+ #<strong>split</strong> &#x21d2; <tt>Object</tt>
937
+
938
+
939
+
940
+ <span class="aliases">Also known as:
941
+ <span class="names"><span id='split?-instance_method'>split?</span></span>
942
+ </span>
943
+
944
+
945
+
946
+ </h3><div class="docstring">
947
+ <div class="discussion">
948
+
949
+ <p>A boolean to indicate whether the prefix and suffix should be written to
950
+ separate lines whether the node is converted to RTF. Defaults to true</p>
951
+
952
+
953
+ </div>
954
+ </div>
955
+ <div class="tags">
956
+
957
+
958
+ </div><table class="source_code">
959
+ <tr>
960
+ <td>
961
+ <pre class="lines">
962
+
963
+
964
+ 217
965
+ 218
966
+ 219</pre>
967
+ </td>
968
+ <td>
969
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 217</span>
970
+
971
+ <span class='kw'>def</span> <span class='id identifier rubyid_split'>split</span>
972
+ <span class='ivar'>@split</span>
973
+ <span class='kw'>end</span></pre>
974
+ </td>
975
+ </tr>
976
+ </table>
977
+ </div>
978
+
979
+
980
+ <span id="suffix=-instance_method"></span>
981
+ <div class="method_details ">
982
+ <h3 class="signature " id="suffix-instance_method">
983
+
984
+ #<strong>suffix</strong> &#x21d2; <tt>Object</tt>
985
+
986
+
987
+
988
+
989
+
990
+ </h3><div class="docstring">
991
+ <div class="discussion">
992
+
993
+ <p>String containing the suffix text for the command</p>
994
+
995
+
996
+ </div>
997
+ </div>
998
+ <div class="tags">
999
+
1000
+
1001
+ </div><table class="source_code">
1002
+ <tr>
1003
+ <td>
1004
+ <pre class="lines">
1005
+
1006
+
1007
+ 213
1008
+ 214
1009
+ 215</pre>
1010
+ </td>
1011
+ <td>
1012
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 213</span>
1013
+
1014
+ <span class='kw'>def</span> <span class='id identifier rubyid_suffix'>suffix</span>
1015
+ <span class='ivar'>@suffix</span>
1016
+ <span class='kw'>end</span></pre>
1017
+ </td>
1018
+ </tr>
1019
+ </table>
1020
+ </div>
1021
+
1022
+
1023
+ <span id="wrap=-instance_method"></span>
1024
+ <div class="method_details ">
1025
+ <h3 class="signature " id="wrap-instance_method">
1026
+
1027
+ #<strong>wrap</strong> &#x21d2; <tt>Object</tt>
1028
+
1029
+
1030
+
1031
+ <span class="aliases">Also known as:
1032
+ <span class="names"><span id='wrap?-instance_method'>wrap?</span></span>
1033
+ </span>
1034
+
1035
+
1036
+
1037
+ </h3><div class="docstring">
1038
+ <div class="discussion">
1039
+
1040
+ <p>A boolean to indicate whether the prefix and suffix should be wrapped in
1041
+ curly braces. Defaults to true.</p>
1042
+
1043
+
1044
+ </div>
1045
+ </div>
1046
+ <div class="tags">
1047
+
1048
+
1049
+ </div><table class="source_code">
1050
+ <tr>
1051
+ <td>
1052
+ <pre class="lines">
1053
+
1054
+
1055
+ 220
1056
+ 221
1057
+ 222</pre>
1058
+ </td>
1059
+ <td>
1060
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 220</span>
1061
+
1062
+ <span class='kw'>def</span> <span class='id identifier rubyid_wrap'>wrap</span>
1063
+ <span class='ivar'>@wrap</span>
1064
+ <span class='kw'>end</span></pre>
1065
+ </td>
1066
+ </tr>
1067
+ </table>
1068
+ </div>
1069
+
1070
+ </div>
1071
+
1072
+
1073
+ <div id="instance_method_details" class="method_details_list">
1074
+ <h2>Instance Method Details</h2>
1075
+
1076
+
1077
+ <div class="method_details first">
1078
+ <h3 class="signature first" id="<<-instance_method">
1079
+
1080
+ #<strong>&lt;&lt;</strong>(text) &#x21d2; <tt>Object</tt>
1081
+
1082
+
1083
+
1084
+ <span class="aliases">Also known as:
1085
+ <span class="names"><span id='write-instance_method'>write</span></span>
1086
+ </span>
1087
+
1088
+
1089
+
1090
+ </h3><div class="docstring">
1091
+ <div class="discussion">
1092
+
1093
+ <p>This method adds text to a command node. If the last child node of the
1094
+ target node is a TextNode then the text is appended to that. Otherwise a
1095
+ new TextNode is created and append to the node.</p>
1096
+
1097
+ <h4 id="label-Parameters">Parameters</h4>
1098
+ <dl class="rdoc-list note-list"><dt>text
1099
+ <dd>
1100
+ <p>The String of text to be written to the node.</p>
1101
+ </dd></dl>
1102
+
1103
+
1104
+ </div>
1105
+ </div>
1106
+ <div class="tags">
1107
+
1108
+
1109
+ </div><table class="source_code">
1110
+ <tr>
1111
+ <td>
1112
+ <pre class="lines">
1113
+
1114
+
1115
+ 248
1116
+ 249
1117
+ 250
1118
+ 251
1119
+ 252
1120
+ 253
1121
+ 254</pre>
1122
+ </td>
1123
+ <td>
1124
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 248</span>
1125
+
1126
+ <span class='kw'>def</span> <span class='op'>&lt;&lt;</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
1127
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_last'>last</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_last'>last</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:text=</span><span class='rparen'>)</span>
1128
+ <span class='id identifier rubyid_last'>last</span><span class='period'>.</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>
1129
+ <span class='kw'>else</span>
1130
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="TextNode.html" title="RRTF::TextNode (class)">TextNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TextNode.html#initialize-instance_method" title="RRTF::TextNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span><span class='rparen'>)</span>
1131
+ <span class='kw'>end</span>
1132
+ <span class='kw'>end</span></pre>
1133
+ </td>
1134
+ </tr>
1135
+ </table>
1136
+ </div>
1137
+
1138
+ <div class="method_details ">
1139
+ <h3 class="signature " id="apply-instance_method">
1140
+
1141
+ #<strong>apply</strong>(style) {|node| ... } &#x21d2; <tt>Object</tt>
1142
+
1143
+
1144
+
1145
+
1146
+
1147
+ </h3><div class="docstring">
1148
+ <div class="discussion">
1149
+
1150
+ <p>This method provides a short cut means for applying multiple styles via
1151
+ single command node. The method accepts a block that will be passed a
1152
+ reference to the node created. Once the block is complete the new node will
1153
+ be append as the last child of the CommandNode the method is called on.</p>
1154
+
1155
+ <h4 id="label-Parameters">Parameters</h4>
1156
+ <dl class="rdoc-list note-list"><dt>style
1157
+ <dd>
1158
+ <p>A reference to a CharacterStyle object that contains the style settings to
1159
+ be applied.</p>
1160
+ </dd></dl>
1161
+
1162
+ <h4 id="label-Exceptions">Exceptions</h4>
1163
+ <dl class="rdoc-list note-list"><dt>RTFError
1164
+ <dd>
1165
+ <p>Generated whenever a non-character style is specified to the method.</p>
1166
+ </dd></dl>
1167
+
1168
+
1169
+ </div>
1170
+ </div>
1171
+ <div class="tags">
1172
+
1173
+ <p class="tag_title">Yields:</p>
1174
+ <ul class="yield">
1175
+
1176
+ <li>
1177
+
1178
+
1179
+ <span class='type'>(<tt>node</tt>)</span>
1180
+
1181
+
1182
+
1183
+ </li>
1184
+
1185
+ </ul>
1186
+
1187
+ </div><table class="source_code">
1188
+ <tr>
1189
+ <td>
1190
+ <pre class="lines">
1191
+
1192
+
1193
+ 371
1194
+ 372
1195
+ 373
1196
+ 374
1197
+ 375
1198
+ 376
1199
+ 377
1200
+ 378
1201
+ 379
1202
+ 380
1203
+ 381
1204
+ 382
1205
+ 383
1206
+ 384
1207
+ 385
1208
+ 386</pre>
1209
+ </td>
1210
+ <td>
1211
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 371</span>
1212
+
1213
+ <span class='kw'>def</span> <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1214
+ <span class='comment'># Check the input style.
1215
+ </span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_is_character_style?'>is_character_style?</span>
1216
+ <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'>Non-character style specified to the </span><span class='tstring_end'>&quot;</span></span>\
1217
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>CommandNode#apply() method.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1218
+ <span class='kw'>end</span>
1219
+
1220
+ <span class='comment'># Store fonts and colours.
1221
+ </span> <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_push_colours'>push_colours</span><span class='lparen'>(</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_colours'>colours</span><span class='rparen'>)</span>
1222
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_push_fonts'>push_fonts</span><span class='lparen'>(</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fonts'>fonts</span><span class='rparen'>)</span>
1223
+
1224
+ <span class='comment'># Generate the command node.
1225
+ </span> <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="RRTF::CommandNode (class)">CommandNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RRTF::CommandNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_prefix'>prefix</span><span class='lparen'>(</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='rparen'>)</span><span class='rparen'>)</span>
1226
+ <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1227
+ <span class='kw'>self</span><span class='period'>.</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>
1228
+ <span class='kw'>end</span></pre>
1229
+ </td>
1230
+ </tr>
1231
+ </table>
1232
+ </div>
1233
+
1234
+ <div class="method_details ">
1235
+ <h3 class="signature " id="background-instance_method">
1236
+
1237
+ #<strong>background</strong>(colour) &#x21d2; <tt>Object</tt>
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+ </h3><div class="docstring">
1244
+ <div class="discussion">
1245
+
1246
+ <p>This method provides a short cut means of creating a background colour
1247
+ command node. The method accepts a block that will be passed a single
1248
+ parameter which will be a reference to the background colour node created.
1249
+ After the block is complete the background colour node is appended to the
1250
+ end of the child nodes on the object that the method is called against.</p>
1251
+
1252
+ <h4 id="label-Parameters">Parameters</h4>
1253
+ <dl class="rdoc-list note-list"><dt>colour
1254
+ <dd>
1255
+ <p>The background colour to be applied by the command.</p>
1256
+ </dd></dl>
1257
+
1258
+
1259
+ </div>
1260
+ </div>
1261
+ <div class="tags">
1262
+
1263
+
1264
+ </div><table class="source_code">
1265
+ <tr>
1266
+ <td>
1267
+ <pre class="lines">
1268
+
1269
+
1270
+ 530
1271
+ 531
1272
+ 532
1273
+ 533
1274
+ 534
1275
+ 535
1276
+ 536
1277
+ 537
1278
+ 538
1279
+ 539</pre>
1280
+ </td>
1281
+ <td>
1282
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 530</span>
1283
+
1284
+ <span class='kw'>def</span> <span class='id identifier rubyid_background'>background</span><span class='lparen'>(</span><span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span>
1285
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
1286
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_background'>background</span> <span class='op'>=</span> <span class='id identifier rubyid_colour'>colour</span>
1287
+ <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_colours'>colours</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_colour'>colour</span>
1288
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1289
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
1290
+ <span class='kw'>else</span>
1291
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1292
+ <span class='kw'>end</span>
1293
+ <span class='kw'>end</span></pre>
1294
+ </td>
1295
+ </tr>
1296
+ </table>
1297
+ </div>
1298
+
1299
+ <div class="method_details ">
1300
+ <h3 class="signature " id="bold-instance_method">
1301
+
1302
+ #<strong>bold</strong> &#x21d2; <tt>Object</tt>
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+ </h3><div class="docstring">
1309
+ <div class="discussion">
1310
+
1311
+ <p>This method provides a short cut means of creating a bold command node. The
1312
+ method accepts a block that will be passed a single parameter which will be
1313
+ a reference to the bold node created. After the block is complete the bold
1314
+ node is appended to the end of the child nodes on the object that the
1315
+ method is call against.</p>
1316
+
1317
+
1318
+ </div>
1319
+ </div>
1320
+ <div class="tags">
1321
+
1322
+
1323
+ </div><table class="source_code">
1324
+ <tr>
1325
+ <td>
1326
+ <pre class="lines">
1327
+
1328
+
1329
+ 393
1330
+ 394
1331
+ 395
1332
+ 396
1333
+ 397
1334
+ 398
1335
+ 399
1336
+ 400
1337
+ 401</pre>
1338
+ </td>
1339
+ <td>
1340
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 393</span>
1341
+
1342
+ <span class='kw'>def</span> <span class='id identifier rubyid_bold'>bold</span>
1343
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
1344
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_bold'>bold</span> <span class='op'>=</span> <span class='kw'>true</span>
1345
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1346
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
1347
+ <span class='kw'>else</span>
1348
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1349
+ <span class='kw'>end</span>
1350
+ <span class='kw'>end</span></pre>
1351
+ </td>
1352
+ </tr>
1353
+ </table>
1354
+ </div>
1355
+
1356
+ <div class="method_details ">
1357
+ <h3 class="signature " id="colour-instance_method">
1358
+
1359
+ #<strong>colour</strong>(fore, back) &#x21d2; <tt>Object</tt>
1360
+
1361
+
1362
+
1363
+ <span class="aliases">Also known as:
1364
+ <span class="names"><span id='color-instance_method'>color</span></span>
1365
+ </span>
1366
+
1367
+
1368
+
1369
+ </h3><div class="docstring">
1370
+ <div class="discussion">
1371
+
1372
+ <p>This method provides a short cut menas of creating a colour node that deals
1373
+ with foreground and background colours. The method accepts a block that
1374
+ will be passed a single parameter which will be a reference to the colour
1375
+ node created. After the block is complete the colour node is append to the
1376
+ end of the child nodes on the object that the method is called against.</p>
1377
+
1378
+ <h4 id="label-Parameters">Parameters</h4>
1379
+ <dl class="rdoc-list note-list"><dt>fore
1380
+ <dd>
1381
+ <p>The foreground colour to be applied by the command.</p>
1382
+ </dd><dt>back
1383
+ <dd>
1384
+ <p>The background colour to be applied by the command.</p>
1385
+ </dd></dl>
1386
+
1387
+
1388
+ </div>
1389
+ </div>
1390
+ <div class="tags">
1391
+
1392
+
1393
+ </div><table class="source_code">
1394
+ <tr>
1395
+ <td>
1396
+ <pre class="lines">
1397
+
1398
+
1399
+ 551
1400
+ 552
1401
+ 553
1402
+ 554
1403
+ 555
1404
+ 556
1405
+ 557
1406
+ 558
1407
+ 559
1408
+ 560
1409
+ 561
1410
+ 562</pre>
1411
+ </td>
1412
+ <td>
1413
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 551</span>
1414
+
1415
+ <span class='kw'>def</span> <span class='id identifier rubyid_colour'>colour</span><span class='lparen'>(</span><span class='id identifier rubyid_fore'>fore</span><span class='comma'>,</span> <span class='id identifier rubyid_back'>back</span><span class='rparen'>)</span>
1416
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
1417
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_foreground'>foreground</span> <span class='op'>=</span> <span class='id identifier rubyid_fore'>fore</span>
1418
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_background'>background</span> <span class='op'>=</span> <span class='id identifier rubyid_back'>back</span>
1419
+ <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_colours'>colours</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_fore'>fore</span>
1420
+ <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_colours'>colours</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_back'>back</span>
1421
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1422
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
1423
+ <span class='kw'>else</span>
1424
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1425
+ <span class='kw'>end</span>
1426
+ <span class='kw'>end</span></pre>
1427
+ </td>
1428
+ </tr>
1429
+ </table>
1430
+ </div>
1431
+
1432
+ <div class="method_details ">
1433
+ <h3 class="signature " id="font-instance_method">
1434
+
1435
+ #<strong>font</strong>(font, size = nil) &#x21d2; <tt>Object</tt>
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+ </h3><div class="docstring">
1442
+ <div class="discussion">
1443
+
1444
+ <p>This method provides a short cut means of creating a font command node. The
1445
+ method accepts a block that will be passed a single parameter which will be
1446
+ a reference to the font node created. After the block is complete the font
1447
+ node is appended to the end of the child nodes on the object that the
1448
+ method is called against.</p>
1449
+
1450
+ <h4 id="label-Parameters">Parameters</h4>
1451
+ <dl class="rdoc-list note-list"><dt>font
1452
+ <dd>
1453
+ <p>A reference to font object that represents the font to be used within the
1454
+ node.</p>
1455
+ </dd><dt>size
1456
+ <dd>
1457
+ <p>An integer size setting for the font. Defaults to nil to indicate that the
1458
+ current font size should be used.</p>
1459
+ </dd></dl>
1460
+
1461
+
1462
+ </div>
1463
+ </div>
1464
+ <div class="tags">
1465
+
1466
+
1467
+ </div><table class="source_code">
1468
+ <tr>
1469
+ <td>
1470
+ <pre class="lines">
1471
+
1472
+
1473
+ 489
1474
+ 490
1475
+ 491
1476
+ 492
1477
+ 493
1478
+ 494
1479
+ 495
1480
+ 496
1481
+ 497
1482
+ 498
1483
+ 499</pre>
1484
+ </td>
1485
+ <td>
1486
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 489</span>
1487
+
1488
+ <span class='kw'>def</span> <span class='id identifier rubyid_font'>font</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='comma'>,</span> <span class='id identifier rubyid_size'>size</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1489
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
1490
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_font'>font</span> <span class='op'>=</span> <span class='id identifier rubyid_font'>font</span>
1491
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_font_size'>font_size</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span>
1492
+ <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fonts'>fonts</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_font'>font</span>
1493
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1494
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
1495
+ <span class='kw'>else</span>
1496
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1497
+ <span class='kw'>end</span>
1498
+ <span class='kw'>end</span></pre>
1499
+ </td>
1500
+ </tr>
1501
+ </table>
1502
+ </div>
1503
+
1504
+ <div class="method_details ">
1505
+ <h3 class="signature " id="footnote-instance_method">
1506
+
1507
+ #<strong>footnote</strong>(text) &#x21d2; <tt>Object</tt>
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+ </h3><div class="docstring">
1514
+ <div class="discussion">
1515
+
1516
+ <p>This method inserts a footnote at the current position in a node.</p>
1517
+
1518
+ <h4 id="label-Parameters">Parameters</h4>
1519
+ <dl class="rdoc-list note-list"><dt>text
1520
+ <dd>
1521
+ <p>A string containing the text for the footnote.</p>
1522
+ </dd></dl>
1523
+
1524
+
1525
+ </div>
1526
+ </div>
1527
+ <div class="tags">
1528
+
1529
+
1530
+ </div><table class="source_code">
1531
+ <tr>
1532
+ <td>
1533
+ <pre class="lines">
1534
+
1535
+
1536
+ 335
1537
+ 336
1538
+ 337
1539
+ 338
1540
+ 339
1541
+ 340
1542
+ 341
1543
+ 342
1544
+ 343</pre>
1545
+ </td>
1546
+ <td>
1547
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 335</span>
1548
+
1549
+ <span class='kw'>def</span> <span class='id identifier rubyid_footnote'>footnote</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
1550
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_text'>text</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
1551
+ <span class='id identifier rubyid_mark'>mark</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="RRTF::CommandNode (class)">CommandNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RRTF::CommandNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\fs16\up6\chftn</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
1552
+ <span class='id identifier rubyid_note'>note</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="RRTF::CommandNode (class)">CommandNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RRTF::CommandNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\footnote {\fs16\up6\chftn}</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
1553
+ <span class='id identifier rubyid_note'>note</span><span class='period'>.</span><span class='id identifier rubyid_paragraph'>paragraph</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_text'>text</span>
1554
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='id identifier rubyid_mark'>mark</span><span class='rparen'>)</span>
1555
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='id identifier rubyid_note'>note</span><span class='rparen'>)</span>
1556
+ <span class='kw'>end</span>
1557
+ <span class='kw'>end</span></pre>
1558
+ </td>
1559
+ </tr>
1560
+ </table>
1561
+ </div>
1562
+
1563
+ <div class="method_details ">
1564
+ <h3 class="signature " id="foreground-instance_method">
1565
+
1566
+ #<strong>foreground</strong>(colour) &#x21d2; <tt>Object</tt>
1567
+
1568
+
1569
+
1570
+
1571
+
1572
+ </h3><div class="docstring">
1573
+ <div class="discussion">
1574
+
1575
+ <p>This method provides a short cut means of creating a foreground colour
1576
+ command node. The method accepts a block that will be passed a single
1577
+ parameter which will be a reference to the foreground colour node created.
1578
+ After the block is complete the foreground colour node is appended to the
1579
+ end of the child nodes on the object that the method is called against.</p>
1580
+
1581
+ <h4 id="label-Parameters">Parameters</h4>
1582
+ <dl class="rdoc-list note-list"><dt>colour
1583
+ <dd>
1584
+ <p>The foreground colour to be applied by the command.</p>
1585
+ </dd></dl>
1586
+
1587
+
1588
+ </div>
1589
+ </div>
1590
+ <div class="tags">
1591
+
1592
+
1593
+ </div><table class="source_code">
1594
+ <tr>
1595
+ <td>
1596
+ <pre class="lines">
1597
+
1598
+
1599
+ 510
1600
+ 511
1601
+ 512
1602
+ 513
1603
+ 514
1604
+ 515
1605
+ 516
1606
+ 517
1607
+ 518
1608
+ 519</pre>
1609
+ </td>
1610
+ <td>
1611
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 510</span>
1612
+
1613
+ <span class='kw'>def</span> <span class='id identifier rubyid_foreground'>foreground</span><span class='lparen'>(</span><span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span>
1614
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
1615
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_foreground'>foreground</span> <span class='op'>=</span> <span class='id identifier rubyid_colour'>colour</span>
1616
+ <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_colours'>colours</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_colour'>colour</span>
1617
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1618
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
1619
+ <span class='kw'>else</span>
1620
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1621
+ <span class='kw'>end</span>
1622
+ <span class='kw'>end</span></pre>
1623
+ </td>
1624
+ </tr>
1625
+ </table>
1626
+ </div>
1627
+
1628
+ <div class="method_details ">
1629
+ <h3 class="signature " id="image-instance_method">
1630
+
1631
+ #<strong>image</strong>(source) &#x21d2; <tt>Object</tt>
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+ </h3><div class="docstring">
1638
+ <div class="discussion">
1639
+
1640
+ <p>This method inserts a new image at the current position in a node.</p>
1641
+
1642
+ <h4 id="label-Parameters">Parameters</h4>
1643
+ <dl class="rdoc-list note-list"><dt>source
1644
+ <dd>
1645
+ <p>Either a string containing the path and name of a file or a File object for
1646
+ the image file to be inserted.</p>
1647
+ </dd></dl>
1648
+
1649
+ <h4 id="label-Exceptions">Exceptions</h4>
1650
+ <dl class="rdoc-list note-list"><dt>RTFError
1651
+ <dd>
1652
+ <p>Generated whenever an invalid or inaccessible file is specified or the
1653
+ image file type is not supported.</p>
1654
+ </dd></dl>
1655
+
1656
+
1657
+ </div>
1658
+ </div>
1659
+ <div class="tags">
1660
+
1661
+
1662
+ </div><table class="source_code">
1663
+ <tr>
1664
+ <td>
1665
+ <pre class="lines">
1666
+
1667
+
1668
+ 354
1669
+ 355
1670
+ 356</pre>
1671
+ </td>
1672
+ <td>
1673
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 354</span>
1674
+
1675
+ <span class='kw'>def</span> <span class='id identifier rubyid_image'>image</span><span class='lparen'>(</span><span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span>
1676
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="ImageNode.html" title="RRTF::ImageNode (class)">ImageNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ImageNode.html#initialize-instance_method" title="RRTF::ImageNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_source'>source</span><span class='comma'>,</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get_id'>get_id</span><span class='rparen'>)</span><span class='rparen'>)</span>
1677
+ <span class='kw'>end</span></pre>
1678
+ </td>
1679
+ </tr>
1680
+ </table>
1681
+ </div>
1682
+
1683
+ <div class="method_details ">
1684
+ <h3 class="signature " id="italic-instance_method">
1685
+
1686
+ #<strong>italic</strong> &#x21d2; <tt>Object</tt>
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+ </h3><div class="docstring">
1693
+ <div class="discussion">
1694
+
1695
+ <p>This method provides a short cut means of creating an italic command node.
1696
+ The method accepts a block that will be passed a single parameter which
1697
+ will be a reference to the italic node created. After the block is complete
1698
+ the italic node is appended to the end of the child nodes on the object
1699
+ that the method is call against.</p>
1700
+
1701
+
1702
+ </div>
1703
+ </div>
1704
+ <div class="tags">
1705
+
1706
+
1707
+ </div><table class="source_code">
1708
+ <tr>
1709
+ <td>
1710
+ <pre class="lines">
1711
+
1712
+
1713
+ 408
1714
+ 409
1715
+ 410
1716
+ 411
1717
+ 412
1718
+ 413
1719
+ 414
1720
+ 415
1721
+ 416</pre>
1722
+ </td>
1723
+ <td>
1724
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 408</span>
1725
+
1726
+ <span class='kw'>def</span> <span class='id identifier rubyid_italic'>italic</span>
1727
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
1728
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_italic'>italic</span> <span class='op'>=</span> <span class='kw'>true</span>
1729
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1730
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
1731
+ <span class='kw'>else</span>
1732
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1733
+ <span class='kw'>end</span>
1734
+ <span class='kw'>end</span></pre>
1735
+ </td>
1736
+ </tr>
1737
+ </table>
1738
+ </div>
1739
+
1740
+ <div class="method_details ">
1741
+ <h3 class="signature " id="line_break-instance_method">
1742
+
1743
+ #<strong>line_break</strong> &#x21d2; <tt>Object</tt>
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+ </h3><div class="docstring">
1750
+ <div class="discussion">
1751
+
1752
+ <p>This method provides a short cut means of creating a line break command
1753
+ node. This command node does not take a block and may possess no other
1754
+ content.</p>
1755
+
1756
+
1757
+ </div>
1758
+ </div>
1759
+ <div class="tags">
1760
+
1761
+
1762
+ </div><table class="source_code">
1763
+ <tr>
1764
+ <td>
1765
+ <pre class="lines">
1766
+
1767
+
1768
+ 326
1769
+ 327
1770
+ 328
1771
+ 329</pre>
1772
+ </td>
1773
+ <td>
1774
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 326</span>
1775
+
1776
+ <span class='kw'>def</span> <span class='id identifier rubyid_line_break'>line_break</span>
1777
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="RRTF::CommandNode (class)">CommandNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="RRTF::CommandNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\line</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span><span class='rparen'>)</span>
1778
+ <span class='kw'>nil</span>
1779
+ <span class='kw'>end</span></pre>
1780
+ </td>
1781
+ </tr>
1782
+ </table>
1783
+ </div>
1784
+
1785
+ <div class="method_details ">
1786
+ <h3 class="signature " id="link-instance_method">
1787
+
1788
+ #<strong>link</strong>(url, text = nil) {|node| ... } &#x21d2; <tt>Object</tt>
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+ </h3><div class="docstring">
1795
+ <div class="discussion">
1796
+
1797
+
1798
+ </div>
1799
+ </div>
1800
+ <div class="tags">
1801
+
1802
+ <p class="tag_title">Yields:</p>
1803
+ <ul class="yield">
1804
+
1805
+ <li>
1806
+
1807
+
1808
+ <span class='type'>(<tt>node</tt>)</span>
1809
+
1810
+
1811
+
1812
+ </li>
1813
+
1814
+ </ul>
1815
+
1816
+ </div><table class="source_code">
1817
+ <tr>
1818
+ <td>
1819
+ <pre class="lines">
1820
+
1821
+
1822
+ 316
1823
+ 317
1824
+ 318
1825
+ 319
1826
+ 320
1827
+ 321</pre>
1828
+ </td>
1829
+ <td>
1830
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 316</span>
1831
+
1832
+ <span class='kw'>def</span> <span class='id identifier rubyid_link'>link</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</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>
1833
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="LinkNode.html" title="RRTF::LinkNode (class)">LinkNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="LinkNode.html#initialize-instance_method" title="RRTF::LinkNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
1834
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_text'>text</span> <span class='kw'>if</span> <span class='id identifier rubyid_text'>text</span>
1835
+ <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1836
+ <span class='kw'>self</span><span class='period'>.</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>
1837
+ <span class='kw'>end</span></pre>
1838
+ </td>
1839
+ </tr>
1840
+ </table>
1841
+ </div>
1842
+
1843
+ <div class="method_details ">
1844
+ <h3 class="signature " id="list-instance_method">
1845
+
1846
+ #<strong>list</strong>(kind = :bullets) {|node.list(kind)| ... } &#x21d2; <tt>Object</tt>
1847
+
1848
+
1849
+
1850
+
1851
+
1852
+ </h3><div class="docstring">
1853
+ <div class="discussion">
1854
+
1855
+ <p>This method provides a short cut means of creating a new ordered or
1856
+ unordered list. The method requires a block that will be passed a single
1857
+ parameter that&#39;ll be a reference to the first level of the list. See
1858
+ the <code>ListLevelNode</code> doc for more information.</p>
1859
+
1860
+ <p>Example usage:</p>
1861
+
1862
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_level1'>level1</span><span class='op'>|</span>
1863
+ <span class='id identifier rubyid_level1'>level1</span><span class='period'>.</span><span class='id identifier rubyid_item'>item</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_li'>li</span><span class='op'>|</span>
1864
+ <span class='id identifier rubyid_li'>li</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>some text</span><span class='tstring_end'>&#39;</span></span>
1865
+ <span class='id identifier rubyid_li'>li</span><span class='period'>.</span><span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_some_style'>some_style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='id identifier rubyid_x'>x</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>some styled text</span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span>
1866
+ <span class='kw'>end</span>
1867
+
1868
+ <span class='id identifier rubyid_level1'>level1</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='symbol'>:decimal</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_level2'>level2</span><span class='op'>|</span>
1869
+ <span class='id identifier rubyid_level2'>level2</span><span class='period'>.</span><span class='id identifier rubyid_item'>item</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_li'>li</span><span class='op'>|</span> <span class='id identifier rubyid_li'>li</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>some other text in a decimal list</span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span>
1870
+ <span class='id identifier rubyid_level2'>level2</span><span class='period'>.</span><span class='id identifier rubyid_item'>item</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_li'>li</span><span class='op'>|</span> <span class='id identifier rubyid_li'>li</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>and here we go</span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span>
1871
+ <span class='kw'>end</span>
1872
+ <span class='kw'>end</span>
1873
+ </code></pre>
1874
+
1875
+
1876
+ </div>
1877
+ </div>
1878
+ <div class="tags">
1879
+
1880
+ <p class="tag_title">Yields:</p>
1881
+ <ul class="yield">
1882
+
1883
+ <li>
1884
+
1885
+
1886
+ <span class='type'>(<tt>node.<span class='object_link'><a href="#list-instance_method" title="RRTF::CommandNode#list (method)">list</a></span>(kind)</tt>)</span>
1887
+
1888
+
1889
+
1890
+ </li>
1891
+
1892
+ </ul>
1893
+
1894
+ </div><table class="source_code">
1895
+ <tr>
1896
+ <td>
1897
+ <pre class="lines">
1898
+
1899
+
1900
+ 310
1901
+ 311
1902
+ 312
1903
+ 313
1904
+ 314</pre>
1905
+ </td>
1906
+ <td>
1907
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 310</span>
1908
+
1909
+ <span class='kw'>def</span> <span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='id identifier rubyid_kind'>kind</span><span class='op'>=</span><span class='symbol'>:bullets</span><span class='rparen'>)</span>
1910
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="ListNode.html" title="RRTF::ListNode (class)">ListNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ListNode.html#initialize-instance_method" title="RRTF::ListNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1911
+ <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='id identifier rubyid_kind'>kind</span><span class='rparen'>)</span>
1912
+ <span class='kw'>self</span><span class='period'>.</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>
1913
+ <span class='kw'>end</span></pre>
1914
+ </td>
1915
+ </tr>
1916
+ </table>
1917
+ </div>
1918
+
1919
+ <div class="method_details ">
1920
+ <h3 class="signature " id="paragraph-instance_method">
1921
+
1922
+ #<strong>paragraph</strong>(style = nil) {|node| ... } &#x21d2; <tt>Object</tt>
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+ </h3><div class="docstring">
1929
+ <div class="discussion">
1930
+
1931
+ <p>This method provides a short cut means of creating a paragraph command
1932
+ node. The method accepts a block that will be passed a single parameter
1933
+ which will be a reference to the paragraph node created. After the block is
1934
+ complete the paragraph node is appended to the end of the child nodes on
1935
+ the object that the method is called against.</p>
1936
+
1937
+ <h4 id="label-Parameters">Parameters</h4>
1938
+ <dl class="rdoc-list note-list"><dt>style
1939
+ <dd>
1940
+ <p>A reference to a ParagraphStyle object that defines the style for the new
1941
+ paragraph. Defaults to nil to indicate that the currently applied paragraph
1942
+ styling should be used.</p>
1943
+ </dd></dl>
1944
+
1945
+
1946
+ </div>
1947
+ </div>
1948
+ <div class="tags">
1949
+
1950
+ <p class="tag_title">Yields:</p>
1951
+ <ul class="yield">
1952
+
1953
+ <li>
1954
+
1955
+
1956
+ <span class='type'>(<tt>node</tt>)</span>
1957
+
1958
+
1959
+
1960
+ </li>
1961
+
1962
+ </ul>
1963
+
1964
+ </div><table class="source_code">
1965
+ <tr>
1966
+ <td>
1967
+ <pre class="lines">
1968
+
1969
+
1970
+ 285
1971
+ 286
1972
+ 287
1973
+ 288
1974
+ 289</pre>
1975
+ </td>
1976
+ <td>
1977
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 285</span>
1978
+
1979
+ <span class='kw'>def</span> <span class='id identifier rubyid_paragraph'>paragraph</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1980
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="ParagraphNode.html" title="RRTF::ParagraphNode (class)">ParagraphNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ParagraphNode.html#initialize-instance_method" title="RRTF::ParagraphNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
1981
+ <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1982
+ <span class='kw'>self</span><span class='period'>.</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>
1983
+ <span class='kw'>end</span></pre>
1984
+ </td>
1985
+ </tr>
1986
+ </table>
1987
+ </div>
1988
+
1989
+ <div class="method_details ">
1990
+ <h3 class="signature " id="strike-instance_method">
1991
+
1992
+ #<strong>strike</strong> &#x21d2; <tt>Object</tt>
1993
+
1994
+
1995
+
1996
+
1997
+
1998
+ </h3><div class="docstring">
1999
+ <div class="discussion">
2000
+
2001
+ <p>This method provides a short cut means of creating a strike command node.
2002
+ The method accepts a block that will be passed a single parameter which
2003
+ will be a reference to the strike node created. After the block is complete
2004
+ the strike node is appended to the end of the child nodes on the object
2005
+ that the method is call against.</p>
2006
+
2007
+
2008
+ </div>
2009
+ </div>
2010
+ <div class="tags">
2011
+
2012
+
2013
+ </div><table class="source_code">
2014
+ <tr>
2015
+ <td>
2016
+ <pre class="lines">
2017
+
2018
+
2019
+ 468
2020
+ 469
2021
+ 470
2022
+ 471
2023
+ 472
2024
+ 473
2025
+ 474
2026
+ 475
2027
+ 476</pre>
2028
+ </td>
2029
+ <td>
2030
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 468</span>
2031
+
2032
+ <span class='kw'>def</span> <span class='id identifier rubyid_strike'>strike</span>
2033
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
2034
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_strike'>strike</span> <span class='op'>=</span> <span class='kw'>true</span>
2035
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
2036
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
2037
+ <span class='kw'>else</span>
2038
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
2039
+ <span class='kw'>end</span>
2040
+ <span class='kw'>end</span></pre>
2041
+ </td>
2042
+ </tr>
2043
+ </table>
2044
+ </div>
2045
+
2046
+ <div class="method_details ">
2047
+ <h3 class="signature " id="subscript-instance_method">
2048
+
2049
+ #<strong>subscript</strong> &#x21d2; <tt>Object</tt>
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+ </h3><div class="docstring">
2056
+ <div class="discussion">
2057
+
2058
+ <p>This method provides a short cut means of creating a subscript command
2059
+ node. The method accepts a block that will be passed a single parameter
2060
+ which will be a reference to the subscript node created. After the block is
2061
+ complete the subscript node is appended to the end of the child nodes on
2062
+ the object that the method is call against.</p>
2063
+
2064
+
2065
+ </div>
2066
+ </div>
2067
+ <div class="tags">
2068
+
2069
+
2070
+ </div><table class="source_code">
2071
+ <tr>
2072
+ <td>
2073
+ <pre class="lines">
2074
+
2075
+
2076
+ 438
2077
+ 439
2078
+ 440
2079
+ 441
2080
+ 442
2081
+ 443
2082
+ 444
2083
+ 445
2084
+ 446</pre>
2085
+ </td>
2086
+ <td>
2087
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 438</span>
2088
+
2089
+ <span class='kw'>def</span> <span class='id identifier rubyid_subscript'>subscript</span>
2090
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
2091
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_subscript'>subscript</span> <span class='op'>=</span> <span class='kw'>true</span>
2092
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
2093
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
2094
+ <span class='kw'>else</span>
2095
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
2096
+ <span class='kw'>end</span>
2097
+ <span class='kw'>end</span></pre>
2098
+ </td>
2099
+ </tr>
2100
+ </table>
2101
+ </div>
2102
+
2103
+ <div class="method_details ">
2104
+ <h3 class="signature " id="superscript-instance_method">
2105
+
2106
+ #<strong>superscript</strong> &#x21d2; <tt>Object</tt>
2107
+
2108
+
2109
+
2110
+
2111
+
2112
+ </h3><div class="docstring">
2113
+ <div class="discussion">
2114
+
2115
+ <p>This method provides a short cut means of creating a superscript command
2116
+ node. The method accepts a block that will be passed a single parameter
2117
+ which will be a reference to the superscript node created. After the block
2118
+ is complete the superscript node is appended to the end of the child nodes
2119
+ on the object that the method is call against.</p>
2120
+
2121
+
2122
+ </div>
2123
+ </div>
2124
+ <div class="tags">
2125
+
2126
+
2127
+ </div><table class="source_code">
2128
+ <tr>
2129
+ <td>
2130
+ <pre class="lines">
2131
+
2132
+
2133
+ 453
2134
+ 454
2135
+ 455
2136
+ 456
2137
+ 457
2138
+ 458
2139
+ 459
2140
+ 460
2141
+ 461</pre>
2142
+ </td>
2143
+ <td>
2144
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 453</span>
2145
+
2146
+ <span class='kw'>def</span> <span class='id identifier rubyid_superscript'>superscript</span>
2147
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
2148
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_superscript'>superscript</span> <span class='op'>=</span> <span class='kw'>true</span>
2149
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
2150
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
2151
+ <span class='kw'>else</span>
2152
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
2153
+ <span class='kw'>end</span>
2154
+ <span class='kw'>end</span></pre>
2155
+ </td>
2156
+ </tr>
2157
+ </table>
2158
+ </div>
2159
+
2160
+ <div class="method_details ">
2161
+ <h3 class="signature " id="table-instance_method">
2162
+
2163
+ #<strong>table</strong>(rows, columns, *widths) {|node| ... } &#x21d2; <tt>Object</tt>
2164
+
2165
+
2166
+
2167
+
2168
+
2169
+ </h3><div class="docstring">
2170
+ <div class="discussion">
2171
+
2172
+ <p>This method creates a new table node and returns it. The method accepts a
2173
+ block that will be passed the table as a parameter. The node is added to
2174
+ the node the method is called upon after the block is complete.</p>
2175
+
2176
+ <h4 id="label-Parameters">Parameters</h4>
2177
+ <dl class="rdoc-list note-list"><dt>rows
2178
+ <dd>
2179
+ <p>The number of rows that the table contains.</p>
2180
+ </dd><dt>columns
2181
+ <dd>
2182
+ <p>The number of columns that the table contains.</p>
2183
+ </dd><dt>*widths
2184
+ <dd>
2185
+ <p>One or more integers representing the widths for the table columns.</p>
2186
+ </dd></dl>
2187
+
2188
+
2189
+ </div>
2190
+ </div>
2191
+ <div class="tags">
2192
+
2193
+ <p class="tag_title">Yields:</p>
2194
+ <ul class="yield">
2195
+
2196
+ <li>
2197
+
2198
+
2199
+ <span class='type'>(<tt>node</tt>)</span>
2200
+
2201
+
2202
+
2203
+ </li>
2204
+
2205
+ </ul>
2206
+
2207
+ </div><table class="source_code">
2208
+ <tr>
2209
+ <td>
2210
+ <pre class="lines">
2211
+
2212
+
2213
+ 573
2214
+ 574
2215
+ 575
2216
+ 576
2217
+ 577
2218
+ 578</pre>
2219
+ </td>
2220
+ <td>
2221
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 573</span>
2222
+
2223
+ <span class='kw'>def</span> <span class='id identifier rubyid_table'>table</span><span class='lparen'>(</span><span class='id identifier rubyid_rows'>rows</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>
2224
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="TableNode.html" title="RRTF::TableNode (class)">TableNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TableNode.html#initialize-instance_method" title="RRTF::TableNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_rows'>rows</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>
2225
+ <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
2226
+ <span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
2227
+ <span class='id identifier rubyid_node'>node</span>
2228
+ <span class='kw'>end</span></pre>
2229
+ </td>
2230
+ </tr>
2231
+ </table>
2232
+ </div>
2233
+
2234
+ <div class="method_details ">
2235
+ <h3 class="signature " id="to_rtf-instance_method">
2236
+
2237
+ #<strong>to_rtf</strong> &#x21d2; <tt>Object</tt>
2238
+
2239
+
2240
+
2241
+
2242
+
2243
+ </h3><div class="docstring">
2244
+ <div class="discussion">
2245
+
2246
+ <p>This method generates the RTF text for a CommandNode object.</p>
2247
+
2248
+
2249
+ </div>
2250
+ </div>
2251
+ <div class="tags">
2252
+
2253
+
2254
+ </div><table class="source_code">
2255
+ <tr>
2256
+ <td>
2257
+ <pre class="lines">
2258
+
2259
+
2260
+ 257
2261
+ 258
2262
+ 259
2263
+ 260
2264
+ 261
2265
+ 262
2266
+ 263
2267
+ 264
2268
+ 265
2269
+ 266
2270
+ 267
2271
+ 268
2272
+ 269
2273
+ 270
2274
+ 271
2275
+ 272
2276
+ 273</pre>
2277
+ </td>
2278
+ <td>
2279
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 257</span>
2280
+
2281
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
2282
+ <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>
2283
+
2284
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>{</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_wrap?'>wrap?</span>
2285
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='ivar'>@prefix</span> <span class='kw'>if</span> <span class='ivar'>@prefix</span>
2286
+
2287
+ <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_entry'>entry</span><span class='op'>|</span>
2288
+ <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> <span class='kw'>if</span> <span class='id identifier rubyid_split?'>split?</span>
2289
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'>to_rtf</span>
2290
+ <span class='kw'>end</span>
2291
+
2292
+ <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> <span class='kw'>if</span> <span class='id identifier rubyid_split?'>split?</span>
2293
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='ivar'>@suffix</span> <span class='kw'>if</span> <span class='ivar'>@suffix</span>
2294
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>}</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_wrap?'>wrap?</span>
2295
+
2296
+ <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
2297
+ <span class='kw'>end</span></pre>
2298
+ </td>
2299
+ </tr>
2300
+ </table>
2301
+ </div>
2302
+
2303
+ <div class="method_details ">
2304
+ <h3 class="signature " id="underline-instance_method">
2305
+
2306
+ #<strong>underline</strong> &#x21d2; <tt>Object</tt>
2307
+
2308
+
2309
+
2310
+
2311
+
2312
+ </h3><div class="docstring">
2313
+ <div class="discussion">
2314
+
2315
+ <p>This method provides a short cut means of creating an underline command
2316
+ node. The method accepts a block that will be passed a single parameter
2317
+ which will be a reference to the underline node created. After the block is
2318
+ complete the underline node is appended to the end of the child nodes on
2319
+ the object that the method is call against.</p>
2320
+
2321
+
2322
+ </div>
2323
+ </div>
2324
+ <div class="tags">
2325
+
2326
+
2327
+ </div><table class="source_code">
2328
+ <tr>
2329
+ <td>
2330
+ <pre class="lines">
2331
+
2332
+
2333
+ 423
2334
+ 424
2335
+ 425
2336
+ 426
2337
+ 427
2338
+ 428
2339
+ 429
2340
+ 430
2341
+ 431</pre>
2342
+ </td>
2343
+ <td>
2344
+ <pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 423</span>
2345
+
2346
+ <span class='kw'>def</span> <span class='id identifier rubyid_underline'>underline</span>
2347
+ <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="CharacterStyle.html" title="RRTF::CharacterStyle (class)">CharacterStyle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CharacterStyle.html#initialize-instance_method" title="RRTF::CharacterStyle#initialize (method)">new</a></span></span>
2348
+ <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_underline'>underline</span> <span class='op'>=</span> <span class='kw'>true</span>
2349
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
2350
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_node'>node</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span><span class='rbrace'>}</span>
2351
+ <span class='kw'>else</span>
2352
+ <span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='rparen'>)</span>
2353
+ <span class='kw'>end</span>
2354
+ <span class='kw'>end</span></pre>
2355
+ </td>
2356
+ </tr>
2357
+ </table>
2358
+ </div>
2359
+
2360
+ </div>
2361
+
2362
+ </div>
2363
+
2364
+ <div id="footer">
2365
+ Generated on Mon Jul 24 15:49:00 2017 by
2366
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2367
+ 0.9.9 (ruby-2.3.3).
2368
+ </div>
2369
+
2370
+ </div>
2371
+ </body>
2372
+ </html>