workbook 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,883 @@
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::Table
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 (T)</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">Table</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::Table
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::Table</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dt class="r2">Includes:</dt>
96
+ <dd class="r2"><span class='object_link'><a href="Modules/TableDiffSort.html" title="Workbook::Modules::TableDiffSort (module)">Modules::TableDiffSort</a></span>, <span class='object_link'><a href="Writers/CsvTableWriter.html" title="Workbook::Writers::CsvTableWriter (module)">Writers::CsvTableWriter</a></span></dd>
97
+
98
+
99
+
100
+
101
+
102
+ <dt class="r1 last">Defined in:</dt>
103
+ <dd class="r1 last">lib/workbook/table.rb</dd>
104
+
105
+ </dl>
106
+ <div class="clear"></div>
107
+
108
+ <h2>Overview</h2><div class="docstring">
109
+ <div class="discussion">
110
+
111
+ <p>A table is a container of rows and keeps track of the sheet it belongs to
112
+ and which row is its header. Additionally suport for CSV writing and
113
+ diffing with another table is included.</p>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+
123
+
124
+
125
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#header-instance_method" title="#header (instance method)">- (Workbook::Row) <strong>header</strong> </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'>
149
+ <p>Returns the header of this table (typically the first row, but can be a
150
+ different row).</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#sheet-instance_method" title="#sheet (instance method)">- (Object) <strong>sheet</strong> </a>
160
+
161
+
162
+
163
+ </span>
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'>
177
+ <p>Returns the value of attribute sheet.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ </ul>
184
+
185
+
186
+
187
+
188
+
189
+ <h2>
190
+ Instance Method Summary
191
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
192
+ </h2>
193
+
194
+ <ul class="summary">
195
+
196
+ <li class="public ">
197
+ <span class="summary_signature">
198
+
199
+ <a href="#%3C%3C-instance_method" title="#&lt;&lt; (instance method)">- (Object) <strong>&lt;&lt;</strong>(row) </a>
200
+
201
+
202
+
203
+ </span>
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <span class="summary_desc"><div class='inline'></div></span>
214
+
215
+ </li>
216
+
217
+
218
+ <li class="public ">
219
+ <span class="summary_signature">
220
+
221
+ <a href="#contains_row%3F-instance_method" title="#contains_row? (instance method)">- (Boolean) <strong>contains_row?</strong>(row) </a>
222
+
223
+
224
+
225
+ </span>
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+ <span class="summary_desc"><div class='inline'></div></span>
236
+
237
+ </li>
238
+
239
+
240
+ <li class="public ">
241
+ <span class="summary_signature">
242
+
243
+ <a href="#create_or_open_row_at-instance_method" title="#create_or_open_row_at (instance method)">- (Object) <strong>create_or_open_row_at</strong>(index) </a>
244
+
245
+
246
+
247
+ </span>
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+ <span class="summary_desc"><div class='inline'></div></span>
258
+
259
+ </li>
260
+
261
+
262
+ <li class="public ">
263
+ <span class="summary_signature">
264
+
265
+ <a href="#has_contents%3F-instance_method" title="#has_contents? (instance method)">- (Boolean) <strong>has_contents?</strong> </a>
266
+
267
+
268
+
269
+ </span>
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+ <span class="summary_desc"><div class='inline'></div></span>
280
+
281
+ </li>
282
+
283
+
284
+ <li class="public ">
285
+ <span class="summary_signature">
286
+
287
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Table) <strong>initialize</strong>(row_cel_values = [], sheet = nil, options = {}) </a>
288
+
289
+
290
+
291
+ </span>
292
+
293
+
294
+ <span class="note title constructor">constructor</span>
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+ <span class="summary_desc"><div class='inline'>
304
+ <p>A new instance of Table.</p>
305
+ </div></span>
306
+
307
+ </li>
308
+
309
+
310
+ <li class="public ">
311
+ <span class="summary_signature">
312
+
313
+ <a href="#new_row-instance_method" title="#new_row (instance method)">- (Object) <strong>new_row</strong>(cell_values = []) </a>
314
+
315
+
316
+
317
+ </span>
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <span class="summary_desc"><div class='inline'>
328
+ <p>Generates a new row, with optionally predefined cell-values, that is
329
+ already connected to this table.</p>
330
+ </div></span>
331
+
332
+ </li>
333
+
334
+
335
+ <li class="public ">
336
+ <span class="summary_signature">
337
+
338
+ <a href="#push-instance_method" title="#push (instance method)">- (Object) <strong>push</strong>(row) </a>
339
+
340
+
341
+
342
+ </span>
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+ <span class="summary_desc"><div class='inline'></div></span>
353
+
354
+ </li>
355
+
356
+
357
+ <li class="public ">
358
+ <span class="summary_signature">
359
+
360
+ <a href="#remove_empty_lines%21-instance_method" title="#remove_empty_lines! (instance method)">- (Object) <strong>remove_empty_lines!</strong> </a>
361
+
362
+
363
+
364
+ </span>
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <span class="summary_desc"><div class='inline'></div></span>
375
+
376
+ </li>
377
+
378
+
379
+ </ul>
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Writers/CsvTableWriter.html" title="Workbook::Writers::CsvTableWriter (module)">Writers::CsvTableWriter</a></span></h3>
392
+ <p class="inherited"><span class='object_link'><a href="Writers/CsvTableWriter.html#to_csv-instance_method" title="Workbook::Writers::CsvTableWriter#to_csv (method)">#to_csv</a></span></p>
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Modules/TableDiffSort.html" title="Workbook::Modules::TableDiffSort (module)">Modules::TableDiffSort</a></span></h3>
403
+ <p class="inherited"><span class='object_link'><a href="Modules/TableDiffSort.html#align-instance_method" title="Workbook::Modules::TableDiffSort#align (method)">#align</a></span>, <span class='object_link'><a href="Modules/TableDiffSort.html#align_row-instance_method" title="Workbook::Modules::TableDiffSort#align_row (method)">#align_row</a></span>, <span class='object_link'><a href="Modules/TableDiffSort.html#diff-instance_method" title="Workbook::Modules::TableDiffSort#diff (method)">#diff</a></span>, <span class='object_link'><a href="Modules/TableDiffSort.html#diff_template-instance_method" title="Workbook::Modules::TableDiffSort#diff_template (method)">#diff_template</a></span>, <span class='object_link'><a href="Modules/TableDiffSort.html#insert_placeholder%3F-instance_method" title="Workbook::Modules::TableDiffSort#insert_placeholder? (method)">#insert_placeholder?</a></span>, <span class='object_link'><a href="Modules/TableDiffSort.html#placeholder_row-instance_method" title="Workbook::Modules::TableDiffSort#placeholder_row (method)">#placeholder_row</a></span></p>
404
+
405
+ <div id="constructor_details" class="method_details_list">
406
+ <h2>Constructor Details</h2>
407
+
408
+ <div class="method_details first">
409
+ <h3 class="signature first" id="initialize-instance_method">
410
+
411
+ - (<tt><span class='object_link'><a href="" title="Workbook::Table (class)">Table</a></span></tt>) <strong>initialize</strong>(row_cel_values = [], sheet = nil, options = {})
412
+
413
+
414
+
415
+
416
+
417
+ </h3><div class="docstring">
418
+ <div class="discussion">
419
+
420
+ <p>A new instance of Table</p>
421
+
422
+
423
+ </div>
424
+ </div>
425
+ <div class="tags">
426
+
427
+
428
+ </div><table class="source_code">
429
+ <tr>
430
+ <td>
431
+ <pre class="lines">
432
+
433
+
434
+ 13</pre>
435
+ </td>
436
+ <td>
437
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 13</span>
438
+
439
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span> <span class='rubyid_row_cel_values identifier id'>row_cel_values</span><span class='assign token'>=</span><span class='lbrack token'>[</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='rubyid_sheet identifier id'>sheet</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>
440
+ </pre>
441
+ </td>
442
+ </tr>
443
+ </table>
444
+ </div>
445
+
446
+ </div>
447
+
448
+ <div id="instance_attr_details" class="attr_details">
449
+ <h2>Instance Attribute Details</h2>
450
+
451
+
452
+ <span id="header=-instance_method"></span>
453
+ <div class="method_details first">
454
+ <h3 class="signature first" id="header-instance_method">
455
+
456
+ - (<tt><span class='object_link'><a href="Row.html" title="Workbook::Row (class)">Workbook::Row</a></span></tt>) <strong>header</strong>
457
+
458
+
459
+
460
+
461
+
462
+ </h3><div class="docstring">
463
+ <div class="discussion">
464
+
465
+ <p>Returns the header of this table (typically the first row, but can be a
466
+ different row). The header row is also used for finding values in a
467
+ aribrary row.</p>
468
+
469
+
470
+ </div>
471
+ </div>
472
+ <div class="tags">
473
+
474
+ <p class="tag_title">Returns:</p>
475
+ <ul class="return">
476
+
477
+ <li>
478
+
479
+
480
+ <span class='type'>(<tt><span class='object_link'><a href="Row.html" title="Workbook::Row (class)">Workbook::Row</a></span></tt>)</span>
481
+
482
+
483
+
484
+ &mdash;
485
+ <div class='inline'>
486
+ <p>The header</p>
487
+ </div>
488
+
489
+ </li>
490
+
491
+ </ul>
492
+
493
+ </div><table class="source_code">
494
+ <tr>
495
+ <td>
496
+ <pre class="lines">
497
+
498
+
499
+ 30
500
+ 31
501
+ 32</pre>
502
+ </td>
503
+ <td>
504
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 30</span>
505
+
506
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_header identifier id'>header</span>
507
+ <span class='rubyid_@header ivar id'>@header</span>
508
+ <span class='rubyid_end end kw'>end</span>
509
+ </pre>
510
+ </td>
511
+ </tr>
512
+ </table>
513
+ </div>
514
+
515
+
516
+ <span id="sheet=-instance_method"></span>
517
+ <div class="method_details ">
518
+ <h3 class="signature " id="sheet-instance_method">
519
+
520
+ - (<tt>Object</tt>) <strong>sheet</strong>
521
+
522
+
523
+
524
+
525
+
526
+ </h3><div class="docstring">
527
+ <div class="discussion">
528
+
529
+ <p>Returns the value of attribute sheet</p>
530
+
531
+
532
+ </div>
533
+ </div>
534
+ <div class="tags">
535
+
536
+
537
+ </div><table class="source_code">
538
+ <tr>
539
+ <td>
540
+ <pre class="lines">
541
+
542
+
543
+ 10
544
+ 11
545
+ 12</pre>
546
+ </td>
547
+ <td>
548
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 10</span>
549
+
550
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_sheet identifier id'>sheet</span>
551
+ <span class='rubyid_@sheet ivar id'>@sheet</span>
552
+ <span class='rubyid_end end kw'>end</span>
553
+ </pre>
554
+ </td>
555
+ </tr>
556
+ </table>
557
+ </div>
558
+
559
+ </div>
560
+
561
+
562
+ <div id="instance_method_details" class="method_details_list">
563
+ <h2>Instance Method Details</h2>
564
+
565
+
566
+ <div class="method_details first">
567
+ <h3 class="signature first" id="<<-instance_method">
568
+
569
+ - (<tt>Object</tt>) <strong>&lt;&lt;</strong>(row)
570
+
571
+
572
+
573
+
574
+
575
+ </h3><table class="source_code">
576
+ <tr>
577
+ <td>
578
+ <pre class="lines">
579
+
580
+
581
+ 65
582
+ 66
583
+ 67
584
+ 68</pre>
585
+ </td>
586
+ <td>
587
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 65</span>
588
+
589
+ <span class='rubyid_def def kw'>def</span> <span class='lshft op'>&lt;&lt;</span><span class='lparen token'>(</span><span class='rubyid_row identifier id'>row</span><span class='rparen token'>)</span>
590
+ <span class='rubyid_super super kw'>super</span><span class='lparen token'>(</span><span class='rubyid_row identifier id'>row</span><span class='rparen token'>)</span>
591
+ <span class='rubyid_row identifier id'>row</span><span class='dot token'>.</span><span class='rubyid_set_table identifier id'>set_table</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span>
592
+ <span class='rubyid_end end kw'>end</span>
593
+ </pre>
594
+ </td>
595
+ </tr>
596
+ </table>
597
+ </div>
598
+
599
+ <div class="method_details ">
600
+ <h3 class="signature " id="contains_row?-instance_method">
601
+
602
+ - (<tt>Boolean</tt>) <strong>contains_row?</strong>(row)
603
+
604
+
605
+
606
+
607
+
608
+ </h3><div class="docstring">
609
+ <div class="discussion">
610
+
611
+
612
+ </div>
613
+ </div>
614
+ <div class="tags">
615
+
616
+ <p class="tag_title">Returns:</p>
617
+ <ul class="return">
618
+
619
+ <li>
620
+
621
+
622
+ <span class='type'>(<tt>Boolean</tt>)</span>
623
+
624
+
625
+
626
+ </li>
627
+
628
+ </ul>
629
+ <p class="tag_title">Raises:</p>
630
+ <ul class="raise">
631
+
632
+ <li>
633
+
634
+
635
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
636
+
637
+
638
+
639
+ </li>
640
+
641
+ </ul>
642
+
643
+ </div><table class="source_code">
644
+ <tr>
645
+ <td>
646
+ <pre class="lines">
647
+
648
+
649
+ 74
650
+ 75
651
+ 76
652
+ 77</pre>
653
+ </td>
654
+ <td>
655
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 74</span>
656
+
657
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_contains_row? fid id'>contains_row?</span> <span class='rubyid_row identifier id'>row</span>
658
+ <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='dstring node'>&quot;table should be a Workbook::Row (you passed a #{t.class})&quot;</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_row identifier id'>row</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen 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='rparen token'>)</span>
659
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_collect identifier id'>collect</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_r identifier id'>r</span><span class='bitor op'>|</span> <span class='rubyid_r identifier id'>r</span><span class='dot token'>.</span><span class='rubyid_object_id identifier id'>object_id</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span> <span class='rubyid_row identifier id'>row</span><span class='dot token'>.</span><span class='rubyid_object_id identifier id'>object_id</span>
660
+ <span class='rubyid_end end kw'>end</span>
661
+ </pre>
662
+ </td>
663
+ </tr>
664
+ </table>
665
+ </div>
666
+
667
+ <div class="method_details ">
668
+ <h3 class="signature " id="create_or_open_row_at-instance_method">
669
+
670
+ - (<tt>Object</tt>) <strong>create_or_open_row_at</strong>(index)
671
+
672
+
673
+
674
+
675
+
676
+ </h3><table class="source_code">
677
+ <tr>
678
+ <td>
679
+ <pre class="lines">
680
+
681
+
682
+ 46
683
+ 47
684
+ 48
685
+ 49
686
+ 50
687
+ 51
688
+ 52
689
+ 53</pre>
690
+ </td>
691
+ <td>
692
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 46</span>
693
+
694
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_create_or_open_row_at identifier id'>create_or_open_row_at</span> <span class='rubyid_index identifier id'>index</span>
695
+ <span class='rubyid_r identifier id'>r</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span>
696
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_r identifier id'>r</span> <span class='eq op'>==</span> <span class='rubyid_nil nil kw'>nil</span>
697
+ <span class='rubyid_r identifier id'>r</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>
698
+ <span class='rubyid_r identifier id'>r</span><span class='dot token'>.</span><span class='rubyid_table identifier id'>table</span><span class='assign token'>=</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span>
699
+ <span class='rubyid_end end kw'>end</span>
700
+ <span class='rubyid_r identifier id'>r</span>
701
+ <span class='rubyid_end end kw'>end</span>
702
+ </pre>
703
+ </td>
704
+ </tr>
705
+ </table>
706
+ </div>
707
+
708
+ <div class="method_details ">
709
+ <h3 class="signature " id="has_contents?-instance_method">
710
+
711
+ - (<tt>Boolean</tt>) <strong>has_contents?</strong>
712
+
713
+
714
+
715
+
716
+
717
+ </h3><div class="docstring">
718
+ <div class="discussion">
719
+
720
+
721
+ </div>
722
+ </div>
723
+ <div class="tags">
724
+
725
+ <p class="tag_title">Returns:</p>
726
+ <ul class="return">
727
+
728
+ <li>
729
+
730
+
731
+ <span class='type'>(<tt>Boolean</tt>)</span>
732
+
733
+
734
+
735
+ </li>
736
+
737
+ </ul>
738
+
739
+ </div><table class="source_code">
740
+ <tr>
741
+ <td>
742
+ <pre class="lines">
743
+
744
+
745
+ 70
746
+ 71
747
+ 72</pre>
748
+ </td>
749
+ <td>
750
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 70</span>
751
+
752
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_has_contents? fid id'>has_contents?</span>
753
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_clone identifier id'>clone</span><span class='dot token'>.</span><span class='rubyid_remove_empty_lines! fid id'>remove_empty_lines!</span><span class='dot token'>.</span><span class='rubyid_count identifier id'>count</span> <span class='neq op'>!=</span> <span class='integer val'>0</span>
754
+ <span class='rubyid_end end kw'>end</span>
755
+ </pre>
756
+ </td>
757
+ </tr>
758
+ </table>
759
+ </div>
760
+
761
+ <div class="method_details ">
762
+ <h3 class="signature " id="new_row-instance_method">
763
+
764
+ - (<tt>Object</tt>) <strong>new_row</strong>(cell_values = [])
765
+
766
+
767
+
768
+
769
+
770
+ </h3><div class="docstring">
771
+ <div class="discussion">
772
+
773
+ <p>Generates a new row, with optionally predefined cell-values, that is
774
+ already connected to this table.</p>
775
+
776
+
777
+ </div>
778
+ </div>
779
+ <div class="tags">
780
+
781
+
782
+ </div><table class="source_code">
783
+ <tr>
784
+ <td>
785
+ <pre class="lines">
786
+
787
+
788
+ 41
789
+ 42
790
+ 43
791
+ 44</pre>
792
+ </td>
793
+ <td>
794
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 41</span>
795
+
796
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_new_row identifier id'>new_row</span> <span class='rubyid_cell_values identifier id'>cell_values</span><span class='assign token'>=</span><span class='lbrack token'>[</span><span class='rbrack token'>]</span>
797
+ <span class='rubyid_r identifier id'>r</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='lparen token'>(</span><span class='rubyid_cell_values identifier id'>cell_values</span><span class='comma token'>,</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span>
798
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_r identifier id'>r</span>
799
+ <span class='rubyid_end end kw'>end</span>
800
+ </pre>
801
+ </td>
802
+ </tr>
803
+ </table>
804
+ </div>
805
+
806
+ <div class="method_details ">
807
+ <h3 class="signature " id="push-instance_method">
808
+
809
+ - (<tt>Object</tt>) <strong>push</strong>(row)
810
+
811
+
812
+
813
+
814
+
815
+ </h3><table class="source_code">
816
+ <tr>
817
+ <td>
818
+ <pre class="lines">
819
+
820
+
821
+ 60
822
+ 61
823
+ 62
824
+ 63</pre>
825
+ </td>
826
+ <td>
827
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 60</span>
828
+
829
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_push identifier id'>push</span><span class='lparen token'>(</span><span class='rubyid_row identifier id'>row</span><span class='rparen token'>)</span>
830
+ <span class='rubyid_super super kw'>super</span><span class='lparen token'>(</span><span class='rubyid_row identifier id'>row</span><span class='rparen token'>)</span>
831
+ <span class='rubyid_row identifier id'>row</span><span class='dot token'>.</span><span class='rubyid_set_table identifier id'>set_table</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span>
832
+ <span class='rubyid_end end kw'>end</span>
833
+ </pre>
834
+ </td>
835
+ </tr>
836
+ </table>
837
+ </div>
838
+
839
+ <div class="method_details ">
840
+ <h3 class="signature " id="remove_empty_lines!-instance_method">
841
+
842
+ - (<tt>Object</tt>) <strong>remove_empty_lines!</strong>
843
+
844
+
845
+
846
+
847
+
848
+ </h3><table class="source_code">
849
+ <tr>
850
+ <td>
851
+ <pre class="lines">
852
+
853
+
854
+ 55
855
+ 56
856
+ 57
857
+ 58</pre>
858
+ </td>
859
+ <td>
860
+ <pre class="code"><span class="info file"># File 'lib/workbook/table.rb', line 55</span>
861
+
862
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_remove_empty_lines! fid id'>remove_empty_lines!</span>
863
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_delete_if identifier id'>delete_if</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_r identifier id'>r</span><span class='bitor op'>|</span> <span class='rubyid_r identifier id'>r</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='rubyid_or or kw'>or</span> <span class='rubyid_r identifier id'>r</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span><span class='dot token'>.</span><span class='rubyid_empty? fid id'>empty?</span><span class='rbrace token'>}</span>
864
+ <span class='rubyid_self self kw'>self</span>
865
+ <span class='rubyid_end end kw'>end</span>
866
+ </pre>
867
+ </td>
868
+ </tr>
869
+ </table>
870
+ </div>
871
+
872
+ </div>
873
+
874
+ </div>
875
+
876
+ <div id="footer">
877
+ Generated on Thu Jan 17 13:16:05 2013 by
878
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
879
+ 0.8.3 (ruby-1.8.7).
880
+ </div>
881
+
882
+ </body>
883
+ </html>