rpub 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -1
- data/.rspec +0 -1
- data/.travis.yml +3 -4
- data/.yardopts +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +70 -46
- data/Guardfile +6 -0
- data/HISTORY.md +10 -0
- data/README.md +1 -1
- data/Rakefile +7 -2
- data/bin/rpub +64 -1
- data/doc/.gitignore +8 -0
- data/doc/api/Rpub.html +339 -0
- data/doc/api/Rpub/Book.html +983 -0
- data/doc/api/Rpub/Chapter.html +737 -0
- data/doc/api/Rpub/Command.html +356 -0
- data/doc/api/Rpub/Commands.html +117 -0
- data/doc/api/Rpub/Commands/Clean.html +216 -0
- data/doc/api/Rpub/Commands/Compile.html +218 -0
- data/doc/api/Rpub/Commands/Generate.html +242 -0
- data/doc/api/Rpub/Commands/Package.html +230 -0
- data/doc/api/Rpub/Commands/Preview.html +216 -0
- data/doc/api/Rpub/Commands/Stats.html +226 -0
- data/doc/api/Rpub/Compressor.html +687 -0
- data/doc/api/Rpub/Context.html +553 -0
- data/doc/api/Rpub/Document.html +647 -0
- data/doc/api/Rpub/Document/OutlineElement.html +388 -0
- data/doc/api/Rpub/Epub.html +465 -0
- data/doc/api/Rpub/Epub/Container.html +224 -0
- data/doc/api/Rpub/Epub/Content.html +344 -0
- data/doc/api/Rpub/Epub/Cover.html +236 -0
- data/doc/api/Rpub/Epub/HtmlToc.html +240 -0
- data/doc/api/Rpub/Epub/Toc.html +244 -0
- data/doc/api/Rpub/FilesystemSource.html +544 -0
- data/doc/api/Rpub/HashDelegation.html +281 -0
- data/doc/api/Rpub/HashDelegation/ClassMethods.html +175 -0
- data/doc/api/Rpub/MediaType.html +192 -0
- data/doc/api/Rpub/Preview.html +464 -0
- data/doc/api/Rpub/XmlFile.html +457 -0
- data/doc/api/_index.html +405 -0
- data/doc/api/class_list.html +54 -0
- data/doc/api/css/common.css +1 -0
- data/doc/api/css/full_list.css +57 -0
- data/doc/api/css/style.css +339 -0
- data/doc/api/file.HISTORY.html +131 -0
- data/doc/api/file.LICENSE.html +92 -0
- data/doc/api/file.README.html +337 -0
- data/doc/api/file_list.html +62 -0
- data/doc/api/frames.html +26 -0
- data/doc/api/index.html +337 -0
- data/doc/api/js/app.js +219 -0
- data/doc/api/js/full_list.js +178 -0
- data/doc/api/js/jquery.js +4 -0
- data/doc/api/method_list.html +533 -0
- data/doc/api/top-level-namespace.html +112 -0
- data/doc/index.html +312 -0
- data/doc/javascripts/scale.fix.js +17 -0
- data/doc/params.json +1 -0
- data/doc/stylesheets/pygment_trac.css +69 -0
- data/doc/stylesheets/styles.css +255 -0
- data/features/clean.feature +31 -0
- data/features/compile.feature +49 -0
- data/features/embedded_assets.feature +51 -0
- data/features/generate.feature +63 -0
- data/features/layout.feature +41 -0
- data/features/package.feature +30 -0
- data/features/previews.feature +66 -0
- data/features/stats.feature +18 -0
- data/features/step_definitions/general_steps.rb +60 -0
- data/features/styles.feature +33 -0
- data/features/support/env.rb +7 -0
- data/features/table_of_contents.feature +35 -0
- data/lib/rpub.rb +28 -31
- data/lib/rpub/book.rb +9 -16
- data/lib/rpub/chapter.rb +4 -54
- data/lib/rpub/command.rb +32 -0
- data/lib/rpub/commands/clean.rb +4 -49
- data/lib/rpub/commands/compile.rb +4 -49
- data/lib/rpub/commands/generate.rb +10 -67
- data/lib/rpub/commands/package.rb +9 -37
- data/lib/rpub/commands/preview.rb +4 -54
- data/lib/rpub/commands/stats.rb +6 -10
- data/lib/rpub/compressor.rb +3 -3
- data/lib/rpub/context.rb +48 -0
- data/lib/rpub/document.rb +68 -0
- data/lib/rpub/epub.rb +8 -7
- data/lib/rpub/epub/content.rb +9 -30
- data/lib/rpub/epub/cover.rb +1 -8
- data/lib/rpub/epub/html_toc.rb +4 -9
- data/lib/rpub/epub/toc.rb +16 -13
- data/lib/rpub/filesystem_source.rb +47 -0
- data/lib/rpub/media_type.rb +16 -0
- data/lib/rpub/preview.rb +29 -0
- data/lib/rpub/version.rb +1 -1
- data/lib/rpub/xml_file.rb +4 -1
- data/rpub.gemspec +6 -7
- data/spec/rpub/book_spec.rb +45 -45
- data/spec/rpub/chapter_spec.rb +87 -22
- data/spec/rpub/epub/container_spec.rb +3 -5
- data/spec/rpub/epub/content_spec.rb +62 -41
- data/spec/rpub/epub/cover_spec.rb +3 -5
- data/spec/rpub/epub/html_toc_spec.rb +8 -8
- data/spec/rpub/epub/toc_spec.rb +20 -22
- data/spec/rpub_spec.rb +1 -3
- data/spec/spec_helper.rb +28 -0
- data/support/config.yml +1 -0
- data/support/styles.css +3 -3
- metadata +131 -120
- data/lib/rpub/commander.rb +0 -23
- data/lib/rpub/commands/base.rb +0 -33
- data/lib/rpub/commands/help.rb +0 -37
- data/lib/rpub/commands/main.rb +0 -45
- data/lib/rpub/compilation_helpers.rb +0 -73
- data/lib/rpub/subclass_tracker.rb +0 -53
- data/spec/rpub/commands/clean_spec.rb +0 -46
- data/spec/rpub/commands/generate_spec.rb +0 -52
- data/spec/rpub/commands/main_spec.rb +0 -26
- data/spec/rpub/commands/package_spec.rb +0 -33
- data/spec/rpub/commands/preview_spec.rb +0 -43
@@ -0,0 +1,388 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Rpub::Document::OutlineElement
|
8
|
+
|
9
|
+
— Rpub, a simple ePub generator library in Ruby
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!Rpub/Document/OutlineElement.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (O)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Rpub.html" title="Rpub (module)">Rpub</a></span></span> » <span class='title'><span class='object_link'><a href="../Document.html" title="Rpub::Document (class)">Document</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">OutlineElement</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Rpub::Document::OutlineElement
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Struct</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Struct</li>
|
82
|
+
|
83
|
+
<li class="next">Rpub::Document::OutlineElement</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/rpub/document.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
109
|
+
<ul class="summary">
|
110
|
+
|
111
|
+
<li class="public ">
|
112
|
+
<span class="summary_signature">
|
113
|
+
|
114
|
+
<a href="#html_id-instance_method" title="#html_id (instance method)">- (Object) <strong>html_id</strong> </a>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
</span>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute html_id.</p>
|
132
|
+
</div></span>
|
133
|
+
|
134
|
+
</li>
|
135
|
+
|
136
|
+
|
137
|
+
<li class="public ">
|
138
|
+
<span class="summary_signature">
|
139
|
+
|
140
|
+
<a href="#level-instance_method" title="#level (instance method)">- (Object) <strong>level</strong> </a>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
</span>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute level.</p>
|
158
|
+
</div></span>
|
159
|
+
|
160
|
+
</li>
|
161
|
+
|
162
|
+
|
163
|
+
<li class="public ">
|
164
|
+
<span class="summary_signature">
|
165
|
+
|
166
|
+
<a href="#text-instance_method" title="#text (instance method)">- (Object) <strong>text</strong> </a>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
</span>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute text.</p>
|
184
|
+
</div></span>
|
185
|
+
|
186
|
+
</li>
|
187
|
+
|
188
|
+
|
189
|
+
</ul>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<div id="instance_attr_details" class="attr_details">
|
197
|
+
<h2>Instance Attribute Details</h2>
|
198
|
+
|
199
|
+
|
200
|
+
<span id="html_id=-instance_method"></span>
|
201
|
+
<div class="method_details first">
|
202
|
+
<h3 class="signature first" id="html_id-instance_method">
|
203
|
+
|
204
|
+
- (<tt>Object</tt>) <strong>html_id</strong>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
</h3><div class="docstring">
|
211
|
+
<div class="discussion">
|
212
|
+
<p>Returns the value of attribute html_id</p>
|
213
|
+
|
214
|
+
|
215
|
+
</div>
|
216
|
+
</div>
|
217
|
+
<div class="tags">
|
218
|
+
|
219
|
+
<p class="tag_title">Returns:</p>
|
220
|
+
<ul class="return">
|
221
|
+
|
222
|
+
<li>
|
223
|
+
|
224
|
+
|
225
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
—
|
230
|
+
<div class='inline'><p>the current value of html_id</p>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
</ul>
|
236
|
+
|
237
|
+
</div><table class="source_code">
|
238
|
+
<tr>
|
239
|
+
<td>
|
240
|
+
<pre class="lines">
|
241
|
+
|
242
|
+
|
243
|
+
7
|
244
|
+
8
|
245
|
+
9</pre>
|
246
|
+
</td>
|
247
|
+
<td>
|
248
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/document.rb', line 7</span>
|
249
|
+
|
250
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_html_id'>html_id</span>
|
251
|
+
<span class='ivar'>@html_id</span>
|
252
|
+
<span class='kw'>end</span></pre>
|
253
|
+
</td>
|
254
|
+
</tr>
|
255
|
+
</table>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
|
259
|
+
<span id="level=-instance_method"></span>
|
260
|
+
<div class="method_details ">
|
261
|
+
<h3 class="signature " id="level-instance_method">
|
262
|
+
|
263
|
+
- (<tt>Object</tt>) <strong>level</strong>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
</h3><div class="docstring">
|
270
|
+
<div class="discussion">
|
271
|
+
<p>Returns the value of attribute level</p>
|
272
|
+
|
273
|
+
|
274
|
+
</div>
|
275
|
+
</div>
|
276
|
+
<div class="tags">
|
277
|
+
|
278
|
+
<p class="tag_title">Returns:</p>
|
279
|
+
<ul class="return">
|
280
|
+
|
281
|
+
<li>
|
282
|
+
|
283
|
+
|
284
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
—
|
289
|
+
<div class='inline'><p>the current value of level</p>
|
290
|
+
</div>
|
291
|
+
|
292
|
+
</li>
|
293
|
+
|
294
|
+
</ul>
|
295
|
+
|
296
|
+
</div><table class="source_code">
|
297
|
+
<tr>
|
298
|
+
<td>
|
299
|
+
<pre class="lines">
|
300
|
+
|
301
|
+
|
302
|
+
7
|
303
|
+
8
|
304
|
+
9</pre>
|
305
|
+
</td>
|
306
|
+
<td>
|
307
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/document.rb', line 7</span>
|
308
|
+
|
309
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_level'>level</span>
|
310
|
+
<span class='ivar'>@level</span>
|
311
|
+
<span class='kw'>end</span></pre>
|
312
|
+
</td>
|
313
|
+
</tr>
|
314
|
+
</table>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
|
318
|
+
<span id="text=-instance_method"></span>
|
319
|
+
<div class="method_details ">
|
320
|
+
<h3 class="signature " id="text-instance_method">
|
321
|
+
|
322
|
+
- (<tt>Object</tt>) <strong>text</strong>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
</h3><div class="docstring">
|
329
|
+
<div class="discussion">
|
330
|
+
<p>Returns the value of attribute text</p>
|
331
|
+
|
332
|
+
|
333
|
+
</div>
|
334
|
+
</div>
|
335
|
+
<div class="tags">
|
336
|
+
|
337
|
+
<p class="tag_title">Returns:</p>
|
338
|
+
<ul class="return">
|
339
|
+
|
340
|
+
<li>
|
341
|
+
|
342
|
+
|
343
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
—
|
348
|
+
<div class='inline'><p>the current value of text</p>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
</li>
|
352
|
+
|
353
|
+
</ul>
|
354
|
+
|
355
|
+
</div><table class="source_code">
|
356
|
+
<tr>
|
357
|
+
<td>
|
358
|
+
<pre class="lines">
|
359
|
+
|
360
|
+
|
361
|
+
7
|
362
|
+
8
|
363
|
+
9</pre>
|
364
|
+
</td>
|
365
|
+
<td>
|
366
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/document.rb', line 7</span>
|
367
|
+
|
368
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_text'>text</span>
|
369
|
+
<span class='ivar'>@text</span>
|
370
|
+
<span class='kw'>end</span></pre>
|
371
|
+
</td>
|
372
|
+
</tr>
|
373
|
+
</table>
|
374
|
+
</div>
|
375
|
+
|
376
|
+
</div>
|
377
|
+
|
378
|
+
|
379
|
+
</div>
|
380
|
+
|
381
|
+
<div id="footer">
|
382
|
+
Generated on Thu Aug 14 19:54:32 2014 by
|
383
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
384
|
+
0.8.7.4 (ruby-2.1.2).
|
385
|
+
</div>
|
386
|
+
|
387
|
+
</body>
|
388
|
+
</html>
|
@@ -0,0 +1,465 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Rpub::Epub
|
8
|
+
|
9
|
+
— Rpub, a simple ePub generator library in Ruby
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Rpub/Epub.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (E)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Rpub.html" title="Rpub (module)">Rpub</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Epub</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Rpub::Epub
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Rpub::Epub</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/rpub/epub.rb<span class="defines">,<br />
|
98
|
+
lib/rpub/epub/toc.rb,<br /> lib/rpub/epub/cover.rb,<br /> lib/rpub/epub/content.rb,<br /> lib/rpub/epub/html_toc.rb,<br /> lib/rpub/epub/container.rb</span>
|
99
|
+
</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
<h2>Defined Under Namespace</h2>
|
105
|
+
<p class="children">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Epub/Container.html" title="Rpub::Epub::Container (class)">Container</a></span>, <span class='object_link'><a href="Epub/Content.html" title="Rpub::Epub::Content (class)">Content</a></span>, <span class='object_link'><a href="Epub/Cover.html" title="Rpub::Epub::Cover (class)">Cover</a></span>, <span class='object_link'><a href="Epub/HtmlToc.html" title="Rpub::Epub::HtmlToc (class)">HtmlToc</a></span>, <span class='object_link'><a href="Epub/Toc.html" title="Rpub::Epub::Toc (class)">Toc</a></span>
|
111
|
+
|
112
|
+
|
113
|
+
</p>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
119
|
+
<ul class="summary">
|
120
|
+
|
121
|
+
<li class="public ">
|
122
|
+
<span class="summary_signature">
|
123
|
+
|
124
|
+
<a href="#book-instance_method" title="#book (instance method)">- (Object) <strong>book</strong> </a>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span class="note title readonly">readonly</span>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute book.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#styles-instance_method" title="#styles (instance method)">- (Object) <strong>styles</strong> </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<span class="note title readonly">readonly</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute styles.</p>
|
172
|
+
</div></span>
|
173
|
+
|
174
|
+
</li>
|
175
|
+
|
176
|
+
|
177
|
+
</ul>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<h2>
|
184
|
+
Instance Method Summary
|
185
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
186
|
+
</h2>
|
187
|
+
|
188
|
+
<ul class="summary">
|
189
|
+
|
190
|
+
<li class="public ">
|
191
|
+
<span class="summary_signature">
|
192
|
+
|
193
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Epub) <strong>initialize</strong>(book, styles) </a>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
</span>
|
198
|
+
|
199
|
+
|
200
|
+
<span class="note title constructor">constructor</span>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<span class="summary_desc"><div class='inline'><p>A new instance of Epub.</p>
|
210
|
+
</div></span>
|
211
|
+
|
212
|
+
</li>
|
213
|
+
|
214
|
+
|
215
|
+
<li class="public ">
|
216
|
+
<span class="summary_signature">
|
217
|
+
|
218
|
+
<a href="#manifest_in-instance_method" title="#manifest_in (instance method)">- (Object) <strong>manifest_in</strong>(target) </a>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
</span>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<span class="summary_desc"><div class='inline'>
|
233
|
+
</div></span>
|
234
|
+
|
235
|
+
</li>
|
236
|
+
|
237
|
+
|
238
|
+
</ul>
|
239
|
+
|
240
|
+
|
241
|
+
<div id="constructor_details" class="method_details_list">
|
242
|
+
<h2>Constructor Details</h2>
|
243
|
+
|
244
|
+
<div class="method_details first">
|
245
|
+
<h3 class="signature first" id="initialize-instance_method">
|
246
|
+
|
247
|
+
- (<tt><span class='object_link'><a href="" title="Rpub::Epub (class)">Epub</a></span></tt>) <strong>initialize</strong>(book, styles)
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
</h3><div class="docstring">
|
254
|
+
<div class="discussion">
|
255
|
+
<p>Returns a new instance of Epub</p>
|
256
|
+
|
257
|
+
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
<div class="tags">
|
261
|
+
|
262
|
+
|
263
|
+
</div><table class="source_code">
|
264
|
+
<tr>
|
265
|
+
<td>
|
266
|
+
<pre class="lines">
|
267
|
+
|
268
|
+
|
269
|
+
6
|
270
|
+
7
|
271
|
+
8</pre>
|
272
|
+
</td>
|
273
|
+
<td>
|
274
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/epub.rb', line 6</span>
|
275
|
+
|
276
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_book'>book</span><span class='comma'>,</span> <span class='id identifier rubyid_styles'>styles</span><span class='rparen'>)</span>
|
277
|
+
<span class='ivar'>@book</span><span class='comma'>,</span> <span class='ivar'>@styles</span> <span class='op'>=</span> <span class='id identifier rubyid_book'>book</span><span class='comma'>,</span> <span class='id identifier rubyid_styles'>styles</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="book-instance_method">
|
293
|
+
|
294
|
+
- (<tt>Object</tt>) <strong>book</strong> <span class="extras">(readonly)</span>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
</h3><div class="docstring">
|
301
|
+
<div class="discussion">
|
302
|
+
<p>Returns the value of attribute book</p>
|
303
|
+
|
304
|
+
|
305
|
+
</div>
|
306
|
+
</div>
|
307
|
+
<div class="tags">
|
308
|
+
|
309
|
+
|
310
|
+
</div><table class="source_code">
|
311
|
+
<tr>
|
312
|
+
<td>
|
313
|
+
<pre class="lines">
|
314
|
+
|
315
|
+
|
316
|
+
4
|
317
|
+
5
|
318
|
+
6</pre>
|
319
|
+
</td>
|
320
|
+
<td>
|
321
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/epub.rb', line 4</span>
|
322
|
+
|
323
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_book'>book</span>
|
324
|
+
<span class='ivar'>@book</span>
|
325
|
+
<span class='kw'>end</span></pre>
|
326
|
+
</td>
|
327
|
+
</tr>
|
328
|
+
</table>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
|
332
|
+
<span id=""></span>
|
333
|
+
<div class="method_details ">
|
334
|
+
<h3 class="signature " id="styles-instance_method">
|
335
|
+
|
336
|
+
- (<tt>Object</tt>) <strong>styles</strong> <span class="extras">(readonly)</span>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</h3><div class="docstring">
|
343
|
+
<div class="discussion">
|
344
|
+
<p>Returns the value of attribute styles</p>
|
345
|
+
|
346
|
+
|
347
|
+
</div>
|
348
|
+
</div>
|
349
|
+
<div class="tags">
|
350
|
+
|
351
|
+
|
352
|
+
</div><table class="source_code">
|
353
|
+
<tr>
|
354
|
+
<td>
|
355
|
+
<pre class="lines">
|
356
|
+
|
357
|
+
|
358
|
+
4
|
359
|
+
5
|
360
|
+
6</pre>
|
361
|
+
</td>
|
362
|
+
<td>
|
363
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/epub.rb', line 4</span>
|
364
|
+
|
365
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_styles'>styles</span>
|
366
|
+
<span class='ivar'>@styles</span>
|
367
|
+
<span class='kw'>end</span></pre>
|
368
|
+
</td>
|
369
|
+
</tr>
|
370
|
+
</table>
|
371
|
+
</div>
|
372
|
+
|
373
|
+
</div>
|
374
|
+
|
375
|
+
|
376
|
+
<div id="instance_method_details" class="method_details_list">
|
377
|
+
<h2>Instance Method Details</h2>
|
378
|
+
|
379
|
+
|
380
|
+
<div class="method_details first">
|
381
|
+
<h3 class="signature first" id="manifest_in-instance_method">
|
382
|
+
|
383
|
+
- (<tt>Object</tt>) <strong>manifest_in</strong>(target)
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
</h3><table class="source_code">
|
390
|
+
<tr>
|
391
|
+
<td>
|
392
|
+
<pre class="lines">
|
393
|
+
|
394
|
+
|
395
|
+
10
|
396
|
+
11
|
397
|
+
12
|
398
|
+
13
|
399
|
+
14
|
400
|
+
15
|
401
|
+
16
|
402
|
+
17
|
403
|
+
18
|
404
|
+
19
|
405
|
+
20
|
406
|
+
21
|
407
|
+
22
|
408
|
+
23
|
409
|
+
24
|
410
|
+
25
|
411
|
+
26
|
412
|
+
27
|
413
|
+
28
|
414
|
+
29
|
415
|
+
30
|
416
|
+
31
|
417
|
+
32
|
418
|
+
33
|
419
|
+
34</pre>
|
420
|
+
</td>
|
421
|
+
<td>
|
422
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/epub.rb', line 10</span>
|
423
|
+
|
424
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_manifest_in'>manifest_in</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
425
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_store_file'>store_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mimetype</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>application/epub+zip</span><span class='tstring_end'>'</span></span>
|
426
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>META-INF/container.xml</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='const'>Container</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
427
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS/content.opf</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='const'>Content</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_book'>book</span><span class='rparen'>)</span>
|
428
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS/toc.ncx</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='const'>Toc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_book'>book</span><span class='rparen'>)</span>
|
429
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS/styles.css</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_styles'>styles</span>
|
430
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_has_cover?'>has_cover?</span>
|
431
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS/cover.html</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='const'>Cover</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_book'>book</span><span class='rparen'>)</span>
|
432
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_cover_image'>cover_image</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_cover_image'>cover_image</span><span class='rparen'>)</span>
|
433
|
+
<span class='kw'>end</span>
|
434
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_has_toc?'>has_toc?</span>
|
435
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS/toc.html</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_toc'>toc</span> <span class='lbrace'>{</span> <span class='const'>HtmlToc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_book'>book</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_render'>render</span> <span class='rbrace'>}</span>
|
436
|
+
<span class='kw'>end</span>
|
437
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_has_fonts?'>has_fonts?</span>
|
438
|
+
<span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_fonts'>fonts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_font'>font</span><span class='op'>|</span>
|
439
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_font'>font</span><span class='rparen'>)</span>
|
440
|
+
<span class='kw'>end</span>
|
441
|
+
<span class='kw'>end</span>
|
442
|
+
<span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_chapter'>chapter</span><span class='op'>|</span>
|
443
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_chapter'>chapter</span><span class='period'>.</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_chapter'>chapter</span><span class='period'>.</span><span class='id identifier rubyid_to_html'>to_html</span>
|
444
|
+
<span class='kw'>end</span>
|
445
|
+
<span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_images'>images</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_image'>image</span><span class='op'>|</span>
|
446
|
+
<span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_image'>image</span><span class='rparen'>)</span>
|
447
|
+
<span class='kw'>end</span>
|
448
|
+
<span class='kw'>end</span></pre>
|
449
|
+
</td>
|
450
|
+
</tr>
|
451
|
+
</table>
|
452
|
+
</div>
|
453
|
+
|
454
|
+
</div>
|
455
|
+
|
456
|
+
</div>
|
457
|
+
|
458
|
+
<div id="footer">
|
459
|
+
Generated on Thu Aug 14 19:54:32 2014 by
|
460
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
461
|
+
0.8.7.4 (ruby-2.1.2).
|
462
|
+
</div>
|
463
|
+
|
464
|
+
</body>
|
465
|
+
</html>
|