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,433 @@
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::ListTemplate
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::ListTemplate";
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">ListTemplate</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::ListTemplate
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::ListTemplate</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="Markers-constant" class="">Markers =
107
+
108
+ </dt>
109
+ <dd><pre class="code"><span class='lbrace'>{</span>
110
+ <span class='symbol'>:disc</span> <span class='op'>=&gt;</span> <span class='const'><span class='object_link'><a href="ListMarker.html" title="RRTF::ListMarker (class)">ListMarker</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ListMarker.html#initialize-instance_method" title="RRTF::ListMarker#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>disc</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='int'>0x2022</span><span class='rparen'>)</span><span class='comma'>,</span>
111
+ <span class='symbol'>:hyphen</span> <span class='op'>=&gt;</span> <span class='const'><span class='object_link'><a href="ListMarker.html" title="RRTF::ListMarker (class)">ListMarker</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ListMarker.html#initialize-instance_method" title="RRTF::ListMarker#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>hyphen</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='int'>0x2043</span><span class='rparen'>)</span><span class='comma'>,</span>
112
+ <span class='symbol'>:decimal</span> <span class='op'>=&gt;</span> <span class='const'><span class='object_link'><a href="ListMarker.html" title="RRTF::ListMarker (class)">ListMarker</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ListMarker.html#initialize-instance_method" title="RRTF::ListMarker#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>decimal</span><span class='tstring_end'>&#39;</span></span> <span class='rparen'>)</span>
113
+ <span class='rbrace'>}</span></pre></dd>
114
+
115
+ </dl>
116
+
117
+
118
+
119
+
120
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
121
+ <ul class="summary">
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; Object </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+ <span class="note title readonly">readonly</span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Returns the value of attribute id.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ </ul>
153
+
154
+
155
+
156
+
157
+
158
+ <h2>
159
+ Instance Method Summary
160
+ <small><a href="#" class="summary_toggle">collapse</a></small>
161
+ </h2>
162
+
163
+ <ul class="summary">
164
+
165
+ <li class="public ">
166
+ <span class="summary_signature">
167
+
168
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(id) &#x21d2; ListTemplate </a>
169
+
170
+
171
+
172
+ </span>
173
+
174
+
175
+ <span class="note title constructor">constructor</span>
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'>
185
+ <p>A new instance of ListTemplate.</p>
186
+ </div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#level_for-instance_method" title="#level_for (instance method)">#<strong>level_for</strong>(level, kind = :bullets) &#x21d2; Object </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ <span class="summary_desc"><div class='inline'></div></span>
209
+
210
+ </li>
211
+
212
+
213
+ <li class="public ">
214
+ <span class="summary_signature">
215
+
216
+ <a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>(indent = 0) &#x21d2; Object </a>
217
+
218
+
219
+
220
+ </span>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <span class="summary_desc"><div class='inline'></div></span>
231
+
232
+ </li>
233
+
234
+
235
+ </ul>
236
+
237
+
238
+ <div id="constructor_details" class="method_details_list">
239
+ <h2>Constructor Details</h2>
240
+
241
+ <div class="method_details first">
242
+ <h3 class="signature first" id="initialize-instance_method">
243
+
244
+ #<strong>initialize</strong>(id) &#x21d2; <tt><span class='object_link'><a href="" title="RRTF::ListTemplate (class)">ListTemplate</a></span></tt>
245
+
246
+
247
+
248
+
249
+
250
+ </h3><div class="docstring">
251
+ <div class="discussion">
252
+
253
+ <p>Returns a new instance of ListTemplate</p>
254
+
255
+
256
+ </div>
257
+ </div>
258
+ <div class="tags">
259
+
260
+
261
+ </div><table class="source_code">
262
+ <tr>
263
+ <td>
264
+ <pre class="lines">
265
+
266
+
267
+ 102
268
+ 103
269
+ 104
270
+ 105</pre>
271
+ </td>
272
+ <td>
273
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 102</span>
274
+
275
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
276
+ <span class='ivar'>@levels</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
277
+ <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_id'>id</span>
278
+ <span class='kw'>end</span></pre>
279
+ </td>
280
+ </tr>
281
+ </table>
282
+ </div>
283
+
284
+ </div>
285
+
286
+ <div id="instance_attr_details" class="attr_details">
287
+ <h2>Instance Attribute Details</h2>
288
+
289
+
290
+ <span id=""></span>
291
+ <div class="method_details first">
292
+ <h3 class="signature first" id="id-instance_method">
293
+
294
+ #<strong>id</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
295
+
296
+
297
+
298
+
299
+
300
+ </h3><div class="docstring">
301
+ <div class="discussion">
302
+
303
+ <p>Returns the value of attribute id</p>
304
+
305
+
306
+ </div>
307
+ </div>
308
+ <div class="tags">
309
+
310
+
311
+ </div><table class="source_code">
312
+ <tr>
313
+ <td>
314
+ <pre class="lines">
315
+
316
+
317
+ 94
318
+ 95
319
+ 96</pre>
320
+ </td>
321
+ <td>
322
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 94</span>
323
+
324
+ <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
325
+ <span class='ivar'>@id</span>
326
+ <span class='kw'>end</span></pre>
327
+ </td>
328
+ </tr>
329
+ </table>
330
+ </div>
331
+
332
+ </div>
333
+
334
+
335
+ <div id="instance_method_details" class="method_details_list">
336
+ <h2>Instance Method Details</h2>
337
+
338
+
339
+ <div class="method_details first">
340
+ <h3 class="signature first" id="level_for-instance_method">
341
+
342
+ #<strong>level_for</strong>(level, kind = :bullets) &#x21d2; <tt>Object</tt>
343
+
344
+
345
+
346
+
347
+
348
+ </h3><table class="source_code">
349
+ <tr>
350
+ <td>
351
+ <pre class="lines">
352
+
353
+
354
+ 107
355
+ 108
356
+ 109
357
+ 110
358
+ 111
359
+ 112
360
+ 113
361
+ 114</pre>
362
+ </td>
363
+ <td>
364
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 107</span>
365
+
366
+ <span class='kw'>def</span> <span class='id identifier rubyid_level_for'>level_for</span><span class='lparen'>(</span><span class='id identifier rubyid_level'>level</span><span class='comma'>,</span> <span class='id identifier rubyid_kind'>kind</span> <span class='op'>=</span> <span class='symbol'>:bullets</span><span class='rparen'>)</span>
367
+ <span class='ivar'>@levels</span><span class='lbracket'>[</span><span class='id identifier rubyid_level'>level</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='kw'>begin</span>
368
+ <span class='comment'># Only disc for now: we&#39;ll add support
369
+ </span> <span class='comment'># for more customization options later
370
+ </span> <span class='id identifier rubyid_marker'>marker</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#Markers-constant" title="RRTF::ListTemplate::Markers (constant)">Markers</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_kind'>kind</span> <span class='op'>==</span> <span class='symbol'>:bullets</span> <span class='op'>?</span> <span class='symbol'>:disc</span> <span class='op'>:</span> <span class='symbol'>:decimal</span><span class='rbracket'>]</span>
371
+ <span class='const'><span class='object_link'><a href="ListLevel.html" title="RRTF::ListLevel (class)">ListLevel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ListLevel.html#initialize-instance_method" title="RRTF::ListLevel#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</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>
372
+ <span class='kw'>end</span>
373
+ <span class='kw'>end</span></pre>
374
+ </td>
375
+ </tr>
376
+ </table>
377
+ </div>
378
+
379
+ <div class="method_details ">
380
+ <h3 class="signature " id="to_rtf-instance_method">
381
+
382
+ #<strong>to_rtf</strong>(indent = 0) &#x21d2; <tt>Object</tt>
383
+
384
+
385
+
386
+
387
+
388
+ </h3><table class="source_code">
389
+ <tr>
390
+ <td>
391
+ <pre class="lines">
392
+
393
+
394
+ 116
395
+ 117
396
+ 118
397
+ 119
398
+ 120
399
+ 121
400
+ 122
401
+ 123
402
+ 124</pre>
403
+ </td>
404
+ <td>
405
+ <pre class="code"><span class="info file"># File 'lib/rrtf/list.rb', line 116</span>
406
+
407
+ <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>
408
+ <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>
409
+
410
+ <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'>{\\list\\listtemplate</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\listhybrid</span><span class='tstring_end'>&quot;</span></span>
411
+ <span class='ivar'>@levels</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_lvl'>lvl</span><span class='op'>|</span> <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_lvl'>lvl</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'>to_rtf</span><span class='rbrace'>}</span>
412
+ <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'>{\\listname;}\\listid</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>}\n</span><span class='tstring_end'>&quot;</span></span>
413
+
414
+ <span class='id identifier rubyid_text'>text</span>
415
+ <span class='kw'>end</span></pre>
416
+ </td>
417
+ </tr>
418
+ </table>
419
+ </div>
420
+
421
+ </div>
422
+
423
+ </div>
424
+
425
+ <div id="footer">
426
+ Generated on Mon Jul 24 15:48:59 2017 by
427
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
428
+ 0.9.9 (ruby-2.3.3).
429
+ </div>
430
+
431
+ </div>
432
+ </body>
433
+ </html>