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,230 @@
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::Commands::Package
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/Commands/Package.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 (P)</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="../Commands.html" title="Rpub::Commands (module)">Commands</a></span></span>
36
+ &raquo;
37
+ <span class="title">Package</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::Commands::Package
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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></li>
82
+
83
+ <li class="next">Rpub::Commands::Package</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/commands/package.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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="../Command.html#args-instance_method" title="Rpub::Command#args (method)">#args</a></span>, <span class='object_link'><a href="../Command.html#options-instance_method" title="Rpub::Command#options (method)">#options</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="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></h3>
160
+ <p class="inherited"><span class='object_link'><a href="../Command.html#initialize-instance_method" title="Rpub::Command#initialize (method)">#initialize</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="../Command.html#initialize-instance_method" title="Rpub::Command#initialize (method)">Rpub::Command</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="run-instance_method">
175
+
176
+ - (<tt>Object</tt>) <strong>run</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</pre>
199
+ </td>
200
+ <td>
201
+ <pre class="code"><span class="info file"># File 'lib/rpub/commands/package.rb', line 4</span>
202
+
203
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
204
+ <span class='const'>Compile</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
205
+ <span class='kw'>if</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_package_file'>package_file</span>
206
+ <span class='const'>Rpub</span><span class='op'>::</span><span class='const'>Compressor</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_package_file'>package_file</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_zip'>zip</span><span class='op'>|</span>
207
+ <span class='id identifier rubyid_zip'>zip</span><span class='period'>.</span><span class='id identifier rubyid_store_file'>store_file</span> <span class='id identifier rubyid_book'>book</span><span class='period'>.</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_source'>source</span><span class='period'>.</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_filename'>filename</span><span class='rparen'>)</span>
208
+ <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_package'>package</span><span class='rparen'>)</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_file'>file</span><span class='op'>|</span>
209
+ <span class='id identifier rubyid_zip'>zip</span><span class='period'>.</span><span class='id identifier rubyid_compress_file'>compress_file</span> <span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
210
+ <span class='kw'>end</span>
211
+ <span class='kw'>end</span>
212
+ <span class='kw'>end</span>
213
+ <span class='kw'>end</span></pre>
214
+ </td>
215
+ </tr>
216
+ </table>
217
+ </div>
218
+
219
+ </div>
220
+
221
+ </div>
222
+
223
+ <div id="footer">
224
+ Generated on Thu Aug 14 19:54:32 2014 by
225
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
226
+ 0.8.7.4 (ruby-2.1.2).
227
+ </div>
228
+
229
+ </body>
230
+ </html>
@@ -0,0 +1,216 @@
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::Commands::Preview
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/Commands/Preview.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 (P)</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="../Commands.html" title="Rpub::Commands (module)">Commands</a></span></span>
36
+ &raquo;
37
+ <span class="title">Preview</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::Commands::Preview
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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></li>
82
+
83
+ <li class="next">Rpub::Commands::Preview</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/commands/preview.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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="../Command.html#args-instance_method" title="Rpub::Command#args (method)">#args</a></span>, <span class='object_link'><a href="../Command.html#options-instance_method" title="Rpub::Command#options (method)">#options</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="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></h3>
160
+ <p class="inherited"><span class='object_link'><a href="../Command.html#initialize-instance_method" title="Rpub::Command#initialize (method)">#initialize</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="../Command.html#initialize-instance_method" title="Rpub::Command#initialize (method)">Rpub::Command</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="run-instance_method">
175
+
176
+ - (<tt>Object</tt>) <strong>run</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</pre>
192
+ </td>
193
+ <td>
194
+ <pre class="code"><span class="info file"># File 'lib/rpub/commands/preview.rb', line 4</span>
195
+
196
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
197
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span> <span class='symbol'>:output</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>preview.html</span><span class='tstring_end'>&#39;</span></span>
198
+ <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_force_write'>force_write</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_output'>output</span><span class='comma'>,</span> <span class='const'>Rpub</span><span class='op'>::</span><span class='const'>Preview</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='comma'>,</span> <span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_formatted'>formatted</span>
199
+ <span class='kw'>end</span></pre>
200
+ </td>
201
+ </tr>
202
+ </table>
203
+ </div>
204
+
205
+ </div>
206
+
207
+ </div>
208
+
209
+ <div id="footer">
210
+ Generated on Thu Aug 14 19:54:32 2014 by
211
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
212
+ 0.8.7.4 (ruby-2.1.2).
213
+ </div>
214
+
215
+ </body>
216
+ </html>
@@ -0,0 +1,226 @@
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::Commands::Stats
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/Commands/Stats.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 (S)</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="../Commands.html" title="Rpub::Commands (module)">Commands</a></span></span>
36
+ &raquo;
37
+ <span class="title">Stats</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::Commands::Stats
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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></li>
82
+
83
+ <li class="next">Rpub::Commands::Stats</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/commands/stats.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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="../Command.html#args-instance_method" title="Rpub::Command#args (method)">#args</a></span>, <span class='object_link'><a href="../Command.html#options-instance_method" title="Rpub::Command#options (method)">#options</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="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</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="../Command.html" title="Rpub::Command (class)">Rpub::Command</a></span></h3>
160
+ <p class="inherited"><span class='object_link'><a href="../Command.html#initialize-instance_method" title="Rpub::Command#initialize (method)">#initialize</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="../Command.html#initialize-instance_method" title="Rpub::Command#initialize (method)">Rpub::Command</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="run-instance_method">
175
+
176
+ - (<tt>Object</tt>) <strong>run</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</pre>
197
+ </td>
198
+ <td>
199
+ <pre class="code"><span class="info file"># File 'lib/rpub/commands/stats.rb', line 4</span>
200
+
201
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
202
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='const'>Rpub</span><span class='op'>::</span><span class='const'>Preview</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='comma'>,</span> <span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span>
203
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_words'>words</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'> words</span><span class='tstring_end'>&quot;</span></span>
204
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_words'>words</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span> <span class='op'>/</span> <span class='int'>500</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_ceil'>ceil</span><span class='embexpr_end'>}</span><span class='tstring_content'> pages</span><span class='tstring_end'>&quot;</span></span>
205
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_sentences'>sentences</span><span class='embexpr_end'>}</span><span class='tstring_content'> sentences</span><span class='tstring_end'>&quot;</span></span>
206
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_avg_sentence_length'>avg_sentence_length</span><span class='embexpr_end'>}</span><span class='tstring_content'> avg sentence length</span><span class='tstring_end'>&quot;</span></span>
207
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%.2f ari</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_ari'>ari</span><span class='rparen'>)</span>
208
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%.2f clf</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_clf'>clf</span><span class='rparen'>)</span>
209
+ <span class='kw'>end</span></pre>
210
+ </td>
211
+ </tr>
212
+ </table>
213
+ </div>
214
+
215
+ </div>
216
+
217
+ </div>
218
+
219
+ <div id="footer">
220
+ Generated on Thu Aug 14 19:54:32 2014 by
221
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
222
+ 0.8.7.4 (ruby-2.1.2).
223
+ </div>
224
+
225
+ </body>
226
+ </html>