rrtf 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
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,763 @@
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::FontTable
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::FontTable";
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 (F)</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">FontTable</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::FontTable
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">RRTF::FontTable</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/rrtf/font.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>This class represents the font table for an RTF document. An instance of
106
+ the class is used internally by the Document class and should not need to
107
+ be explicitly instantiated (although it can be obtained from a Document
108
+ object if needed).</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <h2>
125
+ Instance Method Summary
126
+ <small><a href="#" class="summary_toggle">collapse</a></small>
127
+ </h2>
128
+
129
+ <ul class="summary">
130
+
131
+ <li class="public ">
132
+ <span class="summary_signature">
133
+
134
+ <a href="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(index) &#x21d2; Object </a>
135
+
136
+
137
+
138
+ </span>
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'>
149
+ <p>This method overloads the array dereference operator for the FontTable
150
+ class.</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(font) &#x21d2; Object </a>
160
+
161
+
162
+
163
+ (also: #&lt;&lt;)
164
+
165
+ </span>
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <span class="summary_desc"><div class='inline'>
176
+ <p>This method adds a font to a FontTable instance.</p>
177
+ </div></span>
178
+
179
+ </li>
180
+
181
+
182
+ <li class="public ">
183
+ <span class="summary_signature">
184
+
185
+ <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong> &#x21d2; Object </a>
186
+
187
+
188
+
189
+ </span>
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+ <span class="summary_desc"><div class='inline'>
200
+ <p>This method iterates over the contents of a FontTable object.</p>
201
+ </div></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#index-instance_method" title="#index (instance method)">#<strong>index</strong>(font) &#x21d2; Object </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+ <span class="summary_desc"><div class='inline'>
224
+ <p>This method fetches the index of a font within a FontTable object.</p>
225
+ </div></span>
226
+
227
+ </li>
228
+
229
+
230
+ <li class="public ">
231
+ <span class="summary_signature">
232
+
233
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*fonts) &#x21d2; FontTable </a>
234
+
235
+
236
+
237
+ </span>
238
+
239
+
240
+ <span class="note title constructor">constructor</span>
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ <span class="summary_desc"><div class='inline'>
250
+ <p>This is the constructor for the RTFTable class.</p>
251
+ </div></span>
252
+
253
+ </li>
254
+
255
+
256
+ <li class="public ">
257
+ <span class="summary_signature">
258
+
259
+ <a href="#size-instance_method" title="#size (instance method)">#<strong>size</strong> &#x21d2; Object </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <span class="summary_desc"><div class='inline'>
274
+ <p>This method is used to retrieve a count of the number of fonts held within
275
+ an instance of the FontTable class.</p>
276
+ </div></span>
277
+
278
+ </li>
279
+
280
+
281
+ <li class="public ">
282
+ <span class="summary_signature">
283
+
284
+ <a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>(indent = 0) &#x21d2; Object </a>
285
+
286
+
287
+
288
+ </span>
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+ <span class="summary_desc"><div class='inline'>
299
+ <p>This method generates the RTF text for a FontTable object.</p>
300
+ </div></span>
301
+
302
+ </li>
303
+
304
+
305
+ <li class="public ">
306
+ <span class="summary_signature">
307
+
308
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong>(indent = 0) &#x21d2; Object </a>
309
+
310
+
311
+
312
+ </span>
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+ <span class="summary_desc"><div class='inline'>
323
+ <p>This method generates a textual description for a FontTable object.</p>
324
+ </div></span>
325
+
326
+ </li>
327
+
328
+
329
+ </ul>
330
+
331
+
332
+ <div id="constructor_details" class="method_details_list">
333
+ <h2>Constructor Details</h2>
334
+
335
+ <div class="method_details first">
336
+ <h3 class="signature first" id="initialize-instance_method">
337
+
338
+ #<strong>initialize</strong>(*fonts) &#x21d2; <tt><span class='object_link'><a href="" title="RRTF::FontTable (class)">FontTable</a></span></tt>
339
+
340
+
341
+
342
+
343
+
344
+ </h3><div class="docstring">
345
+ <div class="discussion">
346
+
347
+ <p>This is the constructor for the RTFTable class.</p>
348
+
349
+ <h4 id="label-Parameters">Parameters</h4>
350
+ <dl class="rdoc-list note-list"><dt>*fonts
351
+ <dd>
352
+ <p>Zero or more font objects that are to be added to the font table. Objects
353
+ that are not Fonts will be ignored.</p>
354
+ </dd></dl>
355
+
356
+
357
+ </div>
358
+ </div>
359
+ <div class="tags">
360
+
361
+
362
+ </div><table class="source_code">
363
+ <tr>
364
+ <td>
365
+ <pre class="lines">
366
+
367
+
368
+ 101
369
+ 102
370
+ 103
371
+ 104</pre>
372
+ </td>
373
+ <td>
374
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 101</span>
375
+
376
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_fonts'>fonts</span><span class='rparen'>)</span>
377
+ <span class='ivar'>@fonts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
378
+ <span class='id identifier rubyid_fonts'>fonts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_font'>font</span><span class='op'>|</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span><span class='rbrace'>}</span>
379
+ <span class='kw'>end</span></pre>
380
+ </td>
381
+ </tr>
382
+ </table>
383
+ </div>
384
+
385
+ </div>
386
+
387
+
388
+ <div id="instance_method_details" class="method_details_list">
389
+ <h2>Instance Method Details</h2>
390
+
391
+
392
+ <div class="method_details first">
393
+ <h3 class="signature first" id="[]-instance_method">
394
+
395
+ #<strong>[]</strong>(index) &#x21d2; <tt>Object</tt>
396
+
397
+
398
+
399
+
400
+
401
+ </h3><div class="docstring">
402
+ <div class="discussion">
403
+
404
+ <p>This method overloads the array dereference operator for the FontTable
405
+ class.</p>
406
+
407
+ <h4 id="label-Parameters">Parameters</h4>
408
+ <dl class="rdoc-list note-list"><dt>index
409
+ <dd>
410
+ <p>The index into the font table of the font to be retrieved. If the index is
411
+ invalid then nil is returned.</p>
412
+ </dd></dl>
413
+
414
+
415
+ </div>
416
+ </div>
417
+ <div class="tags">
418
+
419
+
420
+ </div><table class="source_code">
421
+ <tr>
422
+ <td>
423
+ <pre class="lines">
424
+
425
+
426
+ 138
427
+ 139
428
+ 140</pre>
429
+ </td>
430
+ <td>
431
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 138</span>
432
+
433
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_index'>index</span><span class='rparen'>)</span>
434
+ <span class='ivar'>@fonts</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span>
435
+ <span class='kw'>end</span></pre>
436
+ </td>
437
+ </tr>
438
+ </table>
439
+ </div>
440
+
441
+ <div class="method_details ">
442
+ <h3 class="signature " id="add-instance_method">
443
+
444
+ #<strong>add</strong>(font) &#x21d2; <tt>Object</tt>
445
+
446
+
447
+
448
+ <span class="aliases">Also known as:
449
+ <span class="names"><span id='<<-instance_method'>&lt;&lt;</span></span>
450
+ </span>
451
+
452
+
453
+
454
+ </h3><div class="docstring">
455
+ <div class="discussion">
456
+
457
+ <p>This method adds a font to a FontTable instance. This method returns a
458
+ reference to the FontTable object updated.</p>
459
+
460
+ <h4 id="label-Parameters">Parameters</h4>
461
+ <dl class="rdoc-list note-list"><dt>font
462
+ <dd>
463
+ <p>A reference to the font to be added. If this is not a Font object or
464
+ already exists in the table it will be ignored.</p>
465
+ </dd></dl>
466
+
467
+
468
+ </div>
469
+ </div>
470
+ <div class="tags">
471
+
472
+
473
+ </div><table class="source_code">
474
+ <tr>
475
+ <td>
476
+ <pre class="lines">
477
+
478
+
479
+ 118
480
+ 119
481
+ 120
482
+ 121
483
+ 122
484
+ 123</pre>
485
+ </td>
486
+ <td>
487
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 118</span>
488
+
489
+ <span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span>
490
+ <span class='kw'>if</span> <span class='id identifier rubyid_font'>font</span><span class='period'>.</span><span class='id identifier rubyid_instance_of?'>instance_of?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Font.html" title="RRTF::Font (class)">Font</a></span></span><span class='rparen'>)</span>
491
+ <span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
492
+ <span class='kw'>end</span>
493
+ <span class='kw'>self</span>
494
+ <span class='kw'>end</span></pre>
495
+ </td>
496
+ </tr>
497
+ </table>
498
+ </div>
499
+
500
+ <div class="method_details ">
501
+ <h3 class="signature " id="each-instance_method">
502
+
503
+ #<strong>each</strong> &#x21d2; <tt>Object</tt>
504
+
505
+
506
+
507
+
508
+
509
+ </h3><div class="docstring">
510
+ <div class="discussion">
511
+
512
+ <p>This method iterates over the contents of a FontTable object. This method
513
+ expects a block that takes a single parameter (the next font from the
514
+ table).</p>
515
+
516
+
517
+ </div>
518
+ </div>
519
+ <div class="tags">
520
+
521
+
522
+ </div><table class="source_code">
523
+ <tr>
524
+ <td>
525
+ <pre class="lines">
526
+
527
+
528
+ 128
529
+ 129
530
+ 130</pre>
531
+ </td>
532
+ <td>
533
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 128</span>
534
+
535
+ <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span>
536
+ <span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_font'>font</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_font'>font</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
537
+ <span class='kw'>end</span></pre>
538
+ </td>
539
+ </tr>
540
+ </table>
541
+ </div>
542
+
543
+ <div class="method_details ">
544
+ <h3 class="signature " id="index-instance_method">
545
+
546
+ #<strong>index</strong>(font) &#x21d2; <tt>Object</tt>
547
+
548
+
549
+
550
+
551
+
552
+ </h3><div class="docstring">
553
+ <div class="discussion">
554
+
555
+ <p>This method fetches the index of a font within a FontTable object. If the
556
+ font does not exist in the table then nil is returned.</p>
557
+
558
+ <h4 id="label-Parameters">Parameters</h4>
559
+ <dl class="rdoc-list note-list"><dt>font
560
+ <dd>
561
+ <p>A reference to the font to check for.</p>
562
+ </dd></dl>
563
+
564
+
565
+ </div>
566
+ </div>
567
+ <div class="tags">
568
+
569
+
570
+ </div><table class="source_code">
571
+ <tr>
572
+ <td>
573
+ <pre class="lines">
574
+
575
+
576
+ 147
577
+ 148
578
+ 149</pre>
579
+ </td>
580
+ <td>
581
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 147</span>
582
+
583
+ <span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span>
584
+ <span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span>
585
+ <span class='kw'>end</span></pre>
586
+ </td>
587
+ </tr>
588
+ </table>
589
+ </div>
590
+
591
+ <div class="method_details ">
592
+ <h3 class="signature " id="size-instance_method">
593
+
594
+ #<strong>size</strong> &#x21d2; <tt>Object</tt>
595
+
596
+
597
+
598
+
599
+
600
+ </h3><div class="docstring">
601
+ <div class="discussion">
602
+
603
+ <p>This method is used to retrieve a count of the number of fonts held within
604
+ an instance of the FontTable class.</p>
605
+
606
+
607
+ </div>
608
+ </div>
609
+ <div class="tags">
610
+
611
+
612
+ </div><table class="source_code">
613
+ <tr>
614
+ <td>
615
+ <pre class="lines">
616
+
617
+
618
+ 108
619
+ 109
620
+ 110</pre>
621
+ </td>
622
+ <td>
623
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 108</span>
624
+
625
+ <span class='kw'>def</span> <span class='id identifier rubyid_size'>size</span>
626
+ <span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
627
+ <span class='kw'>end</span></pre>
628
+ </td>
629
+ </tr>
630
+ </table>
631
+ </div>
632
+
633
+ <div class="method_details ">
634
+ <h3 class="signature " id="to_rtf-instance_method">
635
+
636
+ #<strong>to_rtf</strong>(indent = 0) &#x21d2; <tt>Object</tt>
637
+
638
+
639
+
640
+
641
+
642
+ </h3><div class="docstring">
643
+ <div class="discussion">
644
+
645
+ <p>This method generates the RTF text for a FontTable object.</p>
646
+
647
+ <h4 id="label-Parameters">Parameters</h4>
648
+ <dl class="rdoc-list note-list"><dt>indent
649
+ <dd>
650
+ <p>The number of spaces to prefix to the lines generated by the method.
651
+ Defaults to zero.</p>
652
+ </dd></dl>
653
+
654
+
655
+ </div>
656
+ </div>
657
+ <div class="tags">
658
+
659
+
660
+ </div><table class="source_code">
661
+ <tr>
662
+ <td>
663
+ <pre class="lines">
664
+
665
+
666
+ 169
667
+ 170
668
+ 171
669
+ 172
670
+ 173
671
+ 174
672
+ 175
673
+ 176
674
+ 177
675
+ 178</pre>
676
+ </td>
677
+ <td>
678
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 169</span>
679
+
680
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
681
+ <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span> <span class='op'>*</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
682
+ <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>
683
+ <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='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>{\\fonttbl</span><span class='tstring_end'>&quot;</span></span>
684
+ <span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_each_index'>each_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_index'>index</span><span class='op'>|</span>
685
+ <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='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>{\\f</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_index'>index</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='ivar'>@fonts</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'>to_rtf</span><span class='embexpr_end'>}</span><span class='tstring_content'>}</span><span class='tstring_end'>&quot;</span></span>
686
+ <span class='kw'>end</span>
687
+ <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='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>}</span><span class='tstring_end'>&quot;</span></span>
688
+ <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
689
+ <span class='kw'>end</span></pre>
690
+ </td>
691
+ </tr>
692
+ </table>
693
+ </div>
694
+
695
+ <div class="method_details ">
696
+ <h3 class="signature " id="to_s-instance_method">
697
+
698
+ #<strong>to_s</strong>(indent = 0) &#x21d2; <tt>Object</tt>
699
+
700
+
701
+
702
+
703
+
704
+ </h3><div class="docstring">
705
+ <div class="discussion">
706
+
707
+ <p>This method generates a textual description for a FontTable object.</p>
708
+
709
+ <h4 id="label-Parameters">Parameters</h4>
710
+ <dl class="rdoc-list note-list"><dt>indent
711
+ <dd>
712
+ <p>The number of spaces to prefix to the lines generated by the method.
713
+ Defaults to zero.</p>
714
+ </dd></dl>
715
+
716
+
717
+ </div>
718
+ </div>
719
+ <div class="tags">
720
+
721
+
722
+ </div><table class="source_code">
723
+ <tr>
724
+ <td>
725
+ <pre class="lines">
726
+
727
+
728
+ 156
729
+ 157
730
+ 158
731
+ 159
732
+ 160
733
+ 161
734
+ 162</pre>
735
+ </td>
736
+ <td>
737
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 156</span>
738
+
739
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
740
+ <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span> <span class='op'>*</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
741
+ <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>
742
+ <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='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>Font Table (</span><span class='embexpr_beg'>#{</span><span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'> fonts)</span><span class='tstring_end'>&quot;</span></span>
743
+ <span class='ivar'>@fonts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_font'>font</span><span class='op'>|</span> <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='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_font'>font</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span>
744
+ <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
745
+ <span class='kw'>end</span></pre>
746
+ </td>
747
+ </tr>
748
+ </table>
749
+ </div>
750
+
751
+ </div>
752
+
753
+ </div>
754
+
755
+ <div id="footer">
756
+ Generated on Mon Jul 24 15:48:59 2017 by
757
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
758
+ 0.9.9 (ruby-2.3.3).
759
+ </div>
760
+
761
+ </div>
762
+ </body>
763
+ </html>