workbook 0.4.13 → 0.4.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/lib/workbook/modules/cell.rb +14 -0
- data/lib/workbook/version.rb +1 -1
- data/test/test_modules_cache.rb +14 -14
- data/test/test_modules_cell.rb +9 -2
- data/test/test_readers_xls_reader.rb +1 -1
- metadata +4 -46
- data/doc/RubyXL/Cell.html +0 -201
- data/doc/RubyXL/Workbook.html +0 -449
- data/doc/RubyXL.html +0 -128
- data/doc/Workbook/Book.html +0 -1852
- data/doc/Workbook/Cell.html +0 -1553
- data/doc/Workbook/Format.html +0 -1168
- data/doc/Workbook/Modules/RawObjectsStorage.html +0 -502
- data/doc/Workbook/Modules/TableDiffSort.html +0 -758
- data/doc/Workbook/Modules/TypeParser.html +0 -1063
- data/doc/Workbook/Modules.html +0 -117
- data/doc/Workbook/NilValue.html +0 -434
- data/doc/Workbook/Readers/CsvReader.html +0 -324
- data/doc/Workbook/Readers/OdsReader.html +0 -1066
- data/doc/Workbook/Readers/TxtReader.html +0 -236
- data/doc/Workbook/Readers/XlsReader.html +0 -378
- data/doc/Workbook/Readers/XlsShared.html +0 -188
- data/doc/Workbook/Readers/XlsxReader.html +0 -302
- data/doc/Workbook/Readers.html +0 -117
- data/doc/Workbook/Row.html +0 -2392
- data/doc/Workbook/Sheet.html +0 -875
- data/doc/Workbook/Table.html +0 -1732
- data/doc/Workbook/Template.html +0 -634
- data/doc/Workbook/Writers/CsvTableWriter.html +0 -200
- data/doc/Workbook/Writers/HtmlWriter.html +0 -407
- data/doc/Workbook/Writers/XlsWriter.html +0 -905
- data/doc/Workbook/Writers.html +0 -117
- data/doc/Workbook.html +0 -142
- data/doc/_index.html +0 -381
- data/doc/class_list.html +0 -53
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -338
- data/doc/file.README.html +0 -245
- data/doc/file_list.html +0 -55
- data/doc/frames.html +0 -28
- data/doc/index.html +0 -245
- data/doc/js/app.js +0 -214
- data/doc/js/full_list.js +0 -173
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -1308
- data/doc/top-level-namespace.html +0 -112
- data/test/artifacts/floats_problem.xls +0 -0
@@ -1,200 +0,0 @@
|
|
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
|
-
Module: Workbook::Writers::CsvTableWriter
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.5.2
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
|
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="../../Workbook.html" title="Workbook (module)">Workbook</a></span></span> » <span class='title'><span class='object_link'><a href="../Writers.html" title="Workbook::Writers (module)">Writers</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">CsvTableWriter</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>Module: Workbook::Writers::CsvTableWriter
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<dt class="r1">Included in:</dt>
|
81
|
-
<dd class="r1"><span class='object_link'><a href="../Table.html" title="Workbook::Table (class)">Table</a></span></dd>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<dt class="r2 last">Defined in:</dt>
|
86
|
-
<dd class="r2 last">lib/workbook/writers/csv_table_writer.rb</dd>
|
87
|
-
|
88
|
-
</dl>
|
89
|
-
<div class="clear"></div>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<h2>
|
100
|
-
Instance Method Summary
|
101
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
102
|
-
</h2>
|
103
|
-
|
104
|
-
<ul class="summary">
|
105
|
-
|
106
|
-
<li class="public ">
|
107
|
-
<span class="summary_signature">
|
108
|
-
|
109
|
-
<a href="#to_csv-instance_method" title="#to_csv (instance method)">- (Object) <strong>to_csv</strong>(options = {}) </a>
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
</span>
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
124
|
-
|
125
|
-
</li>
|
126
|
-
|
127
|
-
|
128
|
-
</ul>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
<div id="instance_method_details" class="method_details_list">
|
134
|
-
<h2>Instance Method Details</h2>
|
135
|
-
|
136
|
-
|
137
|
-
<div class="method_details first">
|
138
|
-
<h3 class="signature first" id="to_csv-instance_method">
|
139
|
-
|
140
|
-
- (<tt>Object</tt>) <strong>to_csv</strong>(options = {})
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
</h3><table class="source_code">
|
147
|
-
<tr>
|
148
|
-
<td>
|
149
|
-
<pre class="lines">
|
150
|
-
|
151
|
-
|
152
|
-
7
|
153
|
-
8
|
154
|
-
9
|
155
|
-
10
|
156
|
-
11
|
157
|
-
12
|
158
|
-
13
|
159
|
-
14
|
160
|
-
15
|
161
|
-
16
|
162
|
-
17
|
163
|
-
18
|
164
|
-
19
|
165
|
-
20</pre>
|
166
|
-
</td>
|
167
|
-
<td>
|
168
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/writers/csv_table_writer.rb', line 7</span>
|
169
|
-
|
170
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_csv'>to_csv</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span>
|
171
|
-
<span class='id identifier rubyid_csv'>csv</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
172
|
-
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_options'>options</span>
|
173
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_ri'>ri</span><span class='op'>|</span>
|
174
|
-
<span class='id identifier rubyid_line'>line</span><span class='op'>=</span><span class='kw'>nil</span>
|
175
|
-
<span class='kw'>begin</span>
|
176
|
-
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='const'>CSV</span><span class='op'>::</span><span class='id identifier rubyid_generate_line'>generate_line</span><span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='kw'>if</span> <span class='id identifier rubyid_c'>c</span><span class='rbrace'>}</span><span class='comma'>,</span><span class='lbrace'>{</span><span class='symbol'>:row_sep</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
177
|
-
<span class='kw'>rescue</span> <span class='const'>TypeError</span>
|
178
|
-
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='const'>CSV</span><span class='op'>::</span><span class='id identifier rubyid_generate_line'>generate_line</span><span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='kw'>if</span> <span class='id identifier rubyid_c'>c</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
179
|
-
<span class='kw'>end</span>
|
180
|
-
<span class='id identifier rubyid_csv'>csv</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_line'>line</span><span class='rbrace'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
181
|
-
<span class='kw'>end</span>
|
182
|
-
<span class='id identifier rubyid_csv'>csv</span>
|
183
|
-
<span class='kw'>end</span></pre>
|
184
|
-
</td>
|
185
|
-
</tr>
|
186
|
-
</table>
|
187
|
-
</div>
|
188
|
-
|
189
|
-
</div>
|
190
|
-
|
191
|
-
</div>
|
192
|
-
|
193
|
-
<div id="footer">
|
194
|
-
Generated on Sun May 19 23:16:29 2013 by
|
195
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
196
|
-
0.8.5.2 (ruby-1.9.3).
|
197
|
-
</div>
|
198
|
-
|
199
|
-
</body>
|
200
|
-
</html>
|
@@ -1,407 +0,0 @@
|
|
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
|
-
Module: Workbook::Writers::HtmlWriter
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.5.2
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
|
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="../../Workbook.html" title="Workbook (module)">Workbook</a></span></span> » <span class='title'><span class='object_link'><a href="../Writers.html" title="Workbook::Writers (module)">Writers</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">HtmlWriter</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>Module: Workbook::Writers::HtmlWriter
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<dt class="r1">Included in:</dt>
|
81
|
-
<dd class="r1"><span class='object_link'><a href="../Book.html" title="Workbook::Book (class)">Book</a></span></dd>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<dt class="r2 last">Defined in:</dt>
|
86
|
-
<dd class="r2 last">lib/workbook/writers/html_writer.rb</dd>
|
87
|
-
|
88
|
-
</dl>
|
89
|
-
<div class="clear"></div>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<h2>
|
100
|
-
Instance Method Summary
|
101
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
102
|
-
</h2>
|
103
|
-
|
104
|
-
<ul class="summary">
|
105
|
-
|
106
|
-
<li class="public ">
|
107
|
-
<span class="summary_signature">
|
108
|
-
|
109
|
-
<a href="#to_html-instance_method" title="#to_html (instance method)">- (Spreadsheet) <strong>to_html</strong>(options = {}) </a>
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
</span>
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
<span class="summary_desc"><div class='inline'>
|
124
|
-
<p>Generates an Spreadsheet (from the spreadsheet gem) in order to build an
|
125
|
-
XlS.</p>
|
126
|
-
</div></span>
|
127
|
-
|
128
|
-
</li>
|
129
|
-
|
130
|
-
|
131
|
-
<li class="public ">
|
132
|
-
<span class="summary_signature">
|
133
|
-
|
134
|
-
<a href="#write_to_html-instance_method" title="#write_to_html (instance method)">- (Object) <strong>write_to_html</strong>(filename = "#{title}.html", options = {}) </a>
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
</span>
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
<span class="summary_desc"><div class='inline'>
|
149
|
-
<p>Write the current workbook to Microsoft Excel format (using the spreadsheet
|
150
|
-
gem).</p>
|
151
|
-
</div></span>
|
152
|
-
|
153
|
-
</li>
|
154
|
-
|
155
|
-
|
156
|
-
</ul>
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
<div id="instance_method_details" class="method_details_list">
|
162
|
-
<h2>Instance Method Details</h2>
|
163
|
-
|
164
|
-
|
165
|
-
<div class="method_details first">
|
166
|
-
<h3 class="signature first" id="to_html-instance_method">
|
167
|
-
|
168
|
-
- (<tt>Spreadsheet</tt>) <strong>to_html</strong>(options = {})
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</h3><div class="docstring">
|
175
|
-
<div class="discussion">
|
176
|
-
|
177
|
-
<p>Generates an Spreadsheet (from the spreadsheet gem) in order to build an
|
178
|
-
XlS</p>
|
179
|
-
|
180
|
-
|
181
|
-
</div>
|
182
|
-
</div>
|
183
|
-
<div class="tags">
|
184
|
-
<p class="tag_title">Parameters:</p>
|
185
|
-
<ul class="param">
|
186
|
-
|
187
|
-
<li>
|
188
|
-
|
189
|
-
<span class='name'>options</span>
|
190
|
-
|
191
|
-
|
192
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
193
|
-
|
194
|
-
|
195
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
196
|
-
|
197
|
-
|
198
|
-
—
|
199
|
-
<div class='inline'>
|
200
|
-
<p>A hash with options</p>
|
201
|
-
</div>
|
202
|
-
|
203
|
-
</li>
|
204
|
-
|
205
|
-
</ul>
|
206
|
-
|
207
|
-
<p class="tag_title">Returns:</p>
|
208
|
-
<ul class="return">
|
209
|
-
|
210
|
-
<li>
|
211
|
-
|
212
|
-
|
213
|
-
<span class='type'>(<tt>Spreadsheet</tt>)</span>
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
—
|
218
|
-
<div class='inline'>
|
219
|
-
<p>A Spreadsheet object, ready for writing or more lower level operations</p>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
</li>
|
223
|
-
|
224
|
-
</ul>
|
225
|
-
|
226
|
-
</div><table class="source_code">
|
227
|
-
<tr>
|
228
|
-
<td>
|
229
|
-
<pre class="lines">
|
230
|
-
|
231
|
-
|
232
|
-
12
|
233
|
-
13
|
234
|
-
14
|
235
|
-
15
|
236
|
-
16
|
237
|
-
17
|
238
|
-
18
|
239
|
-
19
|
240
|
-
20
|
241
|
-
21
|
242
|
-
22
|
243
|
-
23
|
244
|
-
24
|
245
|
-
25
|
246
|
-
26
|
247
|
-
27
|
248
|
-
28
|
249
|
-
29
|
250
|
-
30
|
251
|
-
31
|
252
|
-
32
|
253
|
-
33
|
254
|
-
34
|
255
|
-
35
|
256
|
-
36
|
257
|
-
37
|
258
|
-
38
|
259
|
-
39
|
260
|
-
40
|
261
|
-
41
|
262
|
-
42
|
263
|
-
43
|
264
|
-
44
|
265
|
-
45
|
266
|
-
46
|
267
|
-
47
|
268
|
-
48
|
269
|
-
49</pre>
|
270
|
-
</td>
|
271
|
-
<td>
|
272
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/writers/html_writer.rb', line 12</span>
|
273
|
-
|
274
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_html'>to_html</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span>
|
275
|
-
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:style_with_inline_css</span><span class='op'>=></span><span class='kw'>false</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
276
|
-
<span class='id identifier rubyid_builder'>builder</span> <span class='op'>=</span> <span class='const'>Nokogiri</span><span class='op'>::</span><span class='const'>XML</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_doc'>doc</span><span class='op'>|</span>
|
277
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_html'>html</span> <span class='lbrace'>{</span>
|
278
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='lbrace'>{</span>
|
279
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_sheet'>sheet</span><span class='op'>|</span>
|
280
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_h1'>h1</span> <span class='lbrace'>{</span>
|
281
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='id identifier rubyid_sheet'>sheet</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
282
|
-
<span class='rbrace'>}</span>
|
283
|
-
<span class='id identifier rubyid_sheet'>sheet</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_table'>table</span><span class='op'>|</span>
|
284
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_h2'>h2</span> <span class='lbrace'>{</span>
|
285
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
286
|
-
<span class='rbrace'>}</span>
|
287
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_table'>table</span> <span class='lbrace'>{</span>
|
288
|
-
<span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_row'>row</span><span class='op'>|</span>
|
289
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_tr'>tr</span> <span class='lbrace'>{</span>
|
290
|
-
<span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='op'>|</span>
|
291
|
-
<span class='id identifier rubyid_classnames'>classnames</span> <span class='op'>=</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_all_names'>all_names</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><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
|
292
|
-
<span class='id identifier rubyid_td_options'>td_options</span> <span class='op'>=</span> <span class='id identifier rubyid_classnames'>classnames</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='lbrace'>{</span><span class='symbol'>:class</span><span class='op'>=></span><span class='id identifier rubyid_classnames'>classnames</span><span class='rbrace'>}</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
293
|
-
<span class='id identifier rubyid_td_options'>td_options</span> <span class='op'>=</span> <span class='id identifier rubyid_td_options'>td_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='symbol'>:style</span><span class='op'>=></span><span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_to_css'>to_css</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:style_with_inline_css</span><span class='rbracket'>]</span> <span class='kw'>and</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_to_css'>to_css</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
294
|
-
<span class='id identifier rubyid_td_options'>td_options</span> <span class='op'>=</span> <span class='id identifier rubyid_td_options'>td_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='symbol'>:colspan</span><span class='op'>=></span><span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_colspan'>colspan</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_colspan'>colspan</span>
|
295
|
-
<span class='id identifier rubyid_td_options'>td_options</span> <span class='op'>=</span> <span class='id identifier rubyid_td_options'>td_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='symbol'>:rowspan</span><span class='op'>=></span><span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_rowspan'>rowspan</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_rowspan'>rowspan</span>
|
296
|
-
<span class='kw'>unless</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>==</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>NilValue</span>
|
297
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_td'>td</span><span class='lparen'>(</span><span class='id identifier rubyid_td_options'>td_options</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
|
298
|
-
<span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
299
|
-
<span class='rbrace'>}</span>
|
300
|
-
<span class='kw'>end</span>
|
301
|
-
<span class='rbrace'>}</span>
|
302
|
-
<span class='rbrace'>}</span>
|
303
|
-
<span class='rbrace'>}</span>
|
304
|
-
<span class='rbrace'>}</span>
|
305
|
-
<span class='rbrace'>}</span>
|
306
|
-
<span class='rbrace'>}</span>
|
307
|
-
<span class='rbrace'>}</span>
|
308
|
-
<span class='rbrace'>}</span>
|
309
|
-
<span class='kw'>end</span>
|
310
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_doc'>doc</span><span class='period'>.</span><span class='id identifier rubyid_to_xhtml'>to_xhtml</span>
|
311
|
-
<span class='kw'>end</span></pre>
|
312
|
-
</td>
|
313
|
-
</tr>
|
314
|
-
</table>
|
315
|
-
</div>
|
316
|
-
|
317
|
-
<div class="method_details ">
|
318
|
-
<h3 class="signature " id="write_to_html-instance_method">
|
319
|
-
|
320
|
-
- (<tt>Object</tt>) <strong>write_to_html</strong>(filename = "#{title}.html", options = {})
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
</h3><div class="docstring">
|
327
|
-
<div class="discussion">
|
328
|
-
|
329
|
-
<p>Write the current workbook to Microsoft Excel format (using the spreadsheet
|
330
|
-
gem)</p>
|
331
|
-
|
332
|
-
|
333
|
-
</div>
|
334
|
-
</div>
|
335
|
-
<div class="tags">
|
336
|
-
<p class="tag_title">Parameters:</p>
|
337
|
-
<ul class="param">
|
338
|
-
|
339
|
-
<li>
|
340
|
-
|
341
|
-
<span class='name'>filename</span>
|
342
|
-
|
343
|
-
|
344
|
-
<span class='type'>(<tt>String</tt>)</span>
|
345
|
-
|
346
|
-
|
347
|
-
<em class="default">(defaults to: <tt>"#{title}.html"</tt>)</em>
|
348
|
-
|
349
|
-
|
350
|
-
</li>
|
351
|
-
|
352
|
-
<li>
|
353
|
-
|
354
|
-
<span class='name'>options</span>
|
355
|
-
|
356
|
-
|
357
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
358
|
-
|
359
|
-
|
360
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
361
|
-
|
362
|
-
|
363
|
-
—
|
364
|
-
<div class='inline'>
|
365
|
-
<p>see #to_xls</p>
|
366
|
-
</div>
|
367
|
-
|
368
|
-
</li>
|
369
|
-
|
370
|
-
</ul>
|
371
|
-
|
372
|
-
|
373
|
-
</div><table class="source_code">
|
374
|
-
<tr>
|
375
|
-
<td>
|
376
|
-
<pre class="lines">
|
377
|
-
|
378
|
-
|
379
|
-
57
|
380
|
-
58
|
381
|
-
59
|
382
|
-
60</pre>
|
383
|
-
</td>
|
384
|
-
<td>
|
385
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/writers/html_writer.rb', line 57</span>
|
386
|
-
|
387
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_write_to_html'>write_to_html</span> <span class='id identifier rubyid_filename'>filename</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_title'>title</span><span class='rbrace'>}</span><span class='tstring_content'>.html</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span>
|
388
|
-
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_to_html'>to_html</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
389
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_filename'>filename</span>
|
390
|
-
<span class='kw'>end</span></pre>
|
391
|
-
</td>
|
392
|
-
</tr>
|
393
|
-
</table>
|
394
|
-
</div>
|
395
|
-
|
396
|
-
</div>
|
397
|
-
|
398
|
-
</div>
|
399
|
-
|
400
|
-
<div id="footer">
|
401
|
-
Generated on Sun May 19 23:16:29 2013 by
|
402
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
403
|
-
0.8.5.2 (ruby-1.9.3).
|
404
|
-
</div>
|
405
|
-
|
406
|
-
</body>
|
407
|
-
</html>
|