workbook 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +18 -0
- data/.yardoc/object_types +3 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile.lock +1 -1
- data/{readme.markdown → README.md} +36 -10
- data/doc/RubyXL.html +128 -0
- data/doc/RubyXL/Cell.html +202 -0
- data/doc/RubyXL/Workbook.html +447 -0
- data/doc/Workbook.html +130 -0
- data/doc/Workbook/Book.html +1484 -0
- data/doc/Workbook/Cell.html +1402 -0
- data/doc/Workbook/Format.html +654 -0
- data/doc/Workbook/Modules.html +117 -0
- data/doc/Workbook/Modules/RawObjectsStorage.html +508 -0
- data/doc/Workbook/Modules/TableDiffSort.html +620 -0
- data/doc/Workbook/Modules/TypeParser.html +1012 -0
- data/doc/Workbook/Readers.html +117 -0
- data/doc/Workbook/Readers/CsvReader.html +262 -0
- data/doc/Workbook/Readers/TxtReader.html +238 -0
- data/doc/Workbook/Readers/XlsReader.html +362 -0
- data/doc/Workbook/Readers/XlsShared.html +189 -0
- data/doc/Workbook/Readers/XlsxReader.html +295 -0
- data/doc/Workbook/Row.html +1939 -0
- data/doc/Workbook/Sheet.html +528 -0
- data/doc/Workbook/Table.html +883 -0
- data/doc/Workbook/Template.html +639 -0
- data/doc/Workbook/Writers.html +117 -0
- data/doc/Workbook/Writers/CsvTableWriter.html +175 -0
- data/doc/Workbook/Writers/XlsWriter.html +865 -0
- data/doc/_index.html +336 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.README.html +236 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +236 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +972 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/workbook/book.rb +38 -29
- data/lib/workbook/cell.rb +25 -0
- data/lib/workbook/format.rb +9 -2
- data/lib/workbook/modules/raw_objects_storage.rb +5 -0
- data/lib/workbook/modules/table_diff_sort.rb +8 -6
- data/lib/workbook/modules/type_parser.rb +16 -3
- data/lib/workbook/readers/xls_reader.rb +1 -70
- data/lib/workbook/readers/xls_shared.rb +75 -0
- data/lib/workbook/row.rb +89 -17
- data/lib/workbook/sheet.rb +26 -0
- data/lib/workbook/table.rb +20 -1
- data/lib/workbook/template.rb +12 -11
- data/lib/workbook/writers/xls_writer.rb +19 -77
- data/test/test_modules_table_diff_sort.rb +19 -6
- data/test/test_row.rb +54 -0
- data/test/test_sheet.rb +8 -0
- data/test/test_table.rb +22 -3
- data/test/test_writers_xls_writer.rb +3 -0
- data/workbook.gemspec +1 -1
- metadata +46 -3
@@ -0,0 +1,620 @@
|
|
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.3
|
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
|
185
|
+
(containing 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
|
+
78</pre>
|
295
|
+
</td>
|
296
|
+
<td>
|
297
|
+
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 78</span>
|
298
|
+
|
299
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_align identifier id'>align</span> <span class='rubyid_other identifier id'>other</span><span class='comma token'>,</span> <span class='rubyid_options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='symbol val'>:sort=</span><span class='gt op'>></span><span class='rubyid_true true kw'>true</span><span class='comma token'>,</span><span class='symbol val'>:ignore_headers=</span><span class='gt op'>></span><span class='rubyid_false false kw'>false</span><span class='rbrace token'>}</span>
|
300
|
+
</pre>
|
301
|
+
</td>
|
302
|
+
</tr>
|
303
|
+
</table>
|
304
|
+
</div>
|
305
|
+
|
306
|
+
<div class="method_details ">
|
307
|
+
<h3 class="signature " id="align_row-instance_method">
|
308
|
+
|
309
|
+
- (<tt>Object</tt>) <strong>align_row</strong>(sself, sother, row_index)
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
</h3><div class="docstring">
|
316
|
+
<div class="discussion">
|
317
|
+
|
318
|
+
<p>for use in the align ‘while’ loop</p>
|
319
|
+
|
320
|
+
|
321
|
+
</div>
|
322
|
+
</div>
|
323
|
+
<div class="tags">
|
324
|
+
|
325
|
+
|
326
|
+
</div><table class="source_code">
|
327
|
+
<tr>
|
328
|
+
<td>
|
329
|
+
<pre class="lines">
|
330
|
+
|
331
|
+
|
332
|
+
105
|
333
|
+
106
|
334
|
+
107
|
335
|
+
108
|
336
|
+
109
|
337
|
+
110
|
338
|
+
111
|
339
|
+
112
|
340
|
+
113
|
341
|
+
114
|
342
|
+
115
|
343
|
+
116
|
344
|
+
117
|
345
|
+
118
|
346
|
+
119
|
347
|
+
120
|
348
|
+
121
|
349
|
+
122
|
350
|
+
123</pre>
|
351
|
+
</td>
|
352
|
+
<td>
|
353
|
+
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 105</span>
|
354
|
+
|
355
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_align_row identifier id'>align_row</span> <span class='rubyid_sself identifier id'>sself</span><span class='comma token'>,</span> <span class='rubyid_sother identifier id'>sother</span><span class='comma token'>,</span> <span class='rubyid_row_index identifier id'>row_index</span>
|
356
|
+
<span class='rubyid_asd identifier id'>asd</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
|
357
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_sself identifier id'>sself</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_sother identifier id'>sother</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span>
|
358
|
+
<span class='rubyid_asd identifier id'>asd</span> <span class='assign token'>=</span> <span class='rubyid_sself identifier id'>sself</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_key identifier id'>key</span> <span class='cmp op'><=></span> <span class='rubyid_sother identifier id'>sother</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_key identifier id'>key</span>
|
359
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_sself identifier id'>sself</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span>
|
360
|
+
<span class='rubyid_asd identifier id'>asd</span> <span class='assign token'>=</span> <span class='integer val'>-1</span>
|
361
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_sother identifier id'>sother</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span>
|
362
|
+
<span class='rubyid_asd identifier id'>asd</span> <span class='assign token'>=</span> <span class='integer val'>1</span>
|
363
|
+
<span class='rubyid_end end kw'>end</span>
|
364
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_asd identifier id'>asd</span> <span class='eq op'>==</span> <span class='integer val'>-1</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_insert_placeholder? fid id'>insert_placeholder?</span><span class='lparen token'>(</span><span class='rubyid_sother identifier id'>sother</span><span class='comma token'>,</span> <span class='rubyid_sself identifier id'>sself</span><span class='comma token'>,</span> <span class='rubyid_row_index identifier id'>row_index</span><span class='rparen token'>)</span>
|
365
|
+
<span class='rubyid_sother identifier id'>sother</span><span class='dot token'>.</span><span class='rubyid_insert identifier id'>insert</span> <span class='rubyid_row_index identifier id'>row_index</span><span class='comma token'>,</span> <span class='rubyid_placeholder_row identifier id'>placeholder_row</span>
|
366
|
+
<span class='rubyid_row_index identifier id'>row_index</span> <span class='opasgn op'>-=</span><span class='integer val'>1</span>
|
367
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_asd identifier id'>asd</span> <span class='eq op'>==</span> <span class='integer val'>1</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_insert_placeholder? fid id'>insert_placeholder?</span><span class='lparen token'>(</span><span class='rubyid_sother identifier id'>sother</span><span class='comma token'>,</span> <span class='rubyid_sself identifier id'>sself</span><span class='comma token'>,</span> <span class='rubyid_row_index identifier id'>row_index</span><span class='rparen token'>)</span>
|
368
|
+
<span class='rubyid_sself identifier id'>sself</span><span class='dot token'>.</span><span class='rubyid_insert identifier id'>insert</span> <span class='rubyid_row_index identifier id'>row_index</span><span class='comma token'>,</span> <span class='rubyid_placeholder_row identifier id'>placeholder_row</span>
|
369
|
+
<span class='rubyid_row_index identifier id'>row_index</span> <span class='opasgn op'>-=</span><span class='integer val'>1</span>
|
370
|
+
<span class='rubyid_end end kw'>end</span>
|
371
|
+
|
372
|
+
<span class='rubyid_row_index identifier id'>row_index</span> <span class='opasgn op'>+=</span> <span class='integer val'>1</span>
|
373
|
+
<span class='rubyid_end end kw'>end</span>
|
374
|
+
</pre>
|
375
|
+
</td>
|
376
|
+
</tr>
|
377
|
+
</table>
|
378
|
+
</div>
|
379
|
+
|
380
|
+
<div class="method_details ">
|
381
|
+
<h3 class="signature " id="diff-instance_method">
|
382
|
+
|
383
|
+
- (<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})
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
</h3><div class="docstring">
|
390
|
+
<div class="discussion">
|
391
|
+
|
392
|
+
<p>create an overview of the differences between itself with another
|
393
|
+
‘previous’ table, returns a book with a single sheet and table
|
394
|
+
(containing the diffs)</p>
|
395
|
+
|
396
|
+
|
397
|
+
</div>
|
398
|
+
</div>
|
399
|
+
<div class="tags">
|
400
|
+
|
401
|
+
<p class="tag_title">Returns:</p>
|
402
|
+
<ul class="return">
|
403
|
+
|
404
|
+
<li>
|
405
|
+
|
406
|
+
|
407
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Book.html" title="Workbook::Book (class)">Workbook::Book</a></span></tt>)</span>
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
—
|
412
|
+
<div class='inline'>
|
413
|
+
<p>(note should and will become Workbook::Table as diffing occurs on table
|
414
|
+
level…)</p>
|
415
|
+
</div>
|
416
|
+
|
417
|
+
</li>
|
418
|
+
|
419
|
+
</ul>
|
420
|
+
|
421
|
+
</div><table class="source_code">
|
422
|
+
<tr>
|
423
|
+
<td>
|
424
|
+
<pre class="lines">
|
425
|
+
|
426
|
+
|
427
|
+
8</pre>
|
428
|
+
</td>
|
429
|
+
<td>
|
430
|
+
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 8</span>
|
431
|
+
|
432
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_diff identifier id'>diff</span> <span class='rubyid_other identifier id'>other</span><span class='comma token'>,</span> <span class='rubyid_options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='symbol val'>:sort=</span><span class='gt op'>></span><span class='rubyid_true true kw'>true</span><span class='comma token'>,</span><span class='symbol val'>:ignore_headers=</span><span class='gt op'>></span><span class='rubyid_false false kw'>false</span><span class='rbrace token'>}</span>
|
433
|
+
</pre>
|
434
|
+
</td>
|
435
|
+
</tr>
|
436
|
+
</table>
|
437
|
+
</div>
|
438
|
+
|
439
|
+
<div class="method_details ">
|
440
|
+
<h3 class="signature " id="diff_template-instance_method">
|
441
|
+
|
442
|
+
- (<tt>Object</tt>) <strong>diff_template</strong>
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
</h3><table class="source_code">
|
449
|
+
<tr>
|
450
|
+
<td>
|
451
|
+
<pre class="lines">
|
452
|
+
|
453
|
+
|
454
|
+
58
|
455
|
+
59
|
456
|
+
60
|
457
|
+
61
|
458
|
+
62
|
459
|
+
63
|
460
|
+
64
|
461
|
+
65
|
462
|
+
66
|
463
|
+
67
|
464
|
+
68
|
465
|
+
69
|
466
|
+
70
|
467
|
+
71
|
468
|
+
72
|
469
|
+
73
|
470
|
+
74
|
471
|
+
75</pre>
|
472
|
+
</td>
|
473
|
+
<td>
|
474
|
+
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 58</span>
|
475
|
+
|
476
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_diff_template identifier id'>diff_template</span>
|
477
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_@diff_template ivar id'>@diff_template</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_@diff_template ivar id'>@diff_template</span>
|
478
|
+
<span class='rubyid_diffbook identifier id'>diffbook</span> <span class='assign token'>=</span> <span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Book constant id'>Book</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
|
479
|
+
<span class='rubyid_difftable identifier id'>difftable</span> <span class='assign token'>=</span> <span class='rubyid_diffbook identifier id'>diffbook</span><span class='dot token'>.</span><span class='rubyid_sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rubyid_table identifier id'>table</span>
|
480
|
+
<span class='rubyid_template identifier id'>template</span> <span class='assign token'>=</span> <span class='rubyid_diffbook identifier id'>diffbook</span><span class='dot token'>.</span><span class='rubyid_template identifier id'>template</span>
|
481
|
+
<span class='rubyid_f identifier id'>f</span> <span class='assign token'>=</span> <span class='rubyid_template identifier id'>template</span><span class='dot token'>.</span><span class='rubyid_create_or_find_format_by identifier id'>create_or_find_format_by</span> <span class='string val'>'destroyed'</span>
|
482
|
+
<span class='rubyid_f identifier id'>f</span><span class='lbrack token'>[</span><span class='symbol val'>:background_color</span><span class='rbrack token'>]</span><span class='assign token'>=</span><span class='symbol val'>:red</span>
|
483
|
+
<span class='rubyid_f identifier id'>f</span> <span class='assign token'>=</span> <span class='rubyid_template identifier id'>template</span><span class='dot token'>.</span><span class='rubyid_create_or_find_format_by identifier id'>create_or_find_format_by</span> <span class='string val'>'updated'</span>
|
484
|
+
<span class='rubyid_f identifier id'>f</span><span class='lbrack token'>[</span><span class='symbol val'>:background_color</span><span class='rbrack token'>]</span><span class='assign token'>=</span><span class='symbol val'>:yellow</span>
|
485
|
+
<span class='rubyid_f identifier id'>f</span> <span class='assign token'>=</span> <span class='rubyid_template identifier id'>template</span><span class='dot token'>.</span><span class='rubyid_create_or_find_format_by identifier id'>create_or_find_format_by</span> <span class='string val'>'created'</span>
|
486
|
+
<span class='rubyid_f identifier id'>f</span><span class='lbrack token'>[</span><span class='symbol val'>:background_color</span><span class='rbrack token'>]</span><span class='assign token'>=</span><span class='symbol val'>:lime</span>
|
487
|
+
<span class='rubyid_f identifier id'>f</span> <span class='assign token'>=</span> <span class='rubyid_template identifier id'>template</span><span class='dot token'>.</span><span class='rubyid_create_or_find_format_by identifier id'>create_or_find_format_by</span> <span class='string val'>'header'</span>
|
488
|
+
<span class='rubyid_f identifier id'>f</span><span class='lbrack token'>[</span><span class='symbol val'>:rotation</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='integer val'>72</span>
|
489
|
+
<span class='rubyid_f identifier id'>f</span><span class='lbrack token'>[</span><span class='symbol val'>:font_weight</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='symbol val'>:bold</span>
|
490
|
+
<span class='rubyid_f identifier id'>f</span><span class='lbrack token'>[</span><span class='symbol val'>:height</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='integer val'>80</span>
|
491
|
+
<span class='rubyid_@diff_template ivar id'>@diff_template</span> <span class='assign token'>=</span> <span class='rubyid_diffbook identifier id'>diffbook</span>
|
492
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_difftable identifier id'>difftable</span>
|
493
|
+
<span class='rubyid_end end kw'>end</span>
|
494
|
+
</pre>
|
495
|
+
</td>
|
496
|
+
</tr>
|
497
|
+
</table>
|
498
|
+
</div>
|
499
|
+
|
500
|
+
<div class="method_details ">
|
501
|
+
<h3 class="signature " id="insert_placeholder?-instance_method">
|
502
|
+
|
503
|
+
- (<tt>Boolean</tt>) <strong>insert_placeholder?</strong>(sother, sself, row_index)
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
</h3><div class="docstring">
|
510
|
+
<div class="discussion">
|
511
|
+
|
512
|
+
|
513
|
+
</div>
|
514
|
+
</div>
|
515
|
+
<div class="tags">
|
516
|
+
|
517
|
+
<p class="tag_title">Returns:</p>
|
518
|
+
<ul class="return">
|
519
|
+
|
520
|
+
<li>
|
521
|
+
|
522
|
+
|
523
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
</li>
|
528
|
+
|
529
|
+
</ul>
|
530
|
+
|
531
|
+
</div><table class="source_code">
|
532
|
+
<tr>
|
533
|
+
<td>
|
534
|
+
<pre class="lines">
|
535
|
+
|
536
|
+
|
537
|
+
125
|
538
|
+
126
|
539
|
+
127
|
540
|
+
128</pre>
|
541
|
+
</td>
|
542
|
+
<td>
|
543
|
+
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 125</span>
|
544
|
+
|
545
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_insert_placeholder? fid id'>insert_placeholder?</span> <span class='rubyid_sother identifier id'>sother</span><span class='comma token'>,</span> <span class='rubyid_sself identifier id'>sself</span><span class='comma token'>,</span> <span class='rubyid_row_index identifier id'>row_index</span>
|
546
|
+
<span class='lparen token'>(</span><span class='rubyid_sother identifier id'>sother</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='rubyid_or or kw'>or</span> <span class='notop op'>!</span><span class='rubyid_sother identifier id'>sother</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_placeholder? fid id'>placeholder?</span><span class='rparen token'>)</span> <span class='rubyid_and and kw'>and</span>
|
547
|
+
<span class='lparen token'>(</span><span class='rubyid_sself identifier id'>sself</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='rubyid_or or kw'>or</span> <span class='notop op'>!</span><span class='rubyid_sself identifier id'>sself</span><span class='lbrack token'>[</span><span class='rubyid_row_index identifier id'>row_index</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_placeholder? fid id'>placeholder?</span><span class='rparen token'>)</span>
|
548
|
+
<span class='rubyid_end end kw'>end</span>
|
549
|
+
</pre>
|
550
|
+
</td>
|
551
|
+
</tr>
|
552
|
+
</table>
|
553
|
+
</div>
|
554
|
+
|
555
|
+
<div class="method_details ">
|
556
|
+
<h3 class="signature " id="placeholder_row-instance_method">
|
557
|
+
|
558
|
+
- (<tt>Object</tt>) <strong>placeholder_row</strong>
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
</h3><div class="docstring">
|
565
|
+
<div class="discussion">
|
566
|
+
|
567
|
+
<p>returns a placeholder row, for internal use only</p>
|
568
|
+
|
569
|
+
|
570
|
+
</div>
|
571
|
+
</div>
|
572
|
+
<div class="tags">
|
573
|
+
|
574
|
+
|
575
|
+
</div><table class="source_code">
|
576
|
+
<tr>
|
577
|
+
<td>
|
578
|
+
<pre class="lines">
|
579
|
+
|
580
|
+
|
581
|
+
131
|
582
|
+
132
|
583
|
+
133
|
584
|
+
134
|
585
|
+
135
|
586
|
+
136
|
587
|
+
137
|
588
|
+
138
|
589
|
+
139</pre>
|
590
|
+
</td>
|
591
|
+
<td>
|
592
|
+
<pre class="code"><span class="info file"># File 'lib/workbook/modules/table_diff_sort.rb', line 131</span>
|
593
|
+
|
594
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_placeholder_row identifier id'>placeholder_row</span>
|
595
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_@placeholder_row ivar id'>@placeholder_row</span> <span class='neq op'>!=</span> <span class='rubyid_nil nil kw'>nil</span>
|
596
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_@placeholder_row ivar id'>@placeholder_row</span>
|
597
|
+
<span class='rubyid_else else kw'>else</span>
|
598
|
+
<span class='rubyid_@placeholder_row ivar id'>@placeholder_row</span> <span class='assign token'>=</span> <span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Row constant id'>Row</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='lbrack token'>[</span><span class='rubyid_nil nil kw'>nil</span><span class='rbrack token'>]</span>
|
599
|
+
<span class='rubyid_placeholder_row identifier id'>placeholder_row</span><span class='dot token'>.</span><span class='rubyid_placeholder identifier id'>placeholder</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span>
|
600
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_@placeholder_row ivar id'>@placeholder_row</span>
|
601
|
+
<span class='rubyid_end end kw'>end</span>
|
602
|
+
<span class='rubyid_end end kw'>end</span>
|
603
|
+
</pre>
|
604
|
+
</td>
|
605
|
+
</tr>
|
606
|
+
</table>
|
607
|
+
</div>
|
608
|
+
|
609
|
+
</div>
|
610
|
+
|
611
|
+
</div>
|
612
|
+
|
613
|
+
<div id="footer">
|
614
|
+
Generated on Thu Jan 17 13:15:59 2013 by
|
615
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
616
|
+
0.8.3 (ruby-1.8.7).
|
617
|
+
</div>
|
618
|
+
|
619
|
+
</body>
|
620
|
+
</html>
|