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,758 +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::Modules::TableDiffSort
|
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 (T)</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="../Modules.html" title="Workbook::Modules (module)">Modules</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">TableDiffSort</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::Modules::TableDiffSort
|
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/modules/table_diff_sort.rb</dd>
|
87
|
-
|
88
|
-
</dl>
|
89
|
-
<div class="clear"></div>
|
90
|
-
|
91
|
-
<h2>Overview</h2><div class="docstring">
|
92
|
-
<div class="discussion">
|
93
|
-
|
94
|
-
<p>Adds diffing and sorting functions</p>
|
95
|
-
|
96
|
-
|
97
|
-
</div>
|
98
|
-
</div>
|
99
|
-
<div class="tags">
|
100
|
-
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<h2>
|
111
|
-
Instance Method Summary
|
112
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
113
|
-
</h2>
|
114
|
-
|
115
|
-
<ul class="summary">
|
116
|
-
|
117
|
-
<li class="public ">
|
118
|
-
<span class="summary_signature">
|
119
|
-
|
120
|
-
<a href="#align-instance_method" title="#align (instance method)">- (Object) <strong>align</strong>(other, options = {:sort=>true,:ignore_headers=>false}) </a>
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
</span>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
<span class="summary_desc"><div class='inline'>
|
135
|
-
<p>aligns itself with another table, used by diff.</p>
|
136
|
-
</div></span>
|
137
|
-
|
138
|
-
</li>
|
139
|
-
|
140
|
-
|
141
|
-
<li class="public ">
|
142
|
-
<span class="summary_signature">
|
143
|
-
|
144
|
-
<a href="#align_row-instance_method" title="#align_row (instance method)">- (Object) <strong>align_row</strong>(sself, sother, row_index) </a>
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
</span>
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<span class="summary_desc"><div class='inline'>
|
159
|
-
<p>for use in the align 'while' loop.</p>
|
160
|
-
</div></span>
|
161
|
-
|
162
|
-
</li>
|
163
|
-
|
164
|
-
|
165
|
-
<li class="public ">
|
166
|
-
<span class="summary_signature">
|
167
|
-
|
168
|
-
<a href="#diff-instance_method" title="#diff (instance method)">- (Workbook::Book) <strong>diff</strong>(other, options = {:sort=>true,:ignore_headers=>false}) </a>
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
</span>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
<span class="summary_desc"><div class='inline'>
|
183
|
-
<p>create an overview of the differences between itself with another
|
184
|
-
'previous' table, returns a book with a single sheet and table (containing
|
185
|
-
the diffs).</p>
|
186
|
-
</div></span>
|
187
|
-
|
188
|
-
</li>
|
189
|
-
|
190
|
-
|
191
|
-
<li class="public ">
|
192
|
-
<span class="summary_signature">
|
193
|
-
|
194
|
-
<a href="#diff_template-instance_method" title="#diff_template (instance method)">- (Object) <strong>diff_template</strong> </a>
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
</span>
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
209
|
-
|
210
|
-
</li>
|
211
|
-
|
212
|
-
|
213
|
-
<li class="public ">
|
214
|
-
<span class="summary_signature">
|
215
|
-
|
216
|
-
<a href="#insert_placeholder%3F-instance_method" title="#insert_placeholder? (instance method)">- (Boolean) <strong>insert_placeholder?</strong>(sother, sself, row_index) </a>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
</span>
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
231
|
-
|
232
|
-
</li>
|
233
|
-
|
234
|
-
|
235
|
-
<li class="public ">
|
236
|
-
<span class="summary_signature">
|
237
|
-
|
238
|
-
<a href="#placeholder_row-instance_method" title="#placeholder_row (instance method)">- (Object) <strong>placeholder_row</strong> </a>
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
</span>
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
<span class="summary_desc"><div class='inline'>
|
253
|
-
<p>returns a placeholder row, for internal use only.</p>
|
254
|
-
</div></span>
|
255
|
-
|
256
|
-
</li>
|
257
|
-
|
258
|
-
|
259
|
-
</ul>
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
<div id="instance_method_details" class="method_details_list">
|
265
|
-
<h2>Instance Method Details</h2>
|
266
|
-
|
267
|
-
|
268
|
-
<div class="method_details first">
|
269
|
-
<h3 class="signature first" id="align-instance_method">
|
270
|
-
|
271
|
-
- (<tt>Object</tt>) <strong>align</strong>(other, options = {:sort=>true,:ignore_headers=>false})
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
</h3><div class="docstring">
|
278
|
-
<div class="discussion">
|
279
|
-
|
280
|
-
<p>aligns itself with another table, used by diff</p>
|
281
|
-
|
282
|
-
|
283
|
-
</div>
|
284
|
-
</div>
|
285
|
-
<div class="tags">
|
286
|
-
|
287
|
-
|
288
|
-
</div><table class="source_code">
|
289
|
-
<tr>
|
290
|
-
<td>
|
291
|
-
<pre class="lines">
|
292
|
-
|
293
|
-
|
294
|
-
79
|
295
|
-
80
|
296
|
-
81
|
297
|
-
82
|
298
|
-
83
|
299
|
-
84
|
300
|
-
85
|
301
|
-
86
|
302
|
-
87
|
303
|
-
88
|
304
|
-
89
|
305
|
-
90
|
306
|
-
91
|
307
|
-
92
|
308
|
-
93
|
309
|
-
94
|
310
|
-
95
|
311
|
-
96
|
312
|
-
97
|
313
|
-
98
|
314
|
-
99
|
315
|
-
100
|
316
|
-
101
|
317
|
-
102
|
318
|
-
103</pre>
|
319
|
-
</td>
|
320
|
-
<td>
|
321
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 79</span>
|
322
|
-
|
323
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_align'>align</span> <span class='id identifier rubyid_other'>other</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='symbol'>:sort</span><span class='op'>=></span><span class='kw'>true</span><span class='comma'>,</span><span class='symbol'>:ignore_headers</span><span class='op'>=></span><span class='kw'>false</span><span class='rbrace'>}</span>
|
324
|
-
|
325
|
-
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:sort</span><span class='op'>=></span><span class='kw'>true</span><span class='comma'>,</span><span class='symbol'>:ignore_headers</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>
|
326
|
-
|
327
|
-
<span class='id identifier rubyid_iteration_cols'>iteration_cols</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
328
|
-
<span class='id identifier rubyid_sother'>sother</span> <span class='op'>=</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span><span class='period'>.</span><span class='id identifier rubyid_remove_empty_lines!'>remove_empty_lines!</span>
|
329
|
-
<span class='id identifier rubyid_sself'>sself</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span><span class='period'>.</span><span class='id identifier rubyid_remove_empty_lines!'>remove_empty_lines!</span>
|
330
|
-
|
331
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:ignore_headers</span><span class='rbracket'>]</span>
|
332
|
-
<span class='id identifier rubyid_sother'>sother</span><span class='period'>.</span><span class='id identifier rubyid_header'>header</span> <span class='op'>=</span> <span class='kw'>false</span>
|
333
|
-
<span class='id identifier rubyid_sself'>sself</span><span class='period'>.</span><span class='id identifier rubyid_header'>header</span> <span class='op'>=</span> <span class='kw'>false</span>
|
334
|
-
<span class='kw'>end</span>
|
335
|
-
|
336
|
-
<span class='id identifier rubyid_sother'>sother</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:sort</span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Table</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_sother'>sother</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_sother'>sother</span>
|
337
|
-
<span class='id identifier rubyid_sself'>sself</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:sort</span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Table</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_sself'>sself</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_sself'>sself</span>
|
338
|
-
|
339
|
-
<span class='id identifier rubyid_iteration_rows'>iteration_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_sother'>sother</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span><span class='id identifier rubyid_sself'>sself</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span>
|
340
|
-
|
341
|
-
<span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>=</span> <span class='int'>0</span>
|
342
|
-
<span class='kw'>while</span> <span class='id identifier rubyid_row_index'>row_index</span> <span class='op'><</span> <span class='lbracket'>[</span><span class='id identifier rubyid_sother'>sother</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span><span class='id identifier rubyid_sself'>sself</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span> <span class='kw'>and</span> <span class='id identifier rubyid_row_index'>row_index</span> <span class='op'><</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='op'>+</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='kw'>do</span>
|
343
|
-
<span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>=</span> <span class='id identifier rubyid_align_row'>align_row</span><span class='lparen'>(</span><span class='id identifier rubyid_sself'>sself</span><span class='comma'>,</span> <span class='id identifier rubyid_sother'>sother</span><span class='comma'>,</span> <span class='id identifier rubyid_row_index'>row_index</span><span class='rparen'>)</span>
|
344
|
-
<span class='kw'>end</span>
|
345
|
-
|
346
|
-
<span class='lbrace'>{</span><span class='symbol'>:self</span><span class='op'>=></span><span class='id identifier rubyid_sself'>sself</span><span class='comma'>,</span> <span class='symbol'>:other</span><span class='op'>=></span><span class='id identifier rubyid_sother'>sother</span><span class='rbrace'>}</span>
|
347
|
-
<span class='kw'>end</span></pre>
|
348
|
-
</td>
|
349
|
-
</tr>
|
350
|
-
</table>
|
351
|
-
</div>
|
352
|
-
|
353
|
-
<div class="method_details ">
|
354
|
-
<h3 class="signature " id="align_row-instance_method">
|
355
|
-
|
356
|
-
- (<tt>Object</tt>) <strong>align_row</strong>(sself, sother, row_index)
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
</h3><div class="docstring">
|
363
|
-
<div class="discussion">
|
364
|
-
|
365
|
-
<p>for use in the align 'while' loop</p>
|
366
|
-
|
367
|
-
|
368
|
-
</div>
|
369
|
-
</div>
|
370
|
-
<div class="tags">
|
371
|
-
|
372
|
-
|
373
|
-
</div><table class="source_code">
|
374
|
-
<tr>
|
375
|
-
<td>
|
376
|
-
<pre class="lines">
|
377
|
-
|
378
|
-
|
379
|
-
106
|
380
|
-
107
|
381
|
-
108
|
382
|
-
109
|
383
|
-
110
|
384
|
-
111
|
385
|
-
112
|
386
|
-
113
|
387
|
-
114
|
388
|
-
115
|
389
|
-
116
|
390
|
-
117
|
391
|
-
118
|
392
|
-
119
|
393
|
-
120
|
394
|
-
121
|
395
|
-
122
|
396
|
-
123
|
397
|
-
124</pre>
|
398
|
-
</td>
|
399
|
-
<td>
|
400
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 106</span>
|
401
|
-
|
402
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_align_row'>align_row</span> <span class='id identifier rubyid_sself'>sself</span><span class='comma'>,</span> <span class='id identifier rubyid_sother'>sother</span><span class='comma'>,</span> <span class='id identifier rubyid_row_index'>row_index</span>
|
403
|
-
<span class='id identifier rubyid_asd'>asd</span> <span class='op'>=</span> <span class='int'>0</span>
|
404
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_sself'>sself</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span> <span class='kw'>and</span> <span class='id identifier rubyid_sother'>sother</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span>
|
405
|
-
<span class='id identifier rubyid_asd'>asd</span> <span class='op'>=</span> <span class='id identifier rubyid_sself'>sself</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span> <span class='op'><=></span> <span class='id identifier rubyid_sother'>sother</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span>
|
406
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_sself'>sself</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span>
|
407
|
-
<span class='id identifier rubyid_asd'>asd</span> <span class='op'>=</span> <span class='op'>-</span><span class='int'>1</span>
|
408
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_sother'>sother</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span>
|
409
|
-
<span class='id identifier rubyid_asd'>asd</span> <span class='op'>=</span> <span class='int'>1</span>
|
410
|
-
<span class='kw'>end</span>
|
411
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_asd'>asd</span> <span class='op'>==</span> <span class='op'>-</span><span class='int'>1</span> <span class='kw'>and</span> <span class='id identifier rubyid_insert_placeholder?'>insert_placeholder?</span><span class='lparen'>(</span><span class='id identifier rubyid_sother'>sother</span><span class='comma'>,</span> <span class='id identifier rubyid_sself'>sself</span><span class='comma'>,</span> <span class='id identifier rubyid_row_index'>row_index</span><span class='rparen'>)</span>
|
412
|
-
<span class='id identifier rubyid_sother'>sother</span><span class='period'>.</span><span class='id identifier rubyid_insert'>insert</span> <span class='id identifier rubyid_row_index'>row_index</span><span class='comma'>,</span> <span class='id identifier rubyid_placeholder_row'>placeholder_row</span>
|
413
|
-
<span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>-=</span><span class='int'>1</span>
|
414
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_asd'>asd</span> <span class='op'>==</span> <span class='int'>1</span> <span class='kw'>and</span> <span class='id identifier rubyid_insert_placeholder?'>insert_placeholder?</span><span class='lparen'>(</span><span class='id identifier rubyid_sother'>sother</span><span class='comma'>,</span> <span class='id identifier rubyid_sself'>sself</span><span class='comma'>,</span> <span class='id identifier rubyid_row_index'>row_index</span><span class='rparen'>)</span>
|
415
|
-
<span class='id identifier rubyid_sself'>sself</span><span class='period'>.</span><span class='id identifier rubyid_insert'>insert</span> <span class='id identifier rubyid_row_index'>row_index</span><span class='comma'>,</span> <span class='id identifier rubyid_placeholder_row'>placeholder_row</span>
|
416
|
-
<span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>-=</span><span class='int'>1</span>
|
417
|
-
<span class='kw'>end</span>
|
418
|
-
|
419
|
-
<span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>+=</span> <span class='int'>1</span>
|
420
|
-
<span class='kw'>end</span></pre>
|
421
|
-
</td>
|
422
|
-
</tr>
|
423
|
-
</table>
|
424
|
-
</div>
|
425
|
-
|
426
|
-
<div class="method_details ">
|
427
|
-
<h3 class="signature " id="diff-instance_method">
|
428
|
-
|
429
|
-
- (<tt><span class='object_link'><a href="../Book.html" title="Workbook::Book (class)">Workbook::Book</a></span></tt>) <strong>diff</strong>(other, options = {:sort=>true,:ignore_headers=>false})
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
</h3><div class="docstring">
|
436
|
-
<div class="discussion">
|
437
|
-
|
438
|
-
<p>create an overview of the differences between itself with another
|
439
|
-
'previous' table, returns a book with a single sheet and table (containing
|
440
|
-
the diffs)</p>
|
441
|
-
|
442
|
-
|
443
|
-
</div>
|
444
|
-
</div>
|
445
|
-
<div class="tags">
|
446
|
-
|
447
|
-
<p class="tag_title">Returns:</p>
|
448
|
-
<ul class="return">
|
449
|
-
|
450
|
-
<li>
|
451
|
-
|
452
|
-
|
453
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Book.html" title="Workbook::Book (class)">Workbook::Book</a></span></tt>)</span>
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
—
|
458
|
-
<div class='inline'>
|
459
|
-
<p>(note should and will become Workbook::Table as diffing occurs on table
|
460
|
-
level…)</p>
|
461
|
-
</div>
|
462
|
-
|
463
|
-
</li>
|
464
|
-
|
465
|
-
</ul>
|
466
|
-
|
467
|
-
</div><table class="source_code">
|
468
|
-
<tr>
|
469
|
-
<td>
|
470
|
-
<pre class="lines">
|
471
|
-
|
472
|
-
|
473
|
-
9
|
474
|
-
10
|
475
|
-
11
|
476
|
-
12
|
477
|
-
13
|
478
|
-
14
|
479
|
-
15
|
480
|
-
16
|
481
|
-
17
|
482
|
-
18
|
483
|
-
19
|
484
|
-
20
|
485
|
-
21
|
486
|
-
22
|
487
|
-
23
|
488
|
-
24
|
489
|
-
25
|
490
|
-
26
|
491
|
-
27
|
492
|
-
28
|
493
|
-
29
|
494
|
-
30
|
495
|
-
31
|
496
|
-
32
|
497
|
-
33
|
498
|
-
34
|
499
|
-
35
|
500
|
-
36
|
501
|
-
37
|
502
|
-
38
|
503
|
-
39
|
504
|
-
40
|
505
|
-
41
|
506
|
-
42
|
507
|
-
43
|
508
|
-
44
|
509
|
-
45
|
510
|
-
46
|
511
|
-
47
|
512
|
-
48
|
513
|
-
49
|
514
|
-
50
|
515
|
-
51
|
516
|
-
52
|
517
|
-
53
|
518
|
-
54
|
519
|
-
55
|
520
|
-
56
|
521
|
-
57</pre>
|
522
|
-
</td>
|
523
|
-
<td>
|
524
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 9</span>
|
525
|
-
|
526
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_diff'>diff</span> <span class='id identifier rubyid_other'>other</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='symbol'>:sort</span><span class='op'>=></span><span class='kw'>true</span><span class='comma'>,</span><span class='symbol'>:ignore_headers</span><span class='op'>=></span><span class='kw'>false</span><span class='rbrace'>}</span>
|
527
|
-
|
528
|
-
<span class='id identifier rubyid_aligned'>aligned</span> <span class='op'>=</span> <span class='id identifier rubyid_align'>align</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
529
|
-
<span class='id identifier rubyid_aself'>aself</span> <span class='op'>=</span> <span class='id identifier rubyid_aligned'>aligned</span><span class='lbracket'>[</span><span class='symbol'>:self</span><span class='rbracket'>]</span>
|
530
|
-
<span class='id identifier rubyid_aother'>aother</span> <span class='op'>=</span> <span class='id identifier rubyid_aligned'>aligned</span><span class='lbracket'>[</span><span class='symbol'>:other</span><span class='rbracket'>]</span>
|
531
|
-
<span class='id identifier rubyid_iteration_cols'>iteration_cols</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
532
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:ignore_headers</span><span class='rbracket'>]</span>
|
533
|
-
<span class='id identifier rubyid_iteration_cols'>iteration_cols</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_aother'>aother</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span><span class='id identifier rubyid_aself'>aself</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span>
|
534
|
-
<span class='kw'>else</span>
|
535
|
-
<span class='id identifier rubyid_iteration_cols'>iteration_cols</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_aother'>aother</span><span class='period'>.</span><span class='id identifier rubyid_header'>header</span><span class='period'>.</span><span class='id identifier rubyid_to_symbols'>to_symbols</span><span class='op'>+</span><span class='id identifier rubyid_aother'>aother</span><span class='period'>.</span><span class='id identifier rubyid_header'>header</span><span class='period'>.</span><span class='id identifier rubyid_to_symbols'>to_symbols</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span>
|
536
|
-
<span class='kw'>end</span>
|
537
|
-
<span class='id identifier rubyid_diff_table'>diff_table</span> <span class='op'>=</span> <span class='id identifier rubyid_diff_template'>diff_template</span>
|
538
|
-
<span class='id identifier rubyid_maxri'>maxri</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_aself'>aself</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span>
|
539
|
-
<span class='kw'>for</span> <span class='id identifier rubyid_ri'>ri</span> <span class='kw'>in</span> <span class='int'>0</span><span class='op'>..</span><span class='id identifier rubyid_maxri'>maxri</span> <span class='kw'>do</span>
|
540
|
-
<span class='id identifier rubyid_row'>row</span> <span class='op'>=</span> <span class='id identifier rubyid_diff_table'>diff_table</span><span class='lbracket'>[</span><span class='id identifier rubyid_ri'>ri</span><span class='rbracket'>]</span>
|
541
|
-
<span class='id identifier rubyid_row'>row</span> <span class='op'>=</span> <span class='id identifier rubyid_diff_table'>diff_table</span><span class='lbracket'>[</span><span class='id identifier rubyid_ri'>ri</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Row</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_diff_table'>diff_table</span><span class='rparen'>)</span>
|
542
|
-
<span class='id identifier rubyid_srow'>srow</span> <span class='op'>=</span> <span class='id identifier rubyid_aself'>aself</span><span class='lbracket'>[</span><span class='id identifier rubyid_ri'>ri</span><span class='rbracket'>]</span>
|
543
|
-
<span class='id identifier rubyid_orow'>orow</span> <span class='op'>=</span> <span class='id identifier rubyid_aother'>aother</span><span class='lbracket'>[</span><span class='id identifier rubyid_ri'>ri</span><span class='rbracket'>]</span>
|
544
|
-
|
545
|
-
<span class='id identifier rubyid_iteration_cols'>iteration_cols</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_ch'>ch</span><span class='comma'>,</span> <span class='id identifier rubyid_ci'>ci</span><span class='op'>|</span>
|
546
|
-
<span class='id identifier rubyid_scell'>scell</span> <span class='op'>=</span> <span class='id identifier rubyid_srow'>srow</span><span class='lbracket'>[</span><span class='id identifier rubyid_ch'>ch</span><span class='rbracket'>]</span>
|
547
|
-
<span class='id identifier rubyid_ocell'>ocell</span> <span class='op'>=</span> <span class='id identifier rubyid_orow'>orow</span><span class='lbracket'>[</span><span class='id identifier rubyid_ch'>ch</span><span class='rbracket'>]</span>
|
548
|
-
<span class='id identifier rubyid_dcell'>dcell</span> <span class='op'>=</span> <span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Cell</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_scell'>scell</span>
|
549
|
-
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_scell'>scell</span> <span class='op'>==</span> <span class='id identifier rubyid_ocell'>ocell</span><span class='rparen'>)</span>
|
550
|
-
<span class='id identifier rubyid_dcell'>dcell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span> <span class='kw'>if</span> <span class='id identifier rubyid_scell'>scell</span>
|
551
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
552
|
-
<span class='id identifier rubyid_dcell'>dcell</span> <span class='op'>=</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Cell</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(was: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ocell'>ocell</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
553
|
-
<span class='id identifier rubyid_dcell'>dcell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_diff_template'>diff_template</span><span class='period'>.</span><span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>destroyed</span><span class='tstring_end'>'</span></span>
|
554
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_ocell'>ocell</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
555
|
-
<span class='id identifier rubyid_dcell'>dcell</span> <span class='op'>=</span> <span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span>
|
556
|
-
<span class='id identifier rubyid_fmt'>fmt</span> <span class='op'>=</span> <span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='symbol'>:default</span> <span class='op'>:</span> <span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span><span class='lbracket'>[</span><span class='symbol'>:number_format</span><span class='rbracket'>]</span>
|
557
|
-
<span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_diff_template'>diff_template</span><span class='period'>.</span><span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>created</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_fmt'>fmt</span>
|
558
|
-
<span class='id identifier rubyid_f'>f</span><span class='lbracket'>[</span><span class='symbol'>:number_format</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span><span class='lbracket'>[</span><span class='symbol'>:number_format</span><span class='rbracket'>]</span>
|
559
|
-
<span class='id identifier rubyid_dcell'>dcell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_f'>f</span>
|
560
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_scell'>scell</span> <span class='op'>!=</span> <span class='id identifier rubyid_ocell'>ocell</span>
|
561
|
-
<span class='id identifier rubyid_dcell'>dcell</span> <span class='op'>=</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Cell</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_scell'>scell</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_content'> (was: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ocell'>ocell</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
562
|
-
<span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_diff_template'>diff_template</span><span class='period'>.</span><span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>updated</span><span class='tstring_end'>'</span></span>
|
563
|
-
<span class='id identifier rubyid_dcell'>dcell</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_f'>f</span>
|
564
|
-
<span class='kw'>end</span>
|
565
|
-
|
566
|
-
<span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='id identifier rubyid_ci'>ci</span><span class='rbracket'>]</span><span class='op'>=</span><span class='id identifier rubyid_dcell'>dcell</span>
|
567
|
-
<span class='kw'>end</span>
|
568
|
-
<span class='kw'>end</span>
|
569
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:ignore_headers</span><span class='rbracket'>]</span>
|
570
|
-
<span class='id identifier rubyid_diff_table'>diff_table</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_diff_template'>diff_template</span><span class='period'>.</span><span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>header</span><span class='tstring_end'>'</span></span>
|
571
|
-
<span class='kw'>end</span>
|
572
|
-
|
573
|
-
<span class='id identifier rubyid_diff_table'>diff_table</span>
|
574
|
-
<span class='kw'>end</span></pre>
|
575
|
-
</td>
|
576
|
-
</tr>
|
577
|
-
</table>
|
578
|
-
</div>
|
579
|
-
|
580
|
-
<div class="method_details ">
|
581
|
-
<h3 class="signature " id="diff_template-instance_method">
|
582
|
-
|
583
|
-
- (<tt>Object</tt>) <strong>diff_template</strong>
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
</h3><table class="source_code">
|
590
|
-
<tr>
|
591
|
-
<td>
|
592
|
-
<pre class="lines">
|
593
|
-
|
594
|
-
|
595
|
-
59
|
596
|
-
60
|
597
|
-
61
|
598
|
-
62
|
599
|
-
63
|
600
|
-
64
|
601
|
-
65
|
602
|
-
66
|
603
|
-
67
|
604
|
-
68
|
605
|
-
69
|
606
|
-
70
|
607
|
-
71
|
608
|
-
72
|
609
|
-
73
|
610
|
-
74
|
611
|
-
75
|
612
|
-
76</pre>
|
613
|
-
</td>
|
614
|
-
<td>
|
615
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 59</span>
|
616
|
-
|
617
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_diff_template'>diff_template</span>
|
618
|
-
<span class='kw'>return</span> <span class='ivar'>@diff_template</span> <span class='kw'>if</span> <span class='ivar'>@diff_template</span>
|
619
|
-
<span class='id identifier rubyid_diffbook'>diffbook</span> <span class='op'>=</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Book</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
620
|
-
<span class='id identifier rubyid_difftable'>difftable</span> <span class='op'>=</span> <span class='id identifier rubyid_diffbook'>diffbook</span><span class='period'>.</span><span class='id identifier rubyid_sheet'>sheet</span><span class='period'>.</span><span class='id identifier rubyid_table'>table</span>
|
621
|
-
<span class='id identifier rubyid_template'>template</span> <span class='op'>=</span> <span class='id identifier rubyid_diffbook'>diffbook</span><span class='period'>.</span><span class='id identifier rubyid_template'>template</span>
|
622
|
-
<span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>destroyed</span><span class='tstring_end'>'</span></span>
|
623
|
-
<span class='id identifier rubyid_f'>f</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='op'>=</span><span class='symbol'>:red</span>
|
624
|
-
<span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>updated</span><span class='tstring_end'>'</span></span>
|
625
|
-
<span class='id identifier rubyid_f'>f</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='op'>=</span><span class='symbol'>:yellow</span>
|
626
|
-
<span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>created</span><span class='tstring_end'>'</span></span>
|
627
|
-
<span class='id identifier rubyid_f'>f</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='op'>=</span><span class='symbol'>:lime</span>
|
628
|
-
<span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_create_or_find_format_by'>create_or_find_format_by</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>header</span><span class='tstring_end'>'</span></span>
|
629
|
-
<span class='id identifier rubyid_f'>f</span><span class='lbracket'>[</span><span class='symbol'>:rotation</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='int'>72</span>
|
630
|
-
<span class='id identifier rubyid_f'>f</span><span class='lbracket'>[</span><span class='symbol'>:font_weight</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='symbol'>:bold</span>
|
631
|
-
<span class='id identifier rubyid_f'>f</span><span class='lbracket'>[</span><span class='symbol'>:height</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='int'>80</span>
|
632
|
-
<span class='ivar'>@diff_template</span> <span class='op'>=</span> <span class='id identifier rubyid_diffbook'>diffbook</span>
|
633
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_difftable'>difftable</span>
|
634
|
-
<span class='kw'>end</span></pre>
|
635
|
-
</td>
|
636
|
-
</tr>
|
637
|
-
</table>
|
638
|
-
</div>
|
639
|
-
|
640
|
-
<div class="method_details ">
|
641
|
-
<h3 class="signature " id="insert_placeholder?-instance_method">
|
642
|
-
|
643
|
-
- (<tt>Boolean</tt>) <strong>insert_placeholder?</strong>(sother, sself, row_index)
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
</h3><div class="docstring">
|
650
|
-
<div class="discussion">
|
651
|
-
|
652
|
-
|
653
|
-
</div>
|
654
|
-
</div>
|
655
|
-
<div class="tags">
|
656
|
-
|
657
|
-
<p class="tag_title">Returns:</p>
|
658
|
-
<ul class="return">
|
659
|
-
|
660
|
-
<li>
|
661
|
-
|
662
|
-
|
663
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
</li>
|
668
|
-
|
669
|
-
</ul>
|
670
|
-
|
671
|
-
</div><table class="source_code">
|
672
|
-
<tr>
|
673
|
-
<td>
|
674
|
-
<pre class="lines">
|
675
|
-
|
676
|
-
|
677
|
-
126
|
678
|
-
127
|
679
|
-
128
|
680
|
-
129</pre>
|
681
|
-
</td>
|
682
|
-
<td>
|
683
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 126</span>
|
684
|
-
|
685
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_insert_placeholder?'>insert_placeholder?</span> <span class='id identifier rubyid_sother'>sother</span><span class='comma'>,</span> <span class='id identifier rubyid_sself'>sself</span><span class='comma'>,</span> <span class='id identifier rubyid_row_index'>row_index</span>
|
686
|
-
<span class='lparen'>(</span><span class='id identifier rubyid_sother'>sother</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='op'>!</span><span class='id identifier rubyid_sother'>sother</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_placeholder?'>placeholder?</span><span class='rparen'>)</span> <span class='kw'>and</span>
|
687
|
-
<span class='lparen'>(</span><span class='id identifier rubyid_sself'>sself</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='op'>!</span><span class='id identifier rubyid_sself'>sself</span><span class='lbracket'>[</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_placeholder?'>placeholder?</span><span class='rparen'>)</span>
|
688
|
-
<span class='kw'>end</span></pre>
|
689
|
-
</td>
|
690
|
-
</tr>
|
691
|
-
</table>
|
692
|
-
</div>
|
693
|
-
|
694
|
-
<div class="method_details ">
|
695
|
-
<h3 class="signature " id="placeholder_row-instance_method">
|
696
|
-
|
697
|
-
- (<tt>Object</tt>) <strong>placeholder_row</strong>
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
</h3><div class="docstring">
|
704
|
-
<div class="discussion">
|
705
|
-
|
706
|
-
<p>returns a placeholder row, for internal use only</p>
|
707
|
-
|
708
|
-
|
709
|
-
</div>
|
710
|
-
</div>
|
711
|
-
<div class="tags">
|
712
|
-
|
713
|
-
|
714
|
-
</div><table class="source_code">
|
715
|
-
<tr>
|
716
|
-
<td>
|
717
|
-
<pre class="lines">
|
718
|
-
|
719
|
-
|
720
|
-
132
|
721
|
-
133
|
722
|
-
134
|
723
|
-
135
|
724
|
-
136
|
725
|
-
137
|
726
|
-
138
|
727
|
-
139
|
728
|
-
140</pre>
|
729
|
-
</td>
|
730
|
-
<td>
|
731
|
-
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 132</span>
|
732
|
-
|
733
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_placeholder_row'>placeholder_row</span>
|
734
|
-
<span class='kw'>if</span> <span class='ivar'>@placeholder_row</span> <span class='op'>!=</span> <span class='kw'>nil</span>
|
735
|
-
<span class='kw'>return</span> <span class='ivar'>@placeholder_row</span>
|
736
|
-
<span class='kw'>else</span>
|
737
|
-
<span class='ivar'>@placeholder_row</span> <span class='op'>=</span> <span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Row</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='lbracket'>[</span><span class='kw'>nil</span><span class='rbracket'>]</span>
|
738
|
-
<span class='id identifier rubyid_placeholder_row'>placeholder_row</span><span class='period'>.</span><span class='id identifier rubyid_placeholder'>placeholder</span> <span class='op'>=</span> <span class='kw'>true</span>
|
739
|
-
<span class='kw'>return</span> <span class='ivar'>@placeholder_row</span>
|
740
|
-
<span class='kw'>end</span>
|
741
|
-
<span class='kw'>end</span></pre>
|
742
|
-
</td>
|
743
|
-
</tr>
|
744
|
-
</table>
|
745
|
-
</div>
|
746
|
-
|
747
|
-
</div>
|
748
|
-
|
749
|
-
</div>
|
750
|
-
|
751
|
-
<div id="footer">
|
752
|
-
Generated on Sun May 19 23:16:29 2013 by
|
753
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
754
|
-
0.8.5.2 (ruby-1.9.3).
|
755
|
-
</div>
|
756
|
-
|
757
|
-
</body>
|
758
|
-
</html>
|