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.
- 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,236 @@
|
|
|
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::Cover
|
|
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/Cover.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 (C)</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="../Epub.html" title="Rpub::Epub (class)">Epub</a></span></span>
|
|
36
|
+
»
|
|
37
|
+
<span class="title">Cover</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::Cover
|
|
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"><span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next"><span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></li>
|
|
82
|
+
|
|
83
|
+
<li class="next">Rpub::Epub::Cover</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/epub/cover.rb</dd>
|
|
100
|
+
|
|
101
|
+
</dl>
|
|
102
|
+
<div class="clear"></div>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<h2>Instance Attribute Summary</h2>
|
|
111
|
+
|
|
112
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></h3>
|
|
113
|
+
<p class="inherited"><span class='object_link'><a href="../XmlFile.html#book-instance_method" title="Rpub::XmlFile#book (method)">#book</a></span>, <span class='object_link'><a href="../XmlFile.html#xml-instance_method" title="Rpub::XmlFile#xml (method)">#xml</a></span></p>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<h2>
|
|
118
|
+
Instance Method Summary
|
|
119
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
120
|
+
</h2>
|
|
121
|
+
|
|
122
|
+
<ul class="summary">
|
|
123
|
+
|
|
124
|
+
<li class="public ">
|
|
125
|
+
<span class="summary_signature">
|
|
126
|
+
|
|
127
|
+
<a href="#render-instance_method" title="#render (instance method)">- (Object) <strong>render</strong> </a>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</span>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
<span class="summary_desc"><div class='inline'>
|
|
142
|
+
</div></span>
|
|
143
|
+
|
|
144
|
+
</li>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</ul>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></h3>
|
|
160
|
+
<p class="inherited"><span class='object_link'><a href="../XmlFile.html#initialize-instance_method" title="Rpub::XmlFile#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../XmlFile.html#to_s-instance_method" title="Rpub::XmlFile#to_s (method)">#to_s</a></span></p>
|
|
161
|
+
<div id="constructor_details" class="method_details_list">
|
|
162
|
+
<h2>Constructor Details</h2>
|
|
163
|
+
|
|
164
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="../XmlFile.html#initialize-instance_method" title="Rpub::XmlFile#initialize (method)">Rpub::XmlFile</a></span></p>
|
|
165
|
+
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<div id="instance_method_details" class="method_details_list">
|
|
170
|
+
<h2>Instance Method Details</h2>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div class="method_details first">
|
|
174
|
+
<h3 class="signature first" id="render-instance_method">
|
|
175
|
+
|
|
176
|
+
- (<tt>Object</tt>) <strong>render</strong>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
</h3><table class="source_code">
|
|
183
|
+
<tr>
|
|
184
|
+
<td>
|
|
185
|
+
<pre class="lines">
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
4
|
|
189
|
+
5
|
|
190
|
+
6
|
|
191
|
+
7
|
|
192
|
+
8
|
|
193
|
+
9
|
|
194
|
+
10
|
|
195
|
+
11
|
|
196
|
+
12
|
|
197
|
+
13
|
|
198
|
+
14
|
|
199
|
+
15
|
|
200
|
+
16
|
|
201
|
+
17</pre>
|
|
202
|
+
</td>
|
|
203
|
+
<td>
|
|
204
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/epub/cover.rb', line 4</span>
|
|
205
|
+
|
|
206
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span>
|
|
207
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_declare!'>declare!</span> <span class='symbol'>:DOCTYPE</span><span class='comma'>,</span> <span class='symbol'>:html</span><span class='comma'>,</span> <span class='symbol'>:PUBLIC</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-//W3C//DTD XHTML 1.0 Strict//EN</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</span><span class='tstring_end'>'</span></span>
|
|
208
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_html'>html</span> <span class='symbol'>:xmlns</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://www.w3.org/1999/xhtml</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
|
209
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span> <span class='kw'>do</span>
|
|
210
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_title'>title</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Cover</span><span class='tstring_end'>'</span></span>
|
|
211
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_style'>style</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>img { max-width: 100%; }</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:type</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text/css</span><span class='tstring_end'>'</span></span>
|
|
212
|
+
<span class='kw'>end</span>
|
|
213
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='kw'>do</span>
|
|
214
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_div'>div</span> <span class='symbol'>:id</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cover-image</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
|
215
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_img'>img</span> <span class='symbol'>:src</span> <span class='op'>=></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='comma'>,</span> <span class='symbol'>:alt</span> <span class='op'>=></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_title'>title</span>
|
|
216
|
+
<span class='kw'>end</span>
|
|
217
|
+
<span class='kw'>end</span>
|
|
218
|
+
<span class='kw'>end</span>
|
|
219
|
+
<span class='kw'>end</span></pre>
|
|
220
|
+
</td>
|
|
221
|
+
</tr>
|
|
222
|
+
</table>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<div id="footer">
|
|
230
|
+
Generated on Thu Aug 14 19:54:32 2014 by
|
|
231
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
232
|
+
0.8.7.4 (ruby-2.1.2).
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
</body>
|
|
236
|
+
</html>
|
|
@@ -0,0 +1,240 @@
|
|
|
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::HtmlToc
|
|
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/HtmlToc.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 (H)</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="../Epub.html" title="Rpub::Epub (class)">Epub</a></span></span>
|
|
36
|
+
»
|
|
37
|
+
<span class="title">HtmlToc</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::HtmlToc
|
|
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"><span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next"><span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></li>
|
|
82
|
+
|
|
83
|
+
<li class="next">Rpub::Epub::HtmlToc</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/epub/html_toc.rb</dd>
|
|
100
|
+
|
|
101
|
+
</dl>
|
|
102
|
+
<div class="clear"></div>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<h2>Instance Attribute Summary</h2>
|
|
111
|
+
|
|
112
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></h3>
|
|
113
|
+
<p class="inherited"><span class='object_link'><a href="../XmlFile.html#book-instance_method" title="Rpub::XmlFile#book (method)">#book</a></span>, <span class='object_link'><a href="../XmlFile.html#xml-instance_method" title="Rpub::XmlFile#xml (method)">#xml</a></span></p>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<h2>
|
|
118
|
+
Instance Method Summary
|
|
119
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
120
|
+
</h2>
|
|
121
|
+
|
|
122
|
+
<ul class="summary">
|
|
123
|
+
|
|
124
|
+
<li class="public ">
|
|
125
|
+
<span class="summary_signature">
|
|
126
|
+
|
|
127
|
+
<a href="#render-instance_method" title="#render (instance method)">- (Object) <strong>render</strong> </a>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</span>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
<span class="summary_desc"><div class='inline'>
|
|
142
|
+
</div></span>
|
|
143
|
+
|
|
144
|
+
</li>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</ul>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span></h3>
|
|
160
|
+
<p class="inherited"><span class='object_link'><a href="../XmlFile.html#initialize-instance_method" title="Rpub::XmlFile#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../XmlFile.html#to_s-instance_method" title="Rpub::XmlFile#to_s (method)">#to_s</a></span></p>
|
|
161
|
+
<div id="constructor_details" class="method_details_list">
|
|
162
|
+
<h2>Constructor Details</h2>
|
|
163
|
+
|
|
164
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="../XmlFile.html#initialize-instance_method" title="Rpub::XmlFile#initialize (method)">Rpub::XmlFile</a></span></p>
|
|
165
|
+
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<div id="instance_method_details" class="method_details_list">
|
|
170
|
+
<h2>Instance Method Details</h2>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div class="method_details first">
|
|
174
|
+
<h3 class="signature first" id="render-instance_method">
|
|
175
|
+
|
|
176
|
+
- (<tt>Object</tt>) <strong>render</strong>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
</h3><table class="source_code">
|
|
183
|
+
<tr>
|
|
184
|
+
<td>
|
|
185
|
+
<pre class="lines">
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
4
|
|
189
|
+
5
|
|
190
|
+
6
|
|
191
|
+
7
|
|
192
|
+
8
|
|
193
|
+
9
|
|
194
|
+
10
|
|
195
|
+
11
|
|
196
|
+
12
|
|
197
|
+
13
|
|
198
|
+
14
|
|
199
|
+
15
|
|
200
|
+
16
|
|
201
|
+
17
|
|
202
|
+
18
|
|
203
|
+
19</pre>
|
|
204
|
+
</td>
|
|
205
|
+
<td>
|
|
206
|
+
<pre class="code"><span class="info file"># File 'lib/rpub/epub/html_toc.rb', line 4</span>
|
|
207
|
+
|
|
208
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span>
|
|
209
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_div'>div</span> <span class='symbol'>:id</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>toc</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
|
210
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_h1'>h1</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Table of Contents</span><span class='tstring_end'>'</span></span>
|
|
211
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_div'>div</span> <span class='symbol'>:class</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>toc</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
|
212
|
+
<span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_outline'>outline</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_headings'>headings</span><span class='rparen'>)</span><span class='op'>|</span>
|
|
213
|
+
<span class='id identifier rubyid_headings'>headings</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_heading'>heading</span><span class='op'>|</span>
|
|
214
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_heading'>heading</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span> <span class='op'><=</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_max_level'>max_level</span> <span class='op'>||</span> <span class='int'>2</span><span class='rparen'>)</span>
|
|
215
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_div'>div</span> <span class='symbol'>:class</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>level-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_heading'>heading</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>do</span>
|
|
216
|
+
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_a'>a</span> <span class='id identifier rubyid_heading'>heading</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='symbol'>:href</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_heading'>heading</span><span class='period'>.</span><span class='id identifier rubyid_html_id'>html_id</span><span class='rbracket'>]</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'>#</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
217
|
+
<span class='kw'>end</span>
|
|
218
|
+
<span class='kw'>end</span>
|
|
219
|
+
<span class='kw'>end</span>
|
|
220
|
+
<span class='kw'>end</span>
|
|
221
|
+
<span class='kw'>end</span>
|
|
222
|
+
<span class='kw'>end</span>
|
|
223
|
+
<span class='kw'>end</span></pre>
|
|
224
|
+
</td>
|
|
225
|
+
</tr>
|
|
226
|
+
</table>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div id="footer">
|
|
234
|
+
Generated on Thu Aug 14 19:54:32 2014 by
|
|
235
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
236
|
+
0.8.7.4 (ruby-2.1.2).
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
</body>
|
|
240
|
+
</html>
|