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,799 @@
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::ListLevel
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::ListLevel";
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 (L)</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">ListLevel</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::ListLevel
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::ListLevel</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/list.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+ <h2>Constant Summary</h2>
104
+ <dl class="constants">
105
+
106
+ <dt id="ValidLevels-constant" class="">ValidLevels =
107
+
108
+ </dt>
109
+ <dd><pre class="code"><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='int'>9</span><span class='rparen'>)</span></pre></dd>
110
+
111
+ <dt id="LevelTabs-constant" class="">LevelTabs =
112
+
113
+ </dt>
114
+ <dd><pre class="code"><span class='lbracket'>[</span>
115
+ <span class='int'>220</span><span class='comma'>,</span> <span class='int'>720</span><span class='comma'>,</span> <span class='int'>1133</span><span class='comma'>,</span> <span class='int'>1700</span><span class='comma'>,</span> <span class='int'>2267</span><span class='comma'>,</span>
116
+ <span class='int'>2834</span><span class='comma'>,</span> <span class='int'>3401</span><span class='comma'>,</span> <span class='int'>3968</span><span class='comma'>,</span> <span class='int'>4535</span><span class='comma'>,</span> <span class='int'>5102</span><span class='comma'>,</span>
117
+ <span class='int'>5669</span><span class='comma'>,</span> <span class='int'>6236</span><span class='comma'>,</span> <span class='int'>6803</span>
118
+ <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
119
+
120
+ <dt id="ResetTabs-constant" class="">ResetTabs =
121
+
122
+ </dt>
123
+ <dd><pre class="code"><span class='lbracket'>[</span><span class='int'>560</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#LevelTabs-constant" title="RRTF::ListLevel::LevelTabs (constant)">LevelTabs</a></span></span><span class='lbracket'>[</span><span class='int'>2</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
124
+
125
+ </dl>
126
+
127
+
128
+
129
+
130
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
131
+ <ul class="summary">
132
+
133
+ <li class="public ">
134
+ <span class="summary_signature">
135
+
136
+ <a href="#level-instance_method" title="#level (instance method)">#<strong>level</strong> &#x21d2; Object </a>
137
+
138
+
139
+
140
+ </span>
141
+
142
+
143
+
144
+
145
+ <span class="note title readonly">readonly</span>
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <span class="summary_desc"><div class='inline'>
156
+ <p>Returns the value of attribute level.</p>
157
+ </div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#marker-instance_method" title="#marker (instance method)">#<strong>marker</strong> &#x21d2; Object </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+ <span class="note title readonly">readonly</span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'>
185
+ <p>Returns the value of attribute marker.</p>
186
+ </div></span>
187
+
188
+ </li>
189
+
190
+
191
+ </ul>
192
+
193
+
194
+
195
+
196
+
197
+ <h2>
198
+ Instance Method Summary
199
+ <small><a href="#" class="summary_toggle">collapse</a></small>
200
+ </h2>
201
+
202
+ <ul class="summary">
203
+
204
+ <li class="public ">
205
+ <span class="summary_signature">
206
+
207
+ <a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; Object </a>
208
+
209
+
210
+
211
+ </span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <span class="summary_desc"><div class='inline'></div></span>
222
+
223
+ </li>
224
+
225
+
226
+ <li class="public ">
227
+ <span class="summary_signature">
228
+
229
+ <a href="#indent-instance_method" title="#indent (instance method)">#<strong>indent</strong> &#x21d2; Object </a>
230
+
231
+
232
+
233
+ </span>
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ <span class="summary_desc"><div class='inline'></div></span>
244
+
245
+ </li>
246
+
247
+
248
+ <li class="public ">
249
+ <span class="summary_signature">
250
+
251
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(template, marker, level) &#x21d2; ListLevel </a>
252
+
253
+
254
+
255
+ </span>
256
+
257
+
258
+ <span class="note title constructor">constructor</span>
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+ <span class="summary_desc"><div class='inline'>
268
+ <p>A new instance of ListLevel.</p>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#reset_tabs-instance_method" title="#reset_tabs (instance method)">#<strong>reset_tabs</strong> &#x21d2; Object </a>
278
+
279
+
280
+
281
+ </span>
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+ <span class="summary_desc"><div class='inline'></div></span>
292
+
293
+ </li>
294
+
295
+
296
+ <li class="public ">
297
+ <span class="summary_signature">
298
+
299
+ <a href="#tabs-instance_method" title="#tabs (instance method)">#<strong>tabs</strong> &#x21d2; Object </a>
300
+
301
+
302
+
303
+ </span>
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+ <span class="summary_desc"><div class='inline'></div></span>
314
+
315
+ </li>
316
+
317
+
318
+ <li class="public ">
319
+ <span class="summary_signature">
320
+
321
+ <a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>(indent = 0) &#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'></div></span>
336
+
337
+ </li>
338
+
339
+
340
+ <li class="public ">
341
+ <span class="summary_signature">
342
+
343
+ <a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> &#x21d2; Object </a>
344
+
345
+
346
+
347
+ </span>
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+ <span class="summary_desc"><div class='inline'></div></span>
358
+
359
+ </li>
360
+
361
+
362
+ </ul>
363
+
364
+
365
+ <div id="constructor_details" class="method_details_list">
366
+ <h2>Constructor Details</h2>
367
+
368
+ <div class="method_details first">
369
+ <h3 class="signature first" id="initialize-instance_method">
370
+
371
+ #<strong>initialize</strong>(template, marker, level) &#x21d2; <tt><span class='object_link'><a href="" title="RRTF::ListLevel (class)">ListLevel</a></span></tt>
372
+
373
+
374
+
375
+
376
+
377
+ </h3><div class="docstring">
378
+ <div class="discussion">
379
+
380
+ <p>Returns a new instance of ListLevel</p>
381
+
382
+
383
+ </div>
384
+ </div>
385
+ <div class="tags">
386
+
387
+
388
+ </div><table class="source_code">
389
+ <tr>
390
+ <td>
391
+ <pre class="lines">
392
+
393
+
394
+ 140
395
+ 141
396
+ 142
397
+ 143
398
+ 144
399
+ 145
400
+ 146
401
+ 147
402
+ 148
403
+ 149
404
+ 150
405
+ 151
406
+ 152</pre>
407
+ </td>
408
+ <td>
409
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 140</span>
410
+
411
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_template'>template</span><span class='comma'>,</span> <span class='id identifier rubyid_marker'>marker</span><span class='comma'>,</span> <span class='id identifier rubyid_level'>level</span><span class='rparen'>)</span>
412
+ <span class='kw'>unless</span> <span class='id identifier rubyid_marker'>marker</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'><span class='object_link'><a href="ListMarker.html" title="RRTF::ListMarker (class)">ListMarker</a></span></span>
413
+ <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'>Invalid marker </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_marker'>marker</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
414
+ <span class='kw'>end</span>
415
+
416
+ <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="#ValidLevels-constant" title="RRTF::ListLevel::ValidLevels (constant)">ValidLevels</a></span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_level'>level</span>
417
+ <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'>Invalid list level: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_level'>level</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
418
+ <span class='kw'>end</span>
419
+
420
+ <span class='ivar'>@template</span> <span class='op'>=</span> <span class='id identifier rubyid_template'>template</span>
421
+ <span class='ivar'>@level</span> <span class='op'>=</span> <span class='id identifier rubyid_level'>level</span>
422
+ <span class='ivar'>@marker</span> <span class='op'>=</span> <span class='id identifier rubyid_marker'>marker</span>
423
+ <span class='kw'>end</span></pre>
424
+ </td>
425
+ </tr>
426
+ </table>
427
+ </div>
428
+
429
+ </div>
430
+
431
+ <div id="instance_attr_details" class="attr_details">
432
+ <h2>Instance Attribute Details</h2>
433
+
434
+
435
+ <span id=""></span>
436
+ <div class="method_details first">
437
+ <h3 class="signature first" id="level-instance_method">
438
+
439
+ #<strong>level</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
440
+
441
+
442
+
443
+
444
+
445
+ </h3><div class="docstring">
446
+ <div class="discussion">
447
+
448
+ <p>Returns the value of attribute level</p>
449
+
450
+
451
+ </div>
452
+ </div>
453
+ <div class="tags">
454
+
455
+
456
+ </div><table class="source_code">
457
+ <tr>
458
+ <td>
459
+ <pre class="lines">
460
+
461
+
462
+ 138
463
+ 139
464
+ 140</pre>
465
+ </td>
466
+ <td>
467
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 138</span>
468
+
469
+ <span class='kw'>def</span> <span class='id identifier rubyid_level'>level</span>
470
+ <span class='ivar'>@level</span>
471
+ <span class='kw'>end</span></pre>
472
+ </td>
473
+ </tr>
474
+ </table>
475
+ </div>
476
+
477
+
478
+ <span id=""></span>
479
+ <div class="method_details ">
480
+ <h3 class="signature " id="marker-instance_method">
481
+
482
+ #<strong>marker</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
483
+
484
+
485
+
486
+
487
+
488
+ </h3><div class="docstring">
489
+ <div class="discussion">
490
+
491
+ <p>Returns the value of attribute marker</p>
492
+
493
+
494
+ </div>
495
+ </div>
496
+ <div class="tags">
497
+
498
+
499
+ </div><table class="source_code">
500
+ <tr>
501
+ <td>
502
+ <pre class="lines">
503
+
504
+
505
+ 138
506
+ 139
507
+ 140</pre>
508
+ </td>
509
+ <td>
510
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 138</span>
511
+
512
+ <span class='kw'>def</span> <span class='id identifier rubyid_marker'>marker</span>
513
+ <span class='ivar'>@marker</span>
514
+ <span class='kw'>end</span></pre>
515
+ </td>
516
+ </tr>
517
+ </table>
518
+ </div>
519
+
520
+ </div>
521
+
522
+
523
+ <div id="instance_method_details" class="method_details_list">
524
+ <h2>Instance Method Details</h2>
525
+
526
+
527
+ <div class="method_details first">
528
+ <h3 class="signature first" id="id-instance_method">
529
+
530
+ #<strong>id</strong> &#x21d2; <tt>Object</tt>
531
+
532
+
533
+
534
+
535
+
536
+ </h3><table class="source_code">
537
+ <tr>
538
+ <td>
539
+ <pre class="lines">
540
+
541
+
542
+ 181
543
+ 182
544
+ 183</pre>
545
+ </td>
546
+ <td>
547
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 181</span>
548
+
549
+ <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
550
+ <span class='ivar'>@id</span> <span class='op'>||=</span> <span class='ivar'>@template</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>*</span> <span class='int'>10</span> <span class='op'>+</span> <span class='id identifier rubyid_level'>level</span>
551
+ <span class='kw'>end</span></pre>
552
+ </td>
553
+ </tr>
554
+ </table>
555
+ </div>
556
+
557
+ <div class="method_details ">
558
+ <h3 class="signature " id="indent-instance_method">
559
+
560
+ #<strong>indent</strong> &#x21d2; <tt>Object</tt>
561
+
562
+
563
+
564
+
565
+
566
+ </h3><table class="source_code">
567
+ <tr>
568
+ <td>
569
+ <pre class="lines">
570
+
571
+
572
+ 185
573
+ 186
574
+ 187</pre>
575
+ </td>
576
+ <td>
577
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 185</span>
578
+
579
+ <span class='kw'>def</span> <span class='id identifier rubyid_indent'>indent</span>
580
+ <span class='ivar'>@indent</span> <span class='op'>||=</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>*</span> <span class='int'>720</span>
581
+ <span class='kw'>end</span></pre>
582
+ </td>
583
+ </tr>
584
+ </table>
585
+ </div>
586
+
587
+ <div class="method_details ">
588
+ <h3 class="signature " id="reset_tabs-instance_method">
589
+
590
+ #<strong>reset_tabs</strong> &#x21d2; <tt>Object</tt>
591
+
592
+
593
+
594
+
595
+
596
+ </h3><table class="source_code">
597
+ <tr>
598
+ <td>
599
+ <pre class="lines">
600
+
601
+
602
+ 158
603
+ 159
604
+ 160</pre>
605
+ </td>
606
+ <td>
607
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 158</span>
608
+
609
+ <span class='kw'>def</span> <span class='id identifier rubyid_reset_tabs'>reset_tabs</span>
610
+ <span class='const'><span class='object_link'><a href="#ResetTabs-constant" title="RRTF::ListLevel::ResetTabs (constant)">ResetTabs</a></span></span>
611
+ <span class='kw'>end</span></pre>
612
+ </td>
613
+ </tr>
614
+ </table>
615
+ </div>
616
+
617
+ <div class="method_details ">
618
+ <h3 class="signature " id="tabs-instance_method">
619
+
620
+ #<strong>tabs</strong> &#x21d2; <tt>Object</tt>
621
+
622
+
623
+
624
+
625
+
626
+ </h3><table class="source_code">
627
+ <tr>
628
+ <td>
629
+ <pre class="lines">
630
+
631
+
632
+ 162
633
+ 163
634
+ 164
635
+ 165
636
+ 166
637
+ 167
638
+ 168
639
+ 169
640
+ 170
641
+ 171
642
+ 172
643
+ 173
644
+ 174
645
+ 175
646
+ 176
647
+ 177
648
+ 178
649
+ 179</pre>
650
+ </td>
651
+ <td>
652
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 162</span>
653
+
654
+ <span class='kw'>def</span> <span class='id identifier rubyid_tabs'>tabs</span>
655
+ <span class='ivar'>@tabs</span> <span class='op'>||=</span> <span class='kw'>begin</span>
656
+ <span class='id identifier rubyid_tabs'>tabs</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#LevelTabs-constant" title="RRTF::ListLevel::LevelTabs (constant)">LevelTabs</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='comment'># Kernel#tap would be prettier here
657
+ </span>
658
+ <span class='lparen'>(</span><span class='ivar'>@level</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span>
659
+ <span class='comment'># Reverse-engineered while looking at Textedit.app
660
+ </span> <span class='comment'># generated output: they already made sure that it
661
+ </span> <span class='comment'># would look good on every RTF editor :-p
662
+ </span> <span class='comment'>#
663
+ </span> <span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='op'>=</span> <span class='id identifier rubyid_tabs'>tabs</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span><span class='lparen'>(</span><span class='int'>3</span><span class='rparen'>)</span>
664
+ <span class='id identifier rubyid_a'>a</span><span class='comma'>,</span><span class='id identifier rubyid_b'>b</span> <span class='op'>=</span> <span class='id identifier rubyid_a'>a</span> <span class='op'>+</span> <span class='int'>720</span><span class='comma'>,</span> <span class='id identifier rubyid_a'>a</span> <span class='op'>+</span> <span class='int'>1220</span>
665
+ <span class='id identifier rubyid_tabs'>tabs</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span> <span class='kw'>while</span> <span class='id identifier rubyid_tabs'>tabs</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_b'>b</span>
666
+ <span class='id identifier rubyid_tabs'>tabs</span><span class='period'>.</span><span class='id identifier rubyid_unshift'>unshift</span> <span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span>
667
+ <span class='kw'>end</span>
668
+
669
+ <span class='id identifier rubyid_tabs'>tabs</span>
670
+ <span class='kw'>end</span>
671
+ <span class='kw'>end</span></pre>
672
+ </td>
673
+ </tr>
674
+ </table>
675
+ </div>
676
+
677
+ <div class="method_details ">
678
+ <h3 class="signature " id="to_rtf-instance_method">
679
+
680
+ #<strong>to_rtf</strong>(indent = 0) &#x21d2; <tt>Object</tt>
681
+
682
+
683
+
684
+
685
+
686
+ </h3><table class="source_code">
687
+ <tr>
688
+ <td>
689
+ <pre class="lines">
690
+
691
+
692
+ 189
693
+ 190
694
+ 191
695
+ 192
696
+ 193
697
+ 194
698
+ 195
699
+ 196
700
+ 197
701
+ 198
702
+ 199
703
+ 200
704
+ 201
705
+ 202
706
+ 203
707
+ 204
708
+ 205
709
+ 206
710
+ 207
711
+ 208
712
+ 209
713
+ 210
714
+ 211
715
+ 212
716
+ 213
717
+ 214
718
+ 215
719
+ 216</pre>
720
+ </td>
721
+ <td>
722
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 189</span>
723
+
724
+ <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>
725
+ <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>
726
+
727
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>=</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'>{\\listlevel\\levelstartat1</span><span class='tstring_end'>&quot;</span></span>
728
+
729
+ <span class='comment'># Marker type. The first declaration is for Backward Compatibility (BC).
730
+ </span> <span class='id identifier rubyid_nfc'>nfc</span> <span class='op'>=</span> <span class='ivar'>@marker</span><span class='period'>.</span><span class='id identifier rubyid_number_type'>number_type</span>
731
+ <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'>\\levelnfc</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_nfc'>nfc</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\levelnfcn</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_nfc'>nfc</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
732
+
733
+ <span class='comment'># Justification, currently only left justified (0). First decl for BC.
734
+ </span> <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'>\leveljc0\leveljcn0</span><span class='tstring_end'>&#39;</span></span>
735
+
736
+ <span class='comment'># Character that follows the level text, currently only TAB.
737
+ </span> <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'>\levelfollow0</span><span class='tstring_end'>&#39;</span></span>
738
+
739
+ <span class='comment'># BC: Minimum distance from the left &amp; right edges.
740
+ </span> <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'>\levelindent0\levelspace360</span><span class='tstring_end'>&#39;</span></span>
741
+
742
+ <span class='comment'># Marker name
743
+ </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'>{\\*\\levelmarker </span><span class='embexpr_beg'>#{</span><span class='ivar'>@marker</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>}</span><span class='tstring_end'>&quot;</span></span>
744
+
745
+ <span class='comment'># Marker text format
746
+ </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'>{\\leveltext\\leveltemplateid</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='ivar'>@marker</span><span class='period'>.</span><span class='id identifier rubyid_template_format'>template_format</span><span class='embexpr_end'>}</span><span class='tstring_content'>;}</span><span class='tstring_end'>&quot;</span></span>
747
+ <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'>{\levelnumbers;}</span><span class='tstring_end'>&#39;</span></span>
748
+
749
+ <span class='comment'># The actual spacing
750
+ </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'>\\fi-360\\li</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_indent'>indent</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\lin</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_indent'>indent</span><span class='embexpr_end'>}</span><span class='tstring_content'>}\n</span><span class='tstring_end'>&quot;</span></span>
751
+ <span class='kw'>end</span></pre>
752
+ </td>
753
+ </tr>
754
+ </table>
755
+ </div>
756
+
757
+ <div class="method_details ">
758
+ <h3 class="signature " id="type-instance_method">
759
+
760
+ #<strong>type</strong> &#x21d2; <tt>Object</tt>
761
+
762
+
763
+
764
+
765
+
766
+ </h3><table class="source_code">
767
+ <tr>
768
+ <td>
769
+ <pre class="lines">
770
+
771
+
772
+ 154
773
+ 155
774
+ 156</pre>
775
+ </td>
776
+ <td>
777
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 154</span>
778
+
779
+ <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
780
+ <span class='ivar'>@marker</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
781
+ <span class='kw'>end</span></pre>
782
+ </td>
783
+ </tr>
784
+ </table>
785
+ </div>
786
+
787
+ </div>
788
+
789
+ </div>
790
+
791
+ <div id="footer">
792
+ Generated on Mon Jul 24 15:48:59 2017 by
793
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
794
+ 0.9.9 (ruby-2.3.3).
795
+ </div>
796
+
797
+ </div>
798
+ </body>
799
+ </html>