workbook 0.4.13 → 0.4.14

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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/lib/workbook/modules/cell.rb +14 -0
  4. data/lib/workbook/version.rb +1 -1
  5. data/test/test_modules_cache.rb +14 -14
  6. data/test/test_modules_cell.rb +9 -2
  7. data/test/test_readers_xls_reader.rb +1 -1
  8. metadata +4 -46
  9. data/doc/RubyXL/Cell.html +0 -201
  10. data/doc/RubyXL/Workbook.html +0 -449
  11. data/doc/RubyXL.html +0 -128
  12. data/doc/Workbook/Book.html +0 -1852
  13. data/doc/Workbook/Cell.html +0 -1553
  14. data/doc/Workbook/Format.html +0 -1168
  15. data/doc/Workbook/Modules/RawObjectsStorage.html +0 -502
  16. data/doc/Workbook/Modules/TableDiffSort.html +0 -758
  17. data/doc/Workbook/Modules/TypeParser.html +0 -1063
  18. data/doc/Workbook/Modules.html +0 -117
  19. data/doc/Workbook/NilValue.html +0 -434
  20. data/doc/Workbook/Readers/CsvReader.html +0 -324
  21. data/doc/Workbook/Readers/OdsReader.html +0 -1066
  22. data/doc/Workbook/Readers/TxtReader.html +0 -236
  23. data/doc/Workbook/Readers/XlsReader.html +0 -378
  24. data/doc/Workbook/Readers/XlsShared.html +0 -188
  25. data/doc/Workbook/Readers/XlsxReader.html +0 -302
  26. data/doc/Workbook/Readers.html +0 -117
  27. data/doc/Workbook/Row.html +0 -2392
  28. data/doc/Workbook/Sheet.html +0 -875
  29. data/doc/Workbook/Table.html +0 -1732
  30. data/doc/Workbook/Template.html +0 -634
  31. data/doc/Workbook/Writers/CsvTableWriter.html +0 -200
  32. data/doc/Workbook/Writers/HtmlWriter.html +0 -407
  33. data/doc/Workbook/Writers/XlsWriter.html +0 -905
  34. data/doc/Workbook/Writers.html +0 -117
  35. data/doc/Workbook.html +0 -142
  36. data/doc/_index.html +0 -381
  37. data/doc/class_list.html +0 -53
  38. data/doc/css/common.css +0 -1
  39. data/doc/css/full_list.css +0 -57
  40. data/doc/css/style.css +0 -338
  41. data/doc/file.README.html +0 -245
  42. data/doc/file_list.html +0 -55
  43. data/doc/frames.html +0 -28
  44. data/doc/index.html +0 -245
  45. data/doc/js/app.js +0 -214
  46. data/doc/js/full_list.js +0 -173
  47. data/doc/js/jquery.js +0 -4
  48. data/doc/method_list.html +0 -1308
  49. data/doc/top-level-namespace.html +0 -112
  50. data/test/artifacts/floats_problem.xls +0 -0
@@ -1,1168 +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
- Class: Workbook::Format
8
-
9
- &mdash; 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 (F)</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">Format</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::Format
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">Hash</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Hash</li>
82
-
83
- <li class="next">Workbook::Format</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/RawObjectsStorage.html" title="Workbook::Modules::RawObjectsStorage (module)">Modules::RawObjectsStorage</a></span></dd>
97
-
98
-
99
-
100
-
101
-
102
- <dt class="r1 last">Defined in:</dt>
103
- <dd class="r1 last">lib/workbook/format.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>Format is an object used for maintinaing a cell's formatting. It can belong
112
- to many cells. It maintains a relation to the raw template's equivalent, to
113
- preserve attributes Workbook cannot modify/access.</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="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</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 value of attribute name.</p>
150
- </div></span>
151
-
152
- </li>
153
-
154
-
155
- <li class="public ">
156
- <span class="summary_signature">
157
-
158
- <a href="#parent-instance_method" title="#parent (instance method)">- (Object) <strong>parent</strong> </a>
159
-
160
-
161
-
162
- </span>
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
- <span class="summary_desc"><div class='inline'>
176
- <p>Returns the value of attribute parent.</p>
177
- </div></span>
178
-
179
- </li>
180
-
181
-
182
- </ul>
183
-
184
-
185
-
186
-
187
-
188
- <h2>
189
- Instance Method Summary
190
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
191
- </h2>
192
-
193
- <ul class="summary">
194
-
195
- <li class="public ">
196
- <span class="summary_signature">
197
-
198
- <a href="#all_names-instance_method" title="#all_names (instance method)">- (Array&lt;String&gt;) <strong>all_names</strong> </a>
199
-
200
-
201
-
202
- </span>
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
- <span class="summary_desc"><div class='inline'>
213
- <p>returns an array of all format-names this style is inheriting from (and
214
- this style).</p>
215
- </div></span>
216
-
217
- </li>
218
-
219
-
220
- <li class="public ">
221
- <span class="summary_signature">
222
-
223
- <a href="#flattened-instance_method" title="#flattened (instance method)">- (Workbook::Format) <strong>flattened</strong> </a>
224
-
225
-
226
-
227
- </span>
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
- <span class="summary_desc"><div class='inline'>
238
- <p>Applies the formatting options of self with its parents until no parent can
239
- be found.</p>
240
- </div></span>
241
-
242
- </li>
243
-
244
-
245
- <li class="public ">
246
- <span class="summary_signature">
247
-
248
- <a href="#formats-instance_method" title="#formats (instance method)">- (Array&lt;Workbook::Format&gt;) <strong>formats</strong> </a>
249
-
250
-
251
-
252
- </span>
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
- <span class="summary_desc"><div class='inline'>
263
- <p>returns an array of all formats this style is inheriting from (including
264
- itself).</p>
265
- </div></span>
266
-
267
- </li>
268
-
269
-
270
- <li class="public ">
271
- <span class="summary_signature">
272
-
273
- <a href="#has_background_color%3F-instance_method" title="#has_background_color? (instance method)">- (Boolean) <strong>has_background_color?</strong>(color = :any) </a>
274
-
275
-
276
-
277
- </span>
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
- <span class="summary_desc"><div class='inline'>
288
- <p>Does the current format feature a background <b>color</b>? (not black or
289
- white or transparant).</p>
290
- </div></span>
291
-
292
- </li>
293
-
294
-
295
- <li class="public ">
296
- <span class="summary_signature">
297
-
298
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Format) <strong>initialize</strong>(options = {}, name = nil) </a>
299
-
300
-
301
-
302
- </span>
303
-
304
-
305
- <span class="note title constructor">constructor</span>
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
- <span class="summary_desc"><div class='inline'>
315
- <p>Initialize.</p>
316
- </div></span>
317
-
318
- </li>
319
-
320
-
321
- <li class="public ">
322
- <span class="summary_signature">
323
-
324
- <a href="#merge-instance_method" title="#merge (instance method)">- (Workbook::Format) <strong>merge</strong>(other_format) </a>
325
-
326
-
327
-
328
- </span>
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
-
337
-
338
- <span class="summary_desc"><div class='inline'>
339
- <p>Combines the formatting options of one with another, removes as a
340
- consequence the reference to the raw object's equivalent.</p>
341
- </div></span>
342
-
343
- </li>
344
-
345
-
346
- <li class="public ">
347
- <span class="summary_signature">
348
-
349
- <a href="#merge%21-instance_method" title="#merge! (instance method)">- (Workbook::Format) <strong>merge!</strong>(other_format) </a>
350
-
351
-
352
-
353
- </span>
354
-
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
- <span class="summary_desc"><div class='inline'>
364
- <p>Applies the formatting options of self with another, removes as a
365
- consequence the reference to the raw object's equivalent.</p>
366
- </div></span>
367
-
368
- </li>
369
-
370
-
371
- <li class="public ">
372
- <span class="summary_signature">
373
-
374
- <a href="#merge_hash-instance_method" title="#merge_hash (instance method)">- (Object) <strong>merge_hash</strong> </a>
375
-
376
-
377
-
378
- </span>
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
- <span class="summary_desc"><div class='inline'></div></span>
389
-
390
- </li>
391
-
392
-
393
- <li class="public ">
394
- <span class="summary_signature">
395
-
396
- <a href="#merge_hash%21-instance_method" title="#merge_hash! (instance method)">- (Object) <strong>merge_hash!</strong> </a>
397
-
398
-
399
-
400
- </span>
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
- <span class="summary_desc"><div class='inline'></div></span>
411
-
412
- </li>
413
-
414
-
415
- <li class="public ">
416
- <span class="summary_signature">
417
-
418
- <a href="#to_css-instance_method" title="#to_css (instance method)">- (Object) <strong>to_css</strong> </a>
419
-
420
-
421
-
422
- </span>
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432
- <span class="summary_desc"><div class='inline'>
433
- <p>Returns a string that can be used as inline cell styling (e.g. `&lt;td
434
- style="&lt;%=cell.format.to_css%&gt;"&gt;&lt;%=cell%&gt;&lt;/td&gt;`).</p>
435
- </div></span>
436
-
437
- </li>
438
-
439
-
440
- </ul>
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
-
452
- <h3 class="inherited">Methods included from <span class='object_link'><a href="Modules/RawObjectsStorage.html" title="Workbook::Modules::RawObjectsStorage (module)">Modules::RawObjectsStorage</a></span></h3>
453
- <p class="inherited"><span class='object_link'><a href="Modules/RawObjectsStorage.html#add_raw-instance_method" title="Workbook::Modules::RawObjectsStorage#add_raw (method)">#add_raw</a></span>, <span class='object_link'><a href="Modules/RawObjectsStorage.html#has_raw_for%3F-instance_method" title="Workbook::Modules::RawObjectsStorage#has_raw_for? (method)">#has_raw_for?</a></span>, <span class='object_link'><a href="Modules/RawObjectsStorage.html#raws-instance_method" title="Workbook::Modules::RawObjectsStorage#raws (method)">#raws</a></span>, <span class='object_link'><a href="Modules/RawObjectsStorage.html#remove_all_raws%21-instance_method" title="Workbook::Modules::RawObjectsStorage#remove_all_raws! (method)">#remove_all_raws!</a></span>, <span class='object_link'><a href="Modules/RawObjectsStorage.html#return_raw_for-instance_method" title="Workbook::Modules::RawObjectsStorage#return_raw_for (method)">#return_raw_for</a></span></p>
454
-
455
- <div id="constructor_details" class="method_details_list">
456
- <h2>Constructor Details</h2>
457
-
458
- <div class="method_details first">
459
- <h3 class="signature first" id="initialize-instance_method">
460
-
461
- - (<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Format</a></span></tt>) <strong>initialize</strong>(options = {}, name = nil)
462
-
463
-
464
-
465
-
466
-
467
- </h3><div class="docstring">
468
- <div class="discussion">
469
-
470
- <p>Initialize</p>
471
-
472
-
473
- </div>
474
- </div>
475
- <div class="tags">
476
- <p class="tag_title">Parameters:</p>
477
- <ul class="param">
478
-
479
- <li>
480
-
481
- <span class='name'>options</span>
482
-
483
-
484
- <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>, <tt>Hash</tt>)</span>
485
-
486
-
487
- <em class="default">(defaults to: <tt>{}</tt>)</em>
488
-
489
-
490
- &mdash;
491
- <div class='inline'>
492
- <p>(e.g. :background, :color</p>
493
- </div>
494
-
495
- </li>
496
-
497
- </ul>
498
-
499
-
500
- </div><table class="source_code">
501
- <tr>
502
- <td>
503
- <pre class="lines">
504
-
505
-
506
- 14
507
- 15
508
- 16
509
- 17</pre>
510
- </td>
511
- <td>
512
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 14</span>
513
-
514
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='op'>=</span><span class='kw'>nil</span>
515
- <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span><span class='op'>=</span><span class='id identifier rubyid_v'>v</span><span class='rbrace'>}</span>
516
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
517
- <span class='kw'>end</span></pre>
518
- </td>
519
- </tr>
520
- </table>
521
- </div>
522
-
523
- </div>
524
-
525
- <div id="instance_attr_details" class="attr_details">
526
- <h2>Instance Attribute Details</h2>
527
-
528
-
529
- <span id="name=-instance_method"></span>
530
- <div class="method_details first">
531
- <h3 class="signature first" id="name-instance_method">
532
-
533
- - (<tt>Object</tt>) <strong>name</strong>
534
-
535
-
536
-
537
-
538
-
539
- </h3><div class="docstring">
540
- <div class="discussion">
541
-
542
- <p>Returns the value of attribute name</p>
543
-
544
-
545
- </div>
546
- </div>
547
- <div class="tags">
548
-
549
-
550
- </div><table class="source_code">
551
- <tr>
552
- <td>
553
- <pre class="lines">
554
-
555
-
556
- 10
557
- 11
558
- 12</pre>
559
- </td>
560
- <td>
561
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 10</span>
562
-
563
- <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
564
- <span class='ivar'>@name</span>
565
- <span class='kw'>end</span></pre>
566
- </td>
567
- </tr>
568
- </table>
569
- </div>
570
-
571
-
572
- <span id="parent=-instance_method"></span>
573
- <div class="method_details ">
574
- <h3 class="signature " id="parent-instance_method">
575
-
576
- - (<tt>Object</tt>) <strong>parent</strong>
577
-
578
-
579
-
580
-
581
-
582
- </h3><div class="docstring">
583
- <div class="discussion">
584
-
585
- <p>Returns the value of attribute parent</p>
586
-
587
-
588
- </div>
589
- </div>
590
- <div class="tags">
591
-
592
-
593
- </div><table class="source_code">
594
- <tr>
595
- <td>
596
- <pre class="lines">
597
-
598
-
599
- 10
600
- 11
601
- 12</pre>
602
- </td>
603
- <td>
604
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 10</span>
605
-
606
- <span class='kw'>def</span> <span class='id identifier rubyid_parent'>parent</span>
607
- <span class='ivar'>@parent</span>
608
- <span class='kw'>end</span></pre>
609
- </td>
610
- </tr>
611
- </table>
612
- </div>
613
-
614
- </div>
615
-
616
-
617
- <div id="instance_method_details" class="method_details_list">
618
- <h2>Instance Method Details</h2>
619
-
620
-
621
- <div class="method_details first">
622
- <h3 class="signature first" id="all_names-instance_method">
623
-
624
- - (<tt>Array&lt;String&gt;</tt>) <strong>all_names</strong>
625
-
626
-
627
-
628
-
629
-
630
- </h3><div class="docstring">
631
- <div class="discussion">
632
-
633
- <p>returns an array of all format-names this style is inheriting from (and
634
- this style)</p>
635
-
636
-
637
- </div>
638
- </div>
639
- <div class="tags">
640
-
641
- <p class="tag_title">Returns:</p>
642
- <ul class="return">
643
-
644
- <li>
645
-
646
-
647
- <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
648
-
649
-
650
-
651
- &mdash;
652
- <div class='inline'>
653
- <p>an array of Workbook::Formats</p>
654
- </div>
655
-
656
- </li>
657
-
658
- </ul>
659
-
660
- </div><table class="source_code">
661
- <tr>
662
- <td>
663
- <pre class="lines">
664
-
665
-
666
- 69
667
- 70
668
- 71</pre>
669
- </td>
670
- <td>
671
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 69</span>
672
-
673
- <span class='kw'>def</span> <span class='id identifier rubyid_all_names'>all_names</span>
674
- <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span>
675
- <span class='kw'>end</span></pre>
676
- </td>
677
- </tr>
678
- </table>
679
- </div>
680
-
681
- <div class="method_details ">
682
- <h3 class="signature " id="flattened-instance_method">
683
-
684
- - (<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>) <strong>flattened</strong>
685
-
686
-
687
-
688
-
689
-
690
- </h3><div class="docstring">
691
- <div class="discussion">
692
-
693
- <p>Applies the formatting options of self with its parents until no parent can
694
- be found</p>
695
-
696
-
697
- </div>
698
- </div>
699
- <div class="tags">
700
-
701
- <p class="tag_title">Returns:</p>
702
- <ul class="return">
703
-
704
- <li>
705
-
706
-
707
- <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>)</span>
708
-
709
-
710
-
711
- &mdash;
712
- <div class='inline'>
713
- <p>new Workbook::Format that is the result of merging current style with all
714
- its parent’s styles.</p>
715
- </div>
716
-
717
- </li>
718
-
719
- </ul>
720
-
721
- </div><table class="source_code">
722
- <tr>
723
- <td>
724
- <pre class="lines">
725
-
726
-
727
- 75
728
- 76
729
- 77
730
- 78
731
- 79</pre>
732
- </td>
733
- <td>
734
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 75</span>
735
-
736
- <span class='kw'>def</span> <span class='id identifier rubyid_flattened'>flattened</span>
737
- <span class='id identifier rubyid_ff'>ff</span><span class='op'>=</span><span class='const'>Workbook</span><span class='op'>::</span><span class='const'>Format</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
738
- <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_ff'>ff</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
739
- <span class='kw'>return</span> <span class='id identifier rubyid_ff'>ff</span>
740
- <span class='kw'>end</span></pre>
741
- </td>
742
- </tr>
743
- </table>
744
- </div>
745
-
746
- <div class="method_details ">
747
- <h3 class="signature " id="formats-instance_method">
748
-
749
- - (<tt>Array&lt;<span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span>&gt;</tt>) <strong>formats</strong>
750
-
751
-
752
-
753
-
754
-
755
- </h3><div class="docstring">
756
- <div class="discussion">
757
-
758
- <p>returns an array of all formats this style is inheriting from (including
759
- itself)</p>
760
-
761
-
762
- </div>
763
- </div>
764
- <div class="tags">
765
-
766
- <p class="tag_title">Returns:</p>
767
- <ul class="return">
768
-
769
- <li>
770
-
771
-
772
- <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span>&gt;</tt>)</span>
773
-
774
-
775
-
776
- &mdash;
777
- <div class='inline'>
778
- <p>an array of Workbook::Formats</p>
779
- </div>
780
-
781
- </li>
782
-
783
- </ul>
784
-
785
- </div><table class="source_code">
786
- <tr>
787
- <td>
788
- <pre class="lines">
789
-
790
-
791
- 56
792
- 57
793
- 58
794
- 59
795
- 60
796
- 61
797
- 62
798
- 63
799
- 64
800
- 65</pre>
801
- </td>
802
- <td>
803
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 56</span>
804
-
805
- <span class='kw'>def</span> <span class='id identifier rubyid_formats'>formats</span>
806
- <span class='id identifier rubyid_formats'>formats</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
807
- <span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='kw'>self</span>
808
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_f'>f</span>
809
- <span class='kw'>while</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span>
810
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span>
811
- <span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span>
812
- <span class='kw'>end</span>
813
- <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span>
814
- <span class='kw'>end</span></pre>
815
- </td>
816
- </tr>
817
- </table>
818
- </div>
819
-
820
- <div class="method_details ">
821
- <h3 class="signature " id="has_background_color?-instance_method">
822
-
823
- - (<tt>Boolean</tt>) <strong>has_background_color?</strong>(color = :any)
824
-
825
-
826
-
827
-
828
-
829
- </h3><div class="docstring">
830
- <div class="discussion">
831
-
832
- <p>Does the current format feature a background <b>color</b>? (not black or
833
- white or transparant).</p>
834
-
835
-
836
- </div>
837
- </div>
838
- <div class="tags">
839
-
840
- <p class="tag_title">Returns:</p>
841
- <ul class="return">
842
-
843
- <li>
844
-
845
-
846
- <span class='type'>(<tt>Boolean</tt>)</span>
847
-
848
-
849
-
850
- </li>
851
-
852
- </ul>
853
-
854
- </div><table class="source_code">
855
- <tr>
856
- <td>
857
- <pre class="lines">
858
-
859
-
860
- 20
861
- 21
862
- 22
863
- 23
864
- 24
865
- 25
866
- 26</pre>
867
- </td>
868
- <td>
869
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 20</span>
870
-
871
- <span class='kw'>def</span> <span class='id identifier rubyid_has_background_color?'>has_background_color?</span> <span class='id identifier rubyid_color'>color</span><span class='op'>=</span><span class='symbol'>:any</span>
872
- <span class='kw'>if</span> <span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span>
873
- <span class='kw'>return</span> <span class='lparen'>(</span><span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='op'>==</span><span class='id identifier rubyid_color'>color</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='op'>!</span><span class='lparen'>(</span><span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='op'>==</span><span class='kw'>nil</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>String</span> <span class='kw'>and</span> <span class='lparen'>(</span><span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='op'>==</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#ffffff</span><span class='tstring_end'>'</span></span> <span class='kw'>or</span> <span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='op'>==</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#000000</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='id identifier rubyid_color'>color</span><span class='op'>==</span><span class='symbol'>:any</span><span class='rparen'>)</span><span class='rparen'>)</span>
874
- <span class='kw'>else</span>
875
- <span class='kw'>return</span> <span class='kw'>false</span>
876
- <span class='kw'>end</span>
877
- <span class='kw'>end</span></pre>
878
- </td>
879
- </tr>
880
- </table>
881
- </div>
882
-
883
- <div class="method_details ">
884
- <h3 class="signature " id="merge-instance_method">
885
-
886
- - (<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>) <strong>merge</strong>(other_format)
887
-
888
-
889
-
890
-
891
-
892
- </h3><div class="docstring">
893
- <div class="discussion">
894
-
895
- <p>Combines the formatting options of one with another, removes as a
896
- consequence the reference to the raw object's equivalent.</p>
897
-
898
-
899
- </div>
900
- </div>
901
- <div class="tags">
902
- <p class="tag_title">Parameters:</p>
903
- <ul class="param">
904
-
905
- <li>
906
-
907
- <span class='name'>other_format</span>
908
-
909
-
910
- <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>)</span>
911
-
912
-
913
-
914
- </li>
915
-
916
- </ul>
917
-
918
- <p class="tag_title">Returns:</p>
919
- <ul class="return">
920
-
921
- <li>
922
-
923
-
924
- <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>)</span>
925
-
926
-
927
-
928
- &mdash;
929
- <div class='inline'>
930
- <p>a new resulting Workbook::Format</p>
931
- </div>
932
-
933
- </li>
934
-
935
- </ul>
936
-
937
- </div><table class="source_code">
938
- <tr>
939
- <td>
940
- <pre class="lines">
941
-
942
-
943
- 41
944
- 42
945
- 43
946
- 44</pre>
947
- </td>
948
- <td>
949
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 41</span>
950
-
951
- <span class='kw'>def</span> <span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_other_format'>other_format</span><span class='rparen'>)</span>
952
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_remove_all_raws!'>remove_all_raws!</span>
953
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_merge_hash'>merge_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_other_format'>other_format</span><span class='rparen'>)</span>
954
- <span class='kw'>end</span></pre>
955
- </td>
956
- </tr>
957
- </table>
958
- </div>
959
-
960
- <div class="method_details ">
961
- <h3 class="signature " id="merge!-instance_method">
962
-
963
- - (<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>) <strong>merge!</strong>(other_format)
964
-
965
-
966
-
967
-
968
-
969
- </h3><div class="docstring">
970
- <div class="discussion">
971
-
972
- <p>Applies the formatting options of self with another, removes as a
973
- consequence the reference to the raw object's equivalent.</p>
974
-
975
-
976
- </div>
977
- </div>
978
- <div class="tags">
979
- <p class="tag_title">Parameters:</p>
980
- <ul class="param">
981
-
982
- <li>
983
-
984
- <span class='name'>other_format</span>
985
-
986
-
987
- <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>)</span>
988
-
989
-
990
-
991
- </li>
992
-
993
- </ul>
994
-
995
- <p class="tag_title">Returns:</p>
996
- <ul class="return">
997
-
998
- <li>
999
-
1000
-
1001
- <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Format (class)">Workbook::Format</a></span></tt>)</span>
1002
-
1003
-
1004
-
1005
- &mdash;
1006
- <div class='inline'>
1007
- <p>self</p>
1008
- </div>
1009
-
1010
- </li>
1011
-
1012
- </ul>
1013
-
1014
- </div><table class="source_code">
1015
- <tr>
1016
- <td>
1017
- <pre class="lines">
1018
-
1019
-
1020
- 49
1021
- 50
1022
- 51
1023
- 52</pre>
1024
- </td>
1025
- <td>
1026
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 49</span>
1027
-
1028
- <span class='kw'>def</span> <span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_other_format'>other_format</span><span class='rparen'>)</span>
1029
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_remove_all_raws!'>remove_all_raws!</span>
1030
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_merge_hash!'>merge_hash!</span><span class='lparen'>(</span><span class='id identifier rubyid_other_format'>other_format</span><span class='rparen'>)</span>
1031
- <span class='kw'>end</span></pre>
1032
- </td>
1033
- </tr>
1034
- </table>
1035
- </div>
1036
-
1037
- <div class="method_details ">
1038
- <h3 class="signature " id="merge_hash-instance_method">
1039
-
1040
- - (<tt>Object</tt>) <strong>merge_hash</strong>
1041
-
1042
-
1043
-
1044
-
1045
-
1046
- </h3><table class="source_code">
1047
- <tr>
1048
- <td>
1049
- <pre class="lines">
1050
-
1051
-
1052
- 8</pre>
1053
- </td>
1054
- <td>
1055
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 8</span>
1056
-
1057
- <span class='id identifier rubyid_alias_method'>alias_method</span> <span class='symbol'>:merge_hash</span><span class='comma'>,</span> <span class='symbol'>:merge</span></pre>
1058
- </td>
1059
- </tr>
1060
- </table>
1061
- </div>
1062
-
1063
- <div class="method_details ">
1064
- <h3 class="signature " id="merge_hash!-instance_method">
1065
-
1066
- - (<tt>Object</tt>) <strong>merge_hash!</strong>
1067
-
1068
-
1069
-
1070
-
1071
-
1072
- </h3><table class="source_code">
1073
- <tr>
1074
- <td>
1075
- <pre class="lines">
1076
-
1077
-
1078
- 9</pre>
1079
- </td>
1080
- <td>
1081
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 9</span>
1082
-
1083
- <span class='id identifier rubyid_alias_method'>alias_method</span> <span class='symbol'>:merge_hash!</span><span class='comma'>,</span> <span class='symbol'>:merge!</span></pre>
1084
- </td>
1085
- </tr>
1086
- </table>
1087
- </div>
1088
-
1089
- <div class="method_details ">
1090
- <h3 class="signature " id="to_css-instance_method">
1091
-
1092
- - (<tt>Object</tt>) <strong>to_css</strong>
1093
-
1094
-
1095
-
1096
-
1097
-
1098
- </h3><div class="docstring">
1099
- <div class="discussion">
1100
-
1101
- <p>Returns a string that can be used as inline cell styling (e.g. `&lt;td
1102
- style="&lt;%=cell.format.to_css%&gt;"&gt;&lt;%=cell%&gt;&lt;/td&gt;`)</p>
1103
-
1104
-
1105
- </div>
1106
- </div>
1107
- <div class="tags">
1108
-
1109
- <p class="tag_title">Returns:</p>
1110
- <ul class="return">
1111
-
1112
- <li>
1113
-
1114
-
1115
- <span class='type'></span>
1116
-
1117
-
1118
-
1119
-
1120
- <div class='inline'>
1121
- <p>String very basic CSS styling string</p>
1122
- </div>
1123
-
1124
- </li>
1125
-
1126
- </ul>
1127
-
1128
- </div><table class="source_code">
1129
- <tr>
1130
- <td>
1131
- <pre class="lines">
1132
-
1133
-
1134
- 30
1135
- 31
1136
- 32
1137
- 33
1138
- 34
1139
- 35
1140
- 36</pre>
1141
- </td>
1142
- <td>
1143
- <pre class="code"><span class="info file"># File 'lib/workbook/format.rb', line 30</span>
1144
-
1145
- <span class='kw'>def</span> <span class='id identifier rubyid_to_css'>to_css</span>
1146
- <span class='id identifier rubyid_css_parts'>css_parts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1147
- <span class='id identifier rubyid_background'>background</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background_color</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span><span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:background</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
1148
- <span class='id identifier rubyid_css_parts'>css_parts</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>background: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_background'>background</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_background'>background</span> <span class='kw'>and</span> <span class='id identifier rubyid_background'>background</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
1149
- <span class='id identifier rubyid_css_parts'>css_parts</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>color: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:color</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_flattened'>flattened</span><span class='lbracket'>[</span><span class='symbol'>:color</span><span class='rbracket'>]</span>
1150
- <span class='id identifier rubyid_css_parts'>css_parts</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>; </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1151
- <span class='kw'>end</span></pre>
1152
- </td>
1153
- </tr>
1154
- </table>
1155
- </div>
1156
-
1157
- </div>
1158
-
1159
- </div>
1160
-
1161
- <div id="footer">
1162
- Generated on Sun May 19 23:16:31 2013 by
1163
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1164
- 0.8.5.2 (ruby-1.9.3).
1165
- </div>
1166
-
1167
- </body>
1168
- </html>