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.
- checksums.yaml +4 -4
- data/README.md +31 -7
- data/documentation/RRTF/CharacterFormatting.html +1002 -0
- data/documentation/RRTF/CharacterStyle.html +1058 -0
- data/documentation/RRTF/Colour.html +813 -0
- data/documentation/RRTF/ColourTable.html +770 -0
- data/documentation/RRTF/CommandNode.html +2372 -0
- data/documentation/RRTF/ContainerNode.html +826 -0
- data/documentation/RRTF/Converters/HTML/Helpers.html +272 -0
- data/documentation/RRTF/Converters/HTML/Node.html +364 -0
- data/documentation/RRTF/Converters/HTML/NodeSet.html +265 -0
- data/documentation/RRTF/Converters/HTML.html +337 -0
- data/documentation/RRTF/Converters.html +117 -0
- data/documentation/RRTF/Document.html +2405 -0
- data/documentation/RRTF/DocumentStyle.html +1367 -0
- data/documentation/RRTF/Font.html +790 -0
- data/documentation/RRTF/FontTable.html +763 -0
- data/documentation/RRTF/FooterNode.html +515 -0
- data/documentation/RRTF/HeaderNode.html +515 -0
- data/documentation/RRTF/ImageNode.html +1374 -0
- data/documentation/RRTF/Information.html +809 -0
- data/documentation/RRTF/LinkNode.html +264 -0
- data/documentation/RRTF/ListLevel.html +799 -0
- data/documentation/RRTF/ListLevelNode.html +612 -0
- data/documentation/RRTF/ListMarker.html +595 -0
- data/documentation/RRTF/ListNode.html +368 -0
- data/documentation/RRTF/ListTable.html +343 -0
- data/documentation/RRTF/ListTemplate.html +433 -0
- data/documentation/RRTF/ListTextNode.html +285 -0
- data/documentation/RRTF/Node.html +616 -0
- data/documentation/RRTF/Paper.html +624 -0
- data/documentation/RRTF/ParagraphFormatting.html +749 -0
- data/documentation/RRTF/ParagraphNode.html +275 -0
- data/documentation/RRTF/ParagraphStyle.html +1319 -0
- data/documentation/RRTF/RTFError.html +295 -0
- data/documentation/RRTF/Style.html +1767 -0
- data/documentation/RRTF/Stylesheet.html +1768 -0
- data/documentation/RRTF/TableCellNode.html +1704 -0
- data/documentation/RRTF/TableNode.html +1025 -0
- data/documentation/RRTF/TableRowNode.html +675 -0
- data/documentation/RRTF/TextNode.html +600 -0
- data/documentation/RRTF/Utilities.html +201 -0
- data/documentation/RRTF.html +129 -0
- data/documentation/_index.html +478 -0
- data/documentation/class_list.html +51 -0
- data/documentation/css/common.css +1 -0
- data/documentation/css/full_list.css +58 -0
- data/documentation/css/style.css +492 -0
- data/documentation/file.README.html +223 -0
- data/documentation/file_list.html +56 -0
- data/documentation/frames.html +17 -0
- data/documentation/index.html +223 -0
- data/documentation/js/app.js +248 -0
- data/documentation/js/full_list.js +216 -0
- data/documentation/js/jquery.js +4 -0
- data/documentation/method_list.html +2203 -0
- data/documentation/top-level-namespace.html +110 -0
- data/examples/01.rtf +14 -17
- data/examples/01_mac_word15_36.png +0 -0
- data/examples/01_styles_and_paragraphs.rb +3 -4
- data/examples/resources/json/redshirt_styles.json +4 -2
- data/lib/rrtf/node.rb +86 -167
- data/lib/rrtf/style/character_style.rb +4 -3
- data/lib/rrtf/style/formatting.rb +55 -11
- data/lib/rrtf/style/paragraph_style.rb +19 -4
- data/lib/rrtf/style/style.rb +15 -15
- data/lib/rrtf/stylesheet.rb +57 -16
- data/lib/rrtf/version.rb +1 -1
- data/rrtf.gemspec +1 -0
- metadata +70 -1
@@ -0,0 +1,272 @@
|
|
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
|
+
Module: RRTF::Converters::HTML::Helpers
|
8
|
+
|
9
|
+
— 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::Converters::HTML::Helpers";
|
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 (H)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../RRTF.html" title="RRTF (module)">RRTF</a></span></span> » <span class='title'><span class='object_link'><a href="../../Converters.html" title="RRTF::Converters (module)">Converters</a></span></span> » <span class='title'><span class='object_link'><a href="../HTML.html" title="RRTF::Converters::HTML (class)">HTML</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Helpers</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>Module: RRTF::Converters::HTML::Helpers
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
<dl>
|
73
|
+
<dt>Extended by:</dt>
|
74
|
+
<dd><span class='object_link'><a href="" title="RRTF::Converters::HTML::Helpers (module)">Helpers</a></span></dd>
|
75
|
+
</dl>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
<dl>
|
83
|
+
<dt>Included in:</dt>
|
84
|
+
<dd><span class='object_link'><a href="" title="RRTF::Converters::HTML::Helpers (module)">Helpers</a></span></dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<dl>
|
90
|
+
<dt>Defined in:</dt>
|
91
|
+
<dd>lib/rrtf/converters/html.rb</dd>
|
92
|
+
</dl>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<h2>
|
105
|
+
Instance Method Summary
|
106
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
107
|
+
</h2>
|
108
|
+
|
109
|
+
<ul class="summary">
|
110
|
+
|
111
|
+
<li class="public ">
|
112
|
+
<span class="summary_signature">
|
113
|
+
|
114
|
+
<a href="#font-instance_method" title="#font (instance method)">#<strong>font</strong>(key) ⇒ Object </a>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
</span>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
129
|
+
|
130
|
+
</li>
|
131
|
+
|
132
|
+
|
133
|
+
<li class="public ">
|
134
|
+
<span class="summary_signature">
|
135
|
+
|
136
|
+
<a href="#style-instance_method" title="#style (instance method)">#<strong>style</strong>(key) ⇒ Object </a>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
</span>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
151
|
+
|
152
|
+
</li>
|
153
|
+
|
154
|
+
|
155
|
+
</ul>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<div id="instance_method_details" class="method_details_list">
|
161
|
+
<h2>Instance Method Details</h2>
|
162
|
+
|
163
|
+
|
164
|
+
<div class="method_details first">
|
165
|
+
<h3 class="signature first" id="font-instance_method">
|
166
|
+
|
167
|
+
#<strong>font</strong>(key) ⇒ <tt>Object</tt>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
</h3><table class="source_code">
|
174
|
+
<tr>
|
175
|
+
<td>
|
176
|
+
<pre class="lines">
|
177
|
+
|
178
|
+
|
179
|
+
49
|
180
|
+
50
|
181
|
+
51
|
182
|
+
52
|
183
|
+
53
|
184
|
+
54</pre>
|
185
|
+
</td>
|
186
|
+
<td>
|
187
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/converters/html.rb', line 49</span>
|
188
|
+
|
189
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_font'>font</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
190
|
+
<span class='const'><span class='object_link'><a href="../../../RRTF.html" title="RRTF (module)">RRTF</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Font.html" title="RRTF::Font (class)">Font</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../Font.html#initialize-instance_method" title="RRTF::Font#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='op'>*</span><span class='kw'>case</span> <span class='id identifier rubyid_key'>key</span>
|
191
|
+
<span class='kw'>when</span> <span class='symbol'>:default</span> <span class='kw'>then</span> <span class='lbracket'>[</span><span class='const'>RTF</span><span class='op'>::</span><span class='const'>Font</span><span class='op'>::</span><span class='const'>ROMAN</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Times New Roman</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
192
|
+
<span class='kw'>when</span> <span class='symbol'>:monospace</span> <span class='kw'>then</span> <span class='lbracket'>[</span><span class='const'>RTF</span><span class='op'>::</span><span class='const'>Font</span><span class='op'>::</span><span class='const'>MODERN</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Courier New</span><span class='tstring_end'>'</span></span> <span class='rbracket'>]</span>
|
193
|
+
<span class='kw'>end</span><span class='rparen'>)</span>
|
194
|
+
<span class='kw'>end</span></pre>
|
195
|
+
</td>
|
196
|
+
</tr>
|
197
|
+
</table>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<div class="method_details ">
|
201
|
+
<h3 class="signature " id="style-instance_method">
|
202
|
+
|
203
|
+
#<strong>style</strong>(key) ⇒ <tt>Object</tt>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
</h3><table class="source_code">
|
210
|
+
<tr>
|
211
|
+
<td>
|
212
|
+
<pre class="lines">
|
213
|
+
|
214
|
+
|
215
|
+
56
|
216
|
+
57
|
217
|
+
58
|
218
|
+
59
|
219
|
+
60
|
220
|
+
61
|
221
|
+
62
|
222
|
+
63
|
223
|
+
64
|
224
|
+
65
|
225
|
+
66
|
226
|
+
67
|
227
|
+
68
|
228
|
+
69
|
229
|
+
70
|
230
|
+
71
|
231
|
+
72
|
232
|
+
73</pre>
|
233
|
+
</td>
|
234
|
+
<td>
|
235
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/converters/html.rb', line 56</span>
|
236
|
+
|
237
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_style'>style</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
238
|
+
<span class='const'><span class='object_link'><a href="../../../RRTF.html" title="RRTF (module)">RRTF</a></span></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><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_style'>style</span><span class='op'>|</span>
|
239
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
240
|
+
<span class='kw'>when</span> <span class='symbol'>:h1</span>
|
241
|
+
<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='int'>44</span>
|
242
|
+
<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>
|
243
|
+
<span class='kw'>when</span> <span class='symbol'>:h2</span>
|
244
|
+
<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='int'>36</span>
|
245
|
+
<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>
|
246
|
+
<span class='kw'>when</span> <span class='symbol'>:h3</span>
|
247
|
+
<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='int'>28</span>
|
248
|
+
<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>
|
249
|
+
<span class='kw'>when</span> <span class='symbol'>:h4</span>
|
250
|
+
<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='int'>22</span>
|
251
|
+
<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>
|
252
|
+
<span class='kw'>end</span>
|
253
|
+
<span class='kw'>end</span>
|
254
|
+
<span class='kw'>end</span></pre>
|
255
|
+
</td>
|
256
|
+
</tr>
|
257
|
+
</table>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
</div>
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
<div id="footer">
|
265
|
+
Generated on Mon Jul 24 15:48:59 2017 by
|
266
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
267
|
+
0.9.9 (ruby-2.3.3).
|
268
|
+
</div>
|
269
|
+
|
270
|
+
</div>
|
271
|
+
</body>
|
272
|
+
</html>
|
@@ -0,0 +1,364 @@
|
|
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::Converters::HTML::Node
|
8
|
+
|
9
|
+
— 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::Converters::HTML::Node";
|
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 (N)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../RRTF.html" title="RRTF (module)">RRTF</a></span></span> » <span class='title'><span class='object_link'><a href="../../Converters.html" title="RRTF::Converters (module)">Converters</a></span></span> » <span class='title'><span class='object_link'><a href="../HTML.html" title="RRTF::Converters::HTML (class)">HTML</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Node</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::Converters::HTML::Node
|
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::Converters::HTML::Node</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/converters/html.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>:nodoc:</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(node) ⇒ Node </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
<span class="note title constructor">constructor</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'>
|
148
|
+
<p>A new instance of Node.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#recurse-instance_method" title="#recurse (instance method)">#<strong>recurse</strong> ⇒ Object </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>(rtf) ⇒ Object </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
194
|
+
|
195
|
+
</li>
|
196
|
+
|
197
|
+
|
198
|
+
</ul>
|
199
|
+
|
200
|
+
|
201
|
+
<div id="constructor_details" class="method_details_list">
|
202
|
+
<h2>Constructor Details</h2>
|
203
|
+
|
204
|
+
<div class="method_details first">
|
205
|
+
<h3 class="signature first" id="initialize-instance_method">
|
206
|
+
|
207
|
+
#<strong>initialize</strong>(node) ⇒ <tt><span class='object_link'><a href="" title="RRTF::Converters::HTML::Node (class)">Node</a></span></tt>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
</h3><div class="docstring">
|
214
|
+
<div class="discussion">
|
215
|
+
|
216
|
+
<p>Returns a new instance of Node</p>
|
217
|
+
|
218
|
+
|
219
|
+
</div>
|
220
|
+
</div>
|
221
|
+
<div class="tags">
|
222
|
+
|
223
|
+
|
224
|
+
</div><table class="source_code">
|
225
|
+
<tr>
|
226
|
+
<td>
|
227
|
+
<pre class="lines">
|
228
|
+
|
229
|
+
|
230
|
+
89
|
231
|
+
90
|
232
|
+
91</pre>
|
233
|
+
</td>
|
234
|
+
<td>
|
235
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/converters/html.rb', line 89</span>
|
236
|
+
|
237
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
238
|
+
<span class='ivar'>@node</span> <span class='op'>=</span> <span class='id identifier rubyid_node'>node</span>
|
239
|
+
<span class='kw'>end</span></pre>
|
240
|
+
</td>
|
241
|
+
</tr>
|
242
|
+
</table>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
|
248
|
+
<div id="instance_method_details" class="method_details_list">
|
249
|
+
<h2>Instance Method Details</h2>
|
250
|
+
|
251
|
+
|
252
|
+
<div class="method_details first">
|
253
|
+
<h3 class="signature first" id="recurse-instance_method">
|
254
|
+
|
255
|
+
#<strong>recurse</strong> ⇒ <tt>Object</tt>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
</h3><table class="source_code">
|
262
|
+
<tr>
|
263
|
+
<td>
|
264
|
+
<pre class="lines">
|
265
|
+
|
266
|
+
|
267
|
+
117
|
268
|
+
118
|
269
|
+
119</pre>
|
270
|
+
</td>
|
271
|
+
<td>
|
272
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/converters/html.rb', line 117</span>
|
273
|
+
|
274
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_recurse'>recurse</span>
|
275
|
+
<span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_rtf'>rtf</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="NodeSet.html" title="RRTF::Converters::HTML::NodeSet (class)">NodeSet</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="NodeSet.html#initialize-instance_method" title="RRTF::Converters::HTML::NodeSet#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@node</span><span class='period'>.</span><span class='id identifier rubyid_children'>children</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'><span class='object_link'><a href="NodeSet.html#to_rtf-instance_method" title="RRTF::Converters::HTML::NodeSet#to_rtf (method)">to_rtf</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_rtf'>rtf</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
276
|
+
<span class='kw'>end</span></pre>
|
277
|
+
</td>
|
278
|
+
</tr>
|
279
|
+
</table>
|
280
|
+
</div>
|
281
|
+
|
282
|
+
<div class="method_details ">
|
283
|
+
<h3 class="signature " id="to_rtf-instance_method">
|
284
|
+
|
285
|
+
#<strong>to_rtf</strong>(rtf) ⇒ <tt>Object</tt>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
</h3><table class="source_code">
|
292
|
+
<tr>
|
293
|
+
<td>
|
294
|
+
<pre class="lines">
|
295
|
+
|
296
|
+
|
297
|
+
93
|
298
|
+
94
|
299
|
+
95
|
300
|
+
96
|
301
|
+
97
|
302
|
+
98
|
303
|
+
99
|
304
|
+
100
|
305
|
+
101
|
306
|
+
102
|
307
|
+
103
|
308
|
+
104
|
309
|
+
105
|
310
|
+
106
|
311
|
+
107
|
312
|
+
108
|
313
|
+
109
|
314
|
+
110
|
315
|
+
111
|
316
|
+
112
|
317
|
+
113
|
318
|
+
114
|
319
|
+
115</pre>
|
320
|
+
</td>
|
321
|
+
<td>
|
322
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/converters/html.rb', line 93</span>
|
323
|
+
|
324
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span><span class='lparen'>(</span><span class='id identifier rubyid_rtf'>rtf</span><span class='rparen'>)</span>
|
325
|
+
<span class='kw'>case</span> <span class='ivar'>@node</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
326
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='ivar'>@node</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\n+</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
|
327
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>br</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_line_break'>line_break</span>
|
328
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>b</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>strong</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_bold'>bold</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
329
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>i</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>em</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cite</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_italic'>italic</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
330
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>u</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_underline'>underline</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
331
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>blockquote</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>p</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>div</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_paragraph'>paragraph</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
332
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>span</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_recurse'>recurse</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_rtf'>rtf</span><span class='rparen'>)</span>
|
333
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sup</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_subscript'>subscript</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
334
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sub</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_superscript'>superscript</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
335
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ul</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span> <span class='symbol'>:bullets</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
336
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ol</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span> <span class='symbol'>:decimal</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
337
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>li</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_item'>item</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
338
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>a</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_link'>link</span> <span class='ivar'>@node</span><span class='lbracket'>[</span><span class='symbol'>:href</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
339
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>h1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>h2</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>h3</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>h4</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_apply'>apply</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Helpers.html" title="RRTF::Converters::HTML::Helpers (module)">Helpers</a></span></span><span class='period'>.</span><span class='id identifier rubyid_style'><span class='object_link'><a href="Helpers.html#style-instance_method" title="RRTF::Converters::HTML::Helpers#style (method)">style</a></span></span><span class='lparen'>(</span><span class='ivar'>@node</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_line_break'>line_break</span>
|
340
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>code</span><span class='tstring_end'>'</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_font'>font</span> <span class='const'><span class='object_link'><a href="Helpers.html" title="RRTF::Converters::HTML::Helpers (module)">Helpers</a></span></span><span class='period'>.</span><span class='id identifier rubyid_font'><span class='object_link'><a href="Helpers.html#font-instance_method" title="RRTF::Converters::HTML::Helpers#font (method)">font</a></span></span><span class='lparen'>(</span><span class='symbol'>:monospace</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_recurse'>recurse</span>
|
341
|
+
<span class='kw'>else</span>
|
342
|
+
<span class='comment'>#puts "Ignoring #{@node.to_html}"
|
343
|
+
</span> <span class='kw'>end</span>
|
344
|
+
|
345
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_rtf'>rtf</span>
|
346
|
+
<span class='kw'>end</span></pre>
|
347
|
+
</td>
|
348
|
+
</tr>
|
349
|
+
</table>
|
350
|
+
</div>
|
351
|
+
|
352
|
+
</div>
|
353
|
+
|
354
|
+
</div>
|
355
|
+
|
356
|
+
<div id="footer">
|
357
|
+
Generated on Mon Jul 24 15:49:02 2017 by
|
358
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
359
|
+
0.9.9 (ruby-2.3.3).
|
360
|
+
</div>
|
361
|
+
|
362
|
+
</div>
|
363
|
+
</body>
|
364
|
+
</html>
|