workbook 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/.yardoc/checksums +18 -0
  2. data/.yardoc/object_types +3 -0
  3. data/.yardoc/objects/root.dat +0 -0
  4. data/.yardoc/proxy_types +0 -0
  5. data/Gemfile.lock +1 -1
  6. data/{readme.markdown → README.md} +36 -10
  7. data/doc/RubyXL.html +128 -0
  8. data/doc/RubyXL/Cell.html +202 -0
  9. data/doc/RubyXL/Workbook.html +447 -0
  10. data/doc/Workbook.html +130 -0
  11. data/doc/Workbook/Book.html +1484 -0
  12. data/doc/Workbook/Cell.html +1402 -0
  13. data/doc/Workbook/Format.html +654 -0
  14. data/doc/Workbook/Modules.html +117 -0
  15. data/doc/Workbook/Modules/RawObjectsStorage.html +508 -0
  16. data/doc/Workbook/Modules/TableDiffSort.html +620 -0
  17. data/doc/Workbook/Modules/TypeParser.html +1012 -0
  18. data/doc/Workbook/Readers.html +117 -0
  19. data/doc/Workbook/Readers/CsvReader.html +262 -0
  20. data/doc/Workbook/Readers/TxtReader.html +238 -0
  21. data/doc/Workbook/Readers/XlsReader.html +362 -0
  22. data/doc/Workbook/Readers/XlsShared.html +189 -0
  23. data/doc/Workbook/Readers/XlsxReader.html +295 -0
  24. data/doc/Workbook/Row.html +1939 -0
  25. data/doc/Workbook/Sheet.html +528 -0
  26. data/doc/Workbook/Table.html +883 -0
  27. data/doc/Workbook/Template.html +639 -0
  28. data/doc/Workbook/Writers.html +117 -0
  29. data/doc/Workbook/Writers/CsvTableWriter.html +175 -0
  30. data/doc/Workbook/Writers/XlsWriter.html +865 -0
  31. data/doc/_index.html +336 -0
  32. data/doc/class_list.html +53 -0
  33. data/doc/css/common.css +1 -0
  34. data/doc/css/full_list.css +57 -0
  35. data/doc/css/style.css +328 -0
  36. data/doc/file.README.html +236 -0
  37. data/doc/file_list.html +55 -0
  38. data/doc/frames.html +28 -0
  39. data/doc/index.html +236 -0
  40. data/doc/js/app.js +214 -0
  41. data/doc/js/full_list.js +173 -0
  42. data/doc/js/jquery.js +4 -0
  43. data/doc/method_list.html +972 -0
  44. data/doc/top-level-namespace.html +112 -0
  45. data/lib/workbook/book.rb +38 -29
  46. data/lib/workbook/cell.rb +25 -0
  47. data/lib/workbook/format.rb +9 -2
  48. data/lib/workbook/modules/raw_objects_storage.rb +5 -0
  49. data/lib/workbook/modules/table_diff_sort.rb +8 -6
  50. data/lib/workbook/modules/type_parser.rb +16 -3
  51. data/lib/workbook/readers/xls_reader.rb +1 -70
  52. data/lib/workbook/readers/xls_shared.rb +75 -0
  53. data/lib/workbook/row.rb +89 -17
  54. data/lib/workbook/sheet.rb +26 -0
  55. data/lib/workbook/table.rb +20 -1
  56. data/lib/workbook/template.rb +12 -11
  57. data/lib/workbook/writers/xls_writer.rb +19 -77
  58. data/test/test_modules_table_diff_sort.rb +19 -6
  59. data/test/test_row.rb +54 -0
  60. data/test/test_sheet.rb +8 -0
  61. data/test/test_table.rb +22 -3
  62. data/test/test_writers_xls_writer.rb +3 -0
  63. data/workbook.gemspec +1 -1
  64. metadata +46 -3
@@ -0,0 +1,528 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Workbook::Sheet
8
+
9
+ &mdash; 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 (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Workbook.html" title="Workbook (module)">Workbook</a></span></span>
36
+ &raquo;
37
+ <span class="title">Sheet</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Workbook::Sheet
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Array</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Array</li>
82
+
83
+ <li class="next">Workbook::Sheet</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/workbook/sheet.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
109
+ <ul class="summary">
110
+
111
+ <li class="public ">
112
+ <span class="summary_signature">
113
+
114
+ <a href="#book-instance_method" title="#book (instance method)">- (Workbook::Book) <strong>book</strong> </a>
115
+
116
+
117
+
118
+ </span>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'>
132
+ <p>Returns the book this sheet belongs to.</p>
133
+ </div></span>
134
+
135
+ </li>
136
+
137
+
138
+ </ul>
139
+
140
+
141
+
142
+
143
+
144
+ <h2>
145
+ Instance Method Summary
146
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
147
+ </h2>
148
+
149
+ <ul class="summary">
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#has_contents%3F-instance_method" title="#has_contents? (instance method)">- (Boolean) <strong>has_contents?</strong> </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'>
169
+ <p>Returns true if the first table of this sheet contains anything.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Workbook::Sheet) <strong>initialize</strong>(table = Workbook::Table.new([], self), book = nil, options = {}) </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+ <span class="note title constructor">constructor</span>
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+ <span class="summary_desc"><div class='inline'>
195
+ <p>Initialize a new sheet.</p>
196
+ </div></span>
197
+
198
+ </li>
199
+
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#table-instance_method" title="#table (instance method)">- (Workbook::Table) <strong>table</strong> </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ <span class="summary_desc"><div class='inline'>
219
+ <p>Returns the first table of this sheet.</p>
220
+ </div></span>
221
+
222
+ </li>
223
+
224
+
225
+ </ul>
226
+
227
+
228
+
229
+ <div id="constructor_details" class="method_details_list">
230
+ <h2>Constructor Details</h2>
231
+
232
+ <div class="method_details first">
233
+ <h3 class="signature first" id="initialize-instance_method">
234
+
235
+ - (<tt><span class='object_link'><a href="" title="Workbook::Sheet (class)">Workbook::Sheet</a></span></tt>) <strong>initialize</strong>(table = Workbook::Table.new([], self), book = nil, options = {})
236
+
237
+
238
+
239
+
240
+
241
+ </h3><div class="docstring">
242
+ <div class="discussion">
243
+
244
+ <p>Initialize a new sheet</p>
245
+
246
+
247
+ </div>
248
+ </div>
249
+ <div class="tags">
250
+ <p class="tag_title">Parameters:</p>
251
+ <ul class="param">
252
+
253
+ <li>
254
+
255
+ <span class='name'>table</span>
256
+
257
+
258
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>, <tt>Array&lt;Array&gt;</tt>)</span>
259
+
260
+
261
+ <em class="default">(defaults to: <tt>Workbook::Table.new([], self)</tt>)</em>
262
+
263
+
264
+ &mdash;
265
+ <div class='inline'>
266
+ <p>The first table of this sheet</p>
267
+ </div>
268
+
269
+ </li>
270
+
271
+ <li>
272
+
273
+ <span class='name'>book</span>
274
+
275
+
276
+ <span class='type'>(<tt><span class='object_link'><a href="Book.html" title="Workbook::Book (class)">Workbook::Book</a></span></tt>)</span>
277
+
278
+
279
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
280
+
281
+
282
+ &mdash;
283
+ <div class='inline'>
284
+ <p>The book this sheet belongs to</p>
285
+ </div>
286
+
287
+ </li>
288
+
289
+ <li>
290
+
291
+ <span class='name'>options</span>
292
+
293
+
294
+ <span class='type'>(<tt>Hash</tt>)</span>
295
+
296
+
297
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
298
+
299
+
300
+ &mdash;
301
+ <div class='inline'>
302
+ <p>are forwarded to Workbook::Table.new</p>
303
+ </div>
304
+
305
+ </li>
306
+
307
+ </ul>
308
+
309
+
310
+ </div><table class="source_code">
311
+ <tr>
312
+ <td>
313
+ <pre class="lines">
314
+
315
+
316
+ 12</pre>
317
+ </td>
318
+ <td>
319
+ <pre class="code"><span class="info file"># File 'lib/workbook/sheet.rb', line 12</span>
320
+
321
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span> <span class='rubyid_table identifier id'>table</span><span class='assign token'>=</span><span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Table constant id'>Table</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='lbrack token'>[</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_book identifier id'>book</span><span class='assign token'>=</span><span class='rubyid_nil nil kw'>nil</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='rbrace token'>}</span>
322
+ </pre>
323
+ </td>
324
+ </tr>
325
+ </table>
326
+ </div>
327
+
328
+ </div>
329
+
330
+ <div id="instance_attr_details" class="attr_details">
331
+ <h2>Instance Attribute Details</h2>
332
+
333
+
334
+ <span id="book=-instance_method"></span>
335
+ <div class="method_details first">
336
+ <h3 class="signature first" id="book-instance_method">
337
+
338
+ - (<tt><span class='object_link'><a href="Book.html" title="Workbook::Book (class)">Workbook::Book</a></span></tt>) <strong>book</strong>
339
+
340
+
341
+
342
+
343
+
344
+ </h3><div class="docstring">
345
+ <div class="discussion">
346
+
347
+ <p>Returns the book this sheet belongs to</p>
348
+
349
+
350
+ </div>
351
+ </div>
352
+ <div class="tags">
353
+
354
+ <p class="tag_title">Returns:</p>
355
+ <ul class="return">
356
+
357
+ <li>
358
+
359
+
360
+ <span class='type'>(<tt><span class='object_link'><a href="Book.html" title="Workbook::Book (class)">Workbook::Book</a></span></tt>)</span>
361
+
362
+
363
+
364
+ &mdash;
365
+ <div class='inline'>
366
+ <p>the book this sheet belongs to</p>
367
+ </div>
368
+
369
+ </li>
370
+
371
+ </ul>
372
+
373
+ </div><table class="source_code">
374
+ <tr>
375
+ <td>
376
+ <pre class="lines">
377
+
378
+
379
+ 4
380
+ 5
381
+ 6</pre>
382
+ </td>
383
+ <td>
384
+ <pre class="code"><span class="info file"># File 'lib/workbook/sheet.rb', line 4</span>
385
+
386
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_book identifier id'>book</span>
387
+ <span class='rubyid_@book ivar id'>@book</span>
388
+ <span class='rubyid_end end kw'>end</span>
389
+ </pre>
390
+ </td>
391
+ </tr>
392
+ </table>
393
+ </div>
394
+
395
+ </div>
396
+
397
+
398
+ <div id="instance_method_details" class="method_details_list">
399
+ <h2>Instance Method Details</h2>
400
+
401
+
402
+ <div class="method_details first">
403
+ <h3 class="signature first" id="has_contents?-instance_method">
404
+
405
+ - (<tt>Boolean</tt>) <strong>has_contents?</strong>
406
+
407
+
408
+
409
+
410
+
411
+ </h3><div class="docstring">
412
+ <div class="discussion">
413
+
414
+ <p>Returns true if the first table of this sheet contains anything</p>
415
+
416
+
417
+ </div>
418
+ </div>
419
+ <div class="tags">
420
+
421
+ <p class="tag_title">Returns:</p>
422
+ <ul class="return">
423
+
424
+ <li>
425
+
426
+
427
+ <span class='type'>(<tt>Boolean</tt>)</span>
428
+
429
+
430
+
431
+ </li>
432
+
433
+ </ul>
434
+
435
+ </div><table class="source_code">
436
+ <tr>
437
+ <td>
438
+ <pre class="lines">
439
+
440
+
441
+ 25
442
+ 26
443
+ 27</pre>
444
+ </td>
445
+ <td>
446
+ <pre class="code"><span class="info file"># File 'lib/workbook/sheet.rb', line 25</span>
447
+
448
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_has_contents? fid id'>has_contents?</span>
449
+ <span class='rubyid_table identifier id'>table</span><span class='dot token'>.</span><span class='rubyid_has_contents? fid id'>has_contents?</span>
450
+ <span class='rubyid_end end kw'>end</span>
451
+ </pre>
452
+ </td>
453
+ </tr>
454
+ </table>
455
+ </div>
456
+
457
+ <div class="method_details ">
458
+ <h3 class="signature " id="table-instance_method">
459
+
460
+ - (<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>) <strong>table</strong>
461
+
462
+
463
+
464
+
465
+
466
+ </h3><div class="docstring">
467
+ <div class="discussion">
468
+
469
+ <p>Returns the first table of this sheet</p>
470
+
471
+
472
+ </div>
473
+ </div>
474
+ <div class="tags">
475
+
476
+ <p class="tag_title">Returns:</p>
477
+ <ul class="return">
478
+
479
+ <li>
480
+
481
+
482
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>)</span>
483
+
484
+
485
+
486
+ &mdash;
487
+ <div class='inline'>
488
+ <p>the first table of this sheet</p>
489
+ </div>
490
+
491
+ </li>
492
+
493
+ </ul>
494
+
495
+ </div><table class="source_code">
496
+ <tr>
497
+ <td>
498
+ <pre class="lines">
499
+
500
+
501
+ 32
502
+ 33
503
+ 34</pre>
504
+ </td>
505
+ <td>
506
+ <pre class="code"><span class="info file"># File 'lib/workbook/sheet.rb', line 32</span>
507
+
508
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_table identifier id'>table</span>
509
+ <span class='rubyid_first identifier id'>first</span>
510
+ <span class='rubyid_end end kw'>end</span>
511
+ </pre>
512
+ </td>
513
+ </tr>
514
+ </table>
515
+ </div>
516
+
517
+ </div>
518
+
519
+ </div>
520
+
521
+ <div id="footer">
522
+ Generated on Thu Jan 17 13:16:04 2013 by
523
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
524
+ 0.8.3 (ruby-1.8.7).
525
+ </div>
526
+
527
+ </body>
528
+ </html>