rpub 0.4.0 → 0.5.0

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 (120) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -1
  3. data/.rspec +0 -1
  4. data/.travis.yml +3 -4
  5. data/.yardopts +1 -0
  6. data/Gemfile +1 -1
  7. data/Gemfile.lock +70 -46
  8. data/Guardfile +6 -0
  9. data/HISTORY.md +10 -0
  10. data/README.md +1 -1
  11. data/Rakefile +7 -2
  12. data/bin/rpub +64 -1
  13. data/doc/.gitignore +8 -0
  14. data/doc/api/Rpub.html +339 -0
  15. data/doc/api/Rpub/Book.html +983 -0
  16. data/doc/api/Rpub/Chapter.html +737 -0
  17. data/doc/api/Rpub/Command.html +356 -0
  18. data/doc/api/Rpub/Commands.html +117 -0
  19. data/doc/api/Rpub/Commands/Clean.html +216 -0
  20. data/doc/api/Rpub/Commands/Compile.html +218 -0
  21. data/doc/api/Rpub/Commands/Generate.html +242 -0
  22. data/doc/api/Rpub/Commands/Package.html +230 -0
  23. data/doc/api/Rpub/Commands/Preview.html +216 -0
  24. data/doc/api/Rpub/Commands/Stats.html +226 -0
  25. data/doc/api/Rpub/Compressor.html +687 -0
  26. data/doc/api/Rpub/Context.html +553 -0
  27. data/doc/api/Rpub/Document.html +647 -0
  28. data/doc/api/Rpub/Document/OutlineElement.html +388 -0
  29. data/doc/api/Rpub/Epub.html +465 -0
  30. data/doc/api/Rpub/Epub/Container.html +224 -0
  31. data/doc/api/Rpub/Epub/Content.html +344 -0
  32. data/doc/api/Rpub/Epub/Cover.html +236 -0
  33. data/doc/api/Rpub/Epub/HtmlToc.html +240 -0
  34. data/doc/api/Rpub/Epub/Toc.html +244 -0
  35. data/doc/api/Rpub/FilesystemSource.html +544 -0
  36. data/doc/api/Rpub/HashDelegation.html +281 -0
  37. data/doc/api/Rpub/HashDelegation/ClassMethods.html +175 -0
  38. data/doc/api/Rpub/MediaType.html +192 -0
  39. data/doc/api/Rpub/Preview.html +464 -0
  40. data/doc/api/Rpub/XmlFile.html +457 -0
  41. data/doc/api/_index.html +405 -0
  42. data/doc/api/class_list.html +54 -0
  43. data/doc/api/css/common.css +1 -0
  44. data/doc/api/css/full_list.css +57 -0
  45. data/doc/api/css/style.css +339 -0
  46. data/doc/api/file.HISTORY.html +131 -0
  47. data/doc/api/file.LICENSE.html +92 -0
  48. data/doc/api/file.README.html +337 -0
  49. data/doc/api/file_list.html +62 -0
  50. data/doc/api/frames.html +26 -0
  51. data/doc/api/index.html +337 -0
  52. data/doc/api/js/app.js +219 -0
  53. data/doc/api/js/full_list.js +178 -0
  54. data/doc/api/js/jquery.js +4 -0
  55. data/doc/api/method_list.html +533 -0
  56. data/doc/api/top-level-namespace.html +112 -0
  57. data/doc/index.html +312 -0
  58. data/doc/javascripts/scale.fix.js +17 -0
  59. data/doc/params.json +1 -0
  60. data/doc/stylesheets/pygment_trac.css +69 -0
  61. data/doc/stylesheets/styles.css +255 -0
  62. data/features/clean.feature +31 -0
  63. data/features/compile.feature +49 -0
  64. data/features/embedded_assets.feature +51 -0
  65. data/features/generate.feature +63 -0
  66. data/features/layout.feature +41 -0
  67. data/features/package.feature +30 -0
  68. data/features/previews.feature +66 -0
  69. data/features/stats.feature +18 -0
  70. data/features/step_definitions/general_steps.rb +60 -0
  71. data/features/styles.feature +33 -0
  72. data/features/support/env.rb +7 -0
  73. data/features/table_of_contents.feature +35 -0
  74. data/lib/rpub.rb +28 -31
  75. data/lib/rpub/book.rb +9 -16
  76. data/lib/rpub/chapter.rb +4 -54
  77. data/lib/rpub/command.rb +32 -0
  78. data/lib/rpub/commands/clean.rb +4 -49
  79. data/lib/rpub/commands/compile.rb +4 -49
  80. data/lib/rpub/commands/generate.rb +10 -67
  81. data/lib/rpub/commands/package.rb +9 -37
  82. data/lib/rpub/commands/preview.rb +4 -54
  83. data/lib/rpub/commands/stats.rb +6 -10
  84. data/lib/rpub/compressor.rb +3 -3
  85. data/lib/rpub/context.rb +48 -0
  86. data/lib/rpub/document.rb +68 -0
  87. data/lib/rpub/epub.rb +8 -7
  88. data/lib/rpub/epub/content.rb +9 -30
  89. data/lib/rpub/epub/cover.rb +1 -8
  90. data/lib/rpub/epub/html_toc.rb +4 -9
  91. data/lib/rpub/epub/toc.rb +16 -13
  92. data/lib/rpub/filesystem_source.rb +47 -0
  93. data/lib/rpub/media_type.rb +16 -0
  94. data/lib/rpub/preview.rb +29 -0
  95. data/lib/rpub/version.rb +1 -1
  96. data/lib/rpub/xml_file.rb +4 -1
  97. data/rpub.gemspec +6 -7
  98. data/spec/rpub/book_spec.rb +45 -45
  99. data/spec/rpub/chapter_spec.rb +87 -22
  100. data/spec/rpub/epub/container_spec.rb +3 -5
  101. data/spec/rpub/epub/content_spec.rb +62 -41
  102. data/spec/rpub/epub/cover_spec.rb +3 -5
  103. data/spec/rpub/epub/html_toc_spec.rb +8 -8
  104. data/spec/rpub/epub/toc_spec.rb +20 -22
  105. data/spec/rpub_spec.rb +1 -3
  106. data/spec/spec_helper.rb +28 -0
  107. data/support/config.yml +1 -0
  108. data/support/styles.css +3 -3
  109. metadata +131 -120
  110. data/lib/rpub/commander.rb +0 -23
  111. data/lib/rpub/commands/base.rb +0 -33
  112. data/lib/rpub/commands/help.rb +0 -37
  113. data/lib/rpub/commands/main.rb +0 -45
  114. data/lib/rpub/compilation_helpers.rb +0 -73
  115. data/lib/rpub/subclass_tracker.rb +0 -53
  116. data/spec/rpub/commands/clean_spec.rb +0 -46
  117. data/spec/rpub/commands/generate_spec.rb +0 -52
  118. data/spec/rpub/commands/main_spec.rb +0 -26
  119. data/spec/rpub/commands/package_spec.rb +0 -33
  120. 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
+ &mdash; 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> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Rpub.html" title="Rpub (module)">Rpub</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Document.html" title="Rpub::Document (class)">Document</a></span></span>
36
+ &raquo;
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
+ &mdash;
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
+ &mdash;
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
+ &mdash;
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
+ &mdash; 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> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Rpub.html" title="Rpub (module)">Rpub</a></span></span>
36
+ &raquo;
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'>&#39;</span><span class='tstring_content'>mimetype</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/epub+zip</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>META-INF/container.xml</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS/content.opf</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS/toc.ncx</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS/styles.css</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS/cover.html</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS/toc.html</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>OEBPS</span><span class='tstring_end'>&#39;</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>