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,1402 @@
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::Cell
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 (C)</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">Cell</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::Cell
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">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Workbook::Cell</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2">Includes:</dt>
94
+ <dd class="r2"><span class='object_link'><a href="Modules/TypeParser.html" title="Workbook::Modules::TypeParser (module)">Modules::TypeParser</a></span></dd>
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r1 last">Defined in:</dt>
101
+ <dd class="r1 last">lib/workbook/cell.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+
107
+ <h2>Constant Summary</h2>
108
+
109
+ <dl class="constants">
110
+
111
+ <dt id="VALID_TYPES-constant" class="">VALID_TYPES =
112
+ <div class="docstring">
113
+ <div class="discussion">
114
+
115
+ <p>Note that these types are sorted by ‘importance’</p>
116
+
117
+
118
+ </div>
119
+ </div>
120
+ <div class="tags">
121
+
122
+
123
+ </div>
124
+ </dt>
125
+ <dd><pre class="code"><span class='lbrack token'>[</span><span class='rubyid_Numeric constant id'>Numeric</span><span class='comma token'>,</span><span class='rubyid_String constant id'>String</span><span class='comma token'>,</span><span class='rubyid_Time constant id'>Time</span><span class='comma token'>,</span><span class='rubyid_Date constant id'>Date</span><span class='comma token'>,</span><span class='rubyid_TrueClass constant id'>TrueClass</span><span class='comma token'>,</span><span class='rubyid_FalseClass constant id'>FalseClass</span><span class='comma token'>,</span><span class='rubyid_NilClass constant id'>NilClass</span><span class='rbrack token'>]</span>
126
+ </pre></dd>
127
+
128
+ </dl>
129
+
130
+
131
+
132
+
133
+
134
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
135
+ <ul class="summary">
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#format-instance_method" title="#format (instance method)">- (Object) <strong>format</strong> </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <span class="summary_desc"><div class='inline'>
158
+ <p>Returns the value of attribute format.</p>
159
+ </div></span>
160
+
161
+ </li>
162
+
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#formula-instance_method" title="#formula (instance method)">- (Object) <strong>formula</strong> </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'>
185
+ <p>Returns the value of attribute formula.</p>
186
+ </div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#value-instance_method" title="#value (instance method)">- (Object) <strong>value</strong> </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+ <span class="summary_desc"><div class='inline'>
212
+ <p>Returns the value of attribute value.</p>
213
+ </div></span>
214
+
215
+ </li>
216
+
217
+
218
+ </ul>
219
+
220
+
221
+
222
+
223
+
224
+ <h2>
225
+ Instance Method Summary
226
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
227
+ </h2>
228
+
229
+ <ul class="summary">
230
+
231
+ <li class="public ">
232
+ <span class="summary_signature">
233
+
234
+ <a href="#%3C%3D%3E-instance_method" title="#&lt;=&gt; (instance method)">- (Object) <strong>&lt;=&gt;</strong>(other) </a>
235
+
236
+
237
+
238
+ </span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="summary_desc"><div class='inline'></div></span>
249
+
250
+ </li>
251
+
252
+
253
+ <li class="public ">
254
+ <span class="summary_signature">
255
+
256
+ <a href="#%3D%3D-instance_method" title="#== (instance method)">- (Boolean) <strong>==</strong>(other) </a>
257
+
258
+
259
+
260
+ </span>
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+ <span class="summary_desc"><div class='inline'></div></span>
271
+
272
+ </li>
273
+
274
+
275
+ <li class="public ">
276
+ <span class="summary_signature">
277
+
278
+ <a href="#compare_on_class-instance_method" title="#compare_on_class (instance method)">- (Object) <strong>compare_on_class</strong>(other) </a>
279
+
280
+
281
+
282
+ </span>
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ <span class="summary_desc"><div class='inline'>
293
+ <p>Compare on class level.</p>
294
+ </div></span>
295
+
296
+ </li>
297
+
298
+
299
+ <li class="public ">
300
+ <span class="summary_signature">
301
+
302
+ <a href="#importance_of_class-instance_method" title="#importance_of_class (instance method)">- (Object) <strong>importance_of_class</strong>(value) </a>
303
+
304
+
305
+
306
+ </span>
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+ <span class="summary_desc"><div class='inline'>
317
+ <p>Returns the importance of a value’s class.</p>
318
+ </div></span>
319
+
320
+ </li>
321
+
322
+
323
+ <li class="public ">
324
+ <span class="summary_signature">
325
+
326
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Cell) <strong>initialize</strong>(value = nil, options = {}) </a>
327
+
328
+
329
+
330
+ </span>
331
+
332
+
333
+ <span class="note title constructor">constructor</span>
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+ <span class="summary_desc"><div class='inline'>
343
+ <p>A new instance of Cell.</p>
344
+ </div></span>
345
+
346
+ </li>
347
+
348
+
349
+ <li class="public ">
350
+ <span class="summary_signature">
351
+
352
+ <a href="#inspect-instance_method" title="#inspect (instance method)">- (Object) <strong>inspect</strong> </a>
353
+
354
+
355
+
356
+ </span>
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+ <span class="summary_desc"><div class='inline'></div></span>
367
+
368
+ </li>
369
+
370
+
371
+ <li class="public ">
372
+ <span class="summary_signature">
373
+
374
+ <a href="#nil%3F-instance_method" title="#nil? (instance method)">- (Boolean) <strong>nil?</strong> </a>
375
+
376
+
377
+
378
+ </span>
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+ <span class="summary_desc"><div class='inline'>
389
+ <p>returns true when the value of the cell is nil.</p>
390
+ </div></span>
391
+
392
+ </li>
393
+
394
+
395
+ <li class="public ">
396
+ <span class="summary_signature">
397
+
398
+ <a href="#to_s-instance_method" title="#to_s (instance method)">- (String) <strong>to_s</strong> </a>
399
+
400
+
401
+
402
+ </span>
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+ <span class="summary_desc"><div class='inline'>
413
+ <p>convert value to string, and in case of a Date or Time value, apply
414
+ formatting.</p>
415
+ </div></span>
416
+
417
+ </li>
418
+
419
+
420
+ <li class="public ">
421
+ <span class="summary_signature">
422
+
423
+ <a href="#to_sym-instance_method" title="#to_sym (instance method)">- (Symbol) <strong>to_sym</strong> </a>
424
+
425
+
426
+
427
+ </span>
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+ <span class="summary_desc"><div class='inline'>
438
+ <p>returns a symbol representation of the cell’s value.</p>
439
+ </div></span>
440
+
441
+ </li>
442
+
443
+
444
+ <li class="public ">
445
+ <span class="summary_signature">
446
+
447
+ <a href="#valid_value%3F-instance_method" title="#valid_value? (instance method)">- (Boolean) <strong>valid_value?</strong>(value) </a>
448
+
449
+
450
+
451
+ </span>
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+ <span class="summary_desc"><div class='inline'>
462
+ <p>Evaluates a value for class-validity.</p>
463
+ </div></span>
464
+
465
+ </li>
466
+
467
+
468
+ </ul>
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Modules/TypeParser.html" title="Workbook::Modules::TypeParser (module)">Modules::TypeParser</a></span></h3>
481
+ <p class="inherited"><span class='object_link'><a href="Modules/TypeParser.html#clean%21-instance_method" title="Workbook::Modules::TypeParser#clean! (method)">#clean!</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#parse-instance_method" title="Workbook::Modules::TypeParser#parse (method)">#parse</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#parse%21-instance_method" title="Workbook::Modules::TypeParser#parse! (method)">#parse!</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_boolean_converter-instance_method" title="Workbook::Modules::TypeParser#string_boolean_converter (method)">#string_boolean_converter</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_cleaner-instance_method" title="Workbook::Modules::TypeParser#string_cleaner (method)">#string_cleaner</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_integer_converter-instance_method" title="Workbook::Modules::TypeParser#string_integer_converter (method)">#string_integer_converter</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_nil_converter-instance_method" title="Workbook::Modules::TypeParser#string_nil_converter (method)">#string_nil_converter</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_optimistic_date_converter-instance_method" title="Workbook::Modules::TypeParser#string_optimistic_date_converter (method)">#string_optimistic_date_converter</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_parsers-instance_method" title="Workbook::Modules::TypeParser#string_parsers (method)">#string_parsers</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_parsers%3D-instance_method" title="Workbook::Modules::TypeParser#string_parsers= (method)">#string_parsers=</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#string_parsers_as_procs-instance_method" title="Workbook::Modules::TypeParser#string_parsers_as_procs (method)">#string_parsers_as_procs</a></span>, <span class='object_link'><a href="Modules/TypeParser.html#strip_win_chars-instance_method" title="Workbook::Modules::TypeParser#strip_win_chars (method)">#strip_win_chars</a></span></p>
482
+ <div id="constructor_details" class="method_details_list">
483
+ <h2>Constructor Details</h2>
484
+
485
+ <div class="method_details first">
486
+ <h3 class="signature first" id="initialize-instance_method">
487
+
488
+ - (<tt><span class='object_link'><a href="" title="Workbook::Cell (class)">Cell</a></span></tt>) <strong>initialize</strong>(value = nil, options = {})
489
+
490
+
491
+
492
+
493
+
494
+ </h3><div class="docstring">
495
+ <div class="discussion">
496
+
497
+ <p>A new instance of Cell</p>
498
+
499
+
500
+ </div>
501
+ </div>
502
+ <div class="tags">
503
+ <p class="tag_title">Parameters:</p>
504
+ <ul class="param">
505
+
506
+ <li>
507
+
508
+ <span class='name'>value</span>
509
+
510
+
511
+ <span class='type'>(<tt>Numeric</tt>, <tt>String</tt>, <tt>Time</tt>, <tt>Date</tt>, <tt>TrueClass</tt>, <tt>FalseClass</tt>, <tt>NilClass</tt>)</span>
512
+
513
+
514
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
515
+
516
+
517
+ &mdash;
518
+ <div class='inline'>
519
+ <p>a valid value</p>
520
+ </div>
521
+
522
+ </li>
523
+
524
+ <li>
525
+
526
+ <span class='name'>options</span>
527
+
528
+
529
+ <span class='type'>(<tt>Hash</tt>)</span>
530
+
531
+
532
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
533
+
534
+
535
+ &mdash;
536
+ <div class='inline'>
537
+ <p>a reference to :format (Workbook::Format) can be specified</p>
538
+ </div>
539
+
540
+ </li>
541
+
542
+ </ul>
543
+
544
+
545
+ </div><table class="source_code">
546
+ <tr>
547
+ <td>
548
+ <pre class="lines">
549
+
550
+
551
+ 28</pre>
552
+ </td>
553
+ <td>
554
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 28</span>
555
+
556
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span> <span class='rubyid_value identifier id'>value</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>
557
+ </pre>
558
+ </td>
559
+ </tr>
560
+ </table>
561
+ </div>
562
+
563
+ </div>
564
+
565
+ <div id="instance_attr_details" class="attr_details">
566
+ <h2>Instance Attribute Details</h2>
567
+
568
+
569
+ <span id="format=-instance_method"></span>
570
+ <div class="method_details first">
571
+ <h3 class="signature first" id="format-instance_method">
572
+
573
+ - (<tt>Object</tt>) <strong>format</strong>
574
+
575
+
576
+
577
+
578
+
579
+ </h3><div class="docstring">
580
+ <div class="discussion">
581
+
582
+ <p>Returns the value of attribute format</p>
583
+
584
+
585
+ </div>
586
+ </div>
587
+ <div class="tags">
588
+
589
+
590
+ </div><table class="source_code">
591
+ <tr>
592
+ <td>
593
+ <pre class="lines">
594
+
595
+
596
+ 10
597
+ 11
598
+ 12</pre>
599
+ </td>
600
+ <td>
601
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 10</span>
602
+
603
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_format identifier id'>format</span>
604
+ <span class='rubyid_@format ivar id'>@format</span>
605
+ <span class='rubyid_end end kw'>end</span>
606
+ </pre>
607
+ </td>
608
+ </tr>
609
+ </table>
610
+ </div>
611
+
612
+
613
+ <span id="formula=-instance_method"></span>
614
+ <div class="method_details ">
615
+ <h3 class="signature " id="formula-instance_method">
616
+
617
+ - (<tt>Object</tt>) <strong>formula</strong>
618
+
619
+
620
+
621
+
622
+
623
+ </h3><div class="docstring">
624
+ <div class="discussion">
625
+
626
+ <p>Returns the value of attribute formula</p>
627
+
628
+
629
+ </div>
630
+ </div>
631
+ <div class="tags">
632
+
633
+
634
+ </div><table class="source_code">
635
+ <tr>
636
+ <td>
637
+ <pre class="lines">
638
+
639
+
640
+ 11
641
+ 12
642
+ 13</pre>
643
+ </td>
644
+ <td>
645
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 11</span>
646
+
647
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_formula identifier id'>formula</span>
648
+ <span class='rubyid_@formula ivar id'>@formula</span>
649
+ <span class='rubyid_end end kw'>end</span>
650
+ </pre>
651
+ </td>
652
+ </tr>
653
+ </table>
654
+ </div>
655
+
656
+
657
+ <span id="value=-instance_method"></span>
658
+ <div class="method_details ">
659
+ <h3 class="signature " id="value-instance_method">
660
+
661
+ - (<tt>Object</tt>) <strong>value</strong>
662
+
663
+
664
+
665
+
666
+
667
+ </h3><div class="docstring">
668
+ <div class="discussion">
669
+
670
+ <p>Returns the value of attribute value</p>
671
+
672
+
673
+ </div>
674
+ </div>
675
+ <div class="tags">
676
+
677
+
678
+ </div><table class="source_code">
679
+ <tr>
680
+ <td>
681
+ <pre class="lines">
682
+
683
+
684
+ 9
685
+ 10
686
+ 11</pre>
687
+ </td>
688
+ <td>
689
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 9</span>
690
+
691
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_value identifier id'>value</span>
692
+ <span class='rubyid_@value ivar id'>@value</span>
693
+ <span class='rubyid_end end kw'>end</span>
694
+ </pre>
695
+ </td>
696
+ </tr>
697
+ </table>
698
+ </div>
699
+
700
+ </div>
701
+
702
+
703
+ <div id="instance_method_details" class="method_details_list">
704
+ <h2>Instance Method Details</h2>
705
+
706
+
707
+ <div class="method_details first">
708
+ <h3 class="signature first" id="<=>-instance_method">
709
+
710
+ - (<tt>Object</tt>) <strong>&lt;=&gt;</strong>(other)
711
+
712
+
713
+
714
+
715
+
716
+ </h3><div class="docstring">
717
+ <div class="discussion">
718
+
719
+
720
+ </div>
721
+ </div>
722
+ <div class="tags">
723
+ <p class="tag_title">Parameters:</p>
724
+ <ul class="param">
725
+
726
+ <li>
727
+
728
+ <span class='name'>other</span>
729
+
730
+
731
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt>)</span>
732
+
733
+
734
+
735
+ &mdash;
736
+ <div class='inline'>
737
+ <p>cell to compare against, can compare different value-types using
738
+ #compare_on_class</p>
739
+ </div>
740
+
741
+ </li>
742
+
743
+ </ul>
744
+
745
+
746
+ </div><table class="source_code">
747
+ <tr>
748
+ <td>
749
+ <pre class="lines">
750
+
751
+
752
+ 118
753
+ 119
754
+ 120
755
+ 121
756
+ 122
757
+ 123
758
+ 124
759
+ 125
760
+ 126
761
+ 127
762
+ 128
763
+ 129
764
+ 130</pre>
765
+ </td>
766
+ <td>
767
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 118</span>
768
+
769
+ <span class='rubyid_def def kw'>def</span> <span class='cmp op'>&lt;=&gt;</span> <span class='rubyid_other identifier id'>other</span>
770
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
771
+ <span class='rubyid_begin begin kw'>begin</span>
772
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span> <span class='cmp op'>&lt;=&gt;</span> <span class='rubyid_other identifier id'>other</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span>
773
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_NoMethodError constant id'>NoMethodError</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
774
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_compare_on_class identifier id'>compare_on_class</span> <span class='rubyid_other identifier id'>other</span>
775
+ <span class='rubyid_end end kw'>end</span>
776
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_rv identifier id'>rv</span> <span class='eq op'>==</span> <span class='rubyid_nil nil kw'>nil</span>
777
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_compare_on_class identifier id'>compare_on_class</span> <span class='rubyid_other identifier id'>other</span>
778
+ <span class='rubyid_end end kw'>end</span>
779
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_rv identifier id'>rv</span>
780
+
781
+ <span class='rubyid_end end kw'>end</span>
782
+ </pre>
783
+ </td>
784
+ </tr>
785
+ </table>
786
+ </div>
787
+
788
+ <div class="method_details ">
789
+ <h3 class="signature " id="==-instance_method">
790
+
791
+ - (<tt>Boolean</tt>) <strong>==</strong>(other)
792
+
793
+
794
+
795
+
796
+
797
+ </h3><div class="docstring">
798
+ <div class="discussion">
799
+
800
+
801
+ </div>
802
+ </div>
803
+ <div class="tags">
804
+ <p class="tag_title">Parameters:</p>
805
+ <ul class="param">
806
+
807
+ <li>
808
+
809
+ <span class='name'>other</span>
810
+
811
+
812
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt>)</span>
813
+
814
+
815
+
816
+ &mdash;
817
+ <div class='inline'>
818
+ <p>cell to compare against</p>
819
+ </div>
820
+
821
+ </li>
822
+
823
+ </ul>
824
+
825
+ <p class="tag_title">Returns:</p>
826
+ <ul class="return">
827
+
828
+ <li>
829
+
830
+
831
+ <span class='type'>(<tt>Boolean</tt>)</span>
832
+
833
+
834
+
835
+ </li>
836
+
837
+ </ul>
838
+
839
+ </div><table class="source_code">
840
+ <tr>
841
+ <td>
842
+ <pre class="lines">
843
+
844
+
845
+ 54
846
+ 55
847
+ 56
848
+ 57
849
+ 58
850
+ 59
851
+ 60</pre>
852
+ </td>
853
+ <td>
854
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 54</span>
855
+
856
+ <span class='rubyid_def def kw'>def</span> <span class='eq op'>==</span><span class='lparen token'>(</span><span class='rubyid_other identifier id'>other</span><span class='rparen token'>)</span>
857
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_other identifier id'>other</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Cell constant id'>Cell</span>
858
+ <span class='rubyid_other identifier id'>other</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span> <span class='eq op'>==</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span>
859
+ <span class='rubyid_else else kw'>else</span>
860
+ <span class='rubyid_other identifier id'>other</span> <span class='eq op'>==</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span>
861
+ <span class='rubyid_end end kw'>end</span>
862
+ <span class='rubyid_end end kw'>end</span>
863
+ </pre>
864
+ </td>
865
+ </tr>
866
+ </table>
867
+ </div>
868
+
869
+ <div class="method_details ">
870
+ <h3 class="signature " id="compare_on_class-instance_method">
871
+
872
+ - (<tt>Object</tt>) <strong>compare_on_class</strong>(other)
873
+
874
+
875
+
876
+
877
+
878
+ </h3><div class="docstring">
879
+ <div class="discussion">
880
+
881
+ <p>Compare on class level</p>
882
+
883
+
884
+ </div>
885
+ </div>
886
+ <div class="tags">
887
+ <p class="tag_title">Parameters:</p>
888
+ <ul class="param">
889
+
890
+ <li>
891
+
892
+ <span class='name'>other</span>
893
+
894
+
895
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt>)</span>
896
+
897
+
898
+
899
+ &mdash;
900
+ <div class='inline'>
901
+ <p>cell to compare against</p>
902
+ </div>
903
+
904
+ </li>
905
+
906
+ </ul>
907
+
908
+
909
+ </div><table class="source_code">
910
+ <tr>
911
+ <td>
912
+ <pre class="lines">
913
+
914
+
915
+ 135
916
+ 136
917
+ 137
918
+ 138
919
+ 139
920
+ 140
921
+ 141</pre>
922
+ </td>
923
+ <td>
924
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 135</span>
925
+
926
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_compare_on_class identifier id'>compare_on_class</span> <span class='rubyid_other identifier id'>other</span>
927
+ <span class='rubyid_other_value identifier id'>other_value</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
928
+ <span class='rubyid_other_value identifier id'>other_value</span> <span class='assign token'>=</span> <span class='rubyid_other identifier id'>other</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_other identifier id'>other</span>
929
+ <span class='rubyid_self_value identifier id'>self_value</span> <span class='assign token'>=</span> <span class='rubyid_importance_of_class identifier id'>importance_of_class</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span>
930
+ <span class='rubyid_other_value identifier id'>other_value</span> <span class='assign token'>=</span> <span class='rubyid_importance_of_class identifier id'>importance_of_class</span> <span class='rubyid_other_value identifier id'>other_value</span>
931
+ <span class='rubyid_self_value identifier id'>self_value</span> <span class='cmp op'>&lt;=&gt;</span> <span class='rubyid_other_value identifier id'>other_value</span>
932
+ <span class='rubyid_end end kw'>end</span>
933
+ </pre>
934
+ </td>
935
+ </tr>
936
+ </table>
937
+ </div>
938
+
939
+ <div class="method_details ">
940
+ <h3 class="signature " id="importance_of_class-instance_method">
941
+
942
+ - (<tt>Object</tt>) <strong>importance_of_class</strong>(value)
943
+
944
+
945
+
946
+
947
+
948
+ </h3><div class="docstring">
949
+ <div class="discussion">
950
+
951
+ <p>Returns the importance of a value’s class</p>
952
+
953
+
954
+ </div>
955
+ </div>
956
+ <div class="tags">
957
+ <p class="tag_title">Parameters:</p>
958
+ <ul class="param">
959
+
960
+ <li>
961
+
962
+ <span class='name'>value</span>
963
+
964
+
965
+ <span class='type'></span>
966
+
967
+
968
+
969
+ &mdash;
970
+ <div class='inline'>
971
+ <p>a potential value for a cell</p>
972
+ </div>
973
+
974
+ </li>
975
+
976
+ </ul>
977
+
978
+
979
+ </div><table class="source_code">
980
+ <tr>
981
+ <td>
982
+ <pre class="lines">
983
+
984
+
985
+ 146
986
+ 147
987
+ 148
988
+ 149
989
+ 150
990
+ 151</pre>
991
+ </td>
992
+ <td>
993
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 146</span>
994
+
995
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_importance_of_class identifier id'>importance_of_class</span> <span class='rubyid_value identifier id'>value</span>
996
+ <span class='rubyid_VALID_TYPES constant id'>VALID_TYPES</span><span class='dot token'>.</span><span class='rubyid_each_with_index identifier id'>each_with_index</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='comma token'>,</span><span class='rubyid_i identifier id'>i</span><span class='bitor op'>|</span>
997
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_i identifier id'>i</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_c identifier id'>c</span>
998
+ <span class='rubyid_end end kw'>end</span>
999
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_nil nil kw'>nil</span>
1000
+ <span class='rubyid_end end kw'>end</span>
1001
+ </pre>
1002
+ </td>
1003
+ </tr>
1004
+ </table>
1005
+ </div>
1006
+
1007
+ <div class="method_details ">
1008
+ <h3 class="signature " id="inspect-instance_method">
1009
+
1010
+ - (<tt>Object</tt>) <strong>inspect</strong>
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+ </h3><table class="source_code">
1017
+ <tr>
1018
+ <td>
1019
+ <pre class="lines">
1020
+
1021
+
1022
+ 153
1023
+ 154
1024
+ 155</pre>
1025
+ </td>
1026
+ <td>
1027
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 153</span>
1028
+
1029
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_inspect identifier id'>inspect</span>
1030
+ <span class='dstring node'>&quot;&lt;Workbook::Cell @value=#{value}&gt;&quot;</span>
1031
+ <span class='rubyid_end end kw'>end</span>
1032
+ </pre>
1033
+ </td>
1034
+ </tr>
1035
+ </table>
1036
+ </div>
1037
+
1038
+ <div class="method_details ">
1039
+ <h3 class="signature " id="nil?-instance_method">
1040
+
1041
+ - (<tt>Boolean</tt>) <strong>nil?</strong>
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+ </h3><div class="docstring">
1048
+ <div class="discussion">
1049
+
1050
+ <p>returns true when the value of the cell is nil.</p>
1051
+
1052
+
1053
+ </div>
1054
+ </div>
1055
+ <div class="tags">
1056
+
1057
+ <p class="tag_title">Returns:</p>
1058
+ <ul class="return">
1059
+
1060
+ <li>
1061
+
1062
+
1063
+ <span class='type'>(<tt>Boolean</tt>)</span>
1064
+
1065
+
1066
+
1067
+ </li>
1068
+
1069
+ </ul>
1070
+
1071
+ </div><table class="source_code">
1072
+ <tr>
1073
+ <td>
1074
+ <pre class="lines">
1075
+
1076
+
1077
+ 64
1078
+ 65
1079
+ 66</pre>
1080
+ </td>
1081
+ <td>
1082
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 64</span>
1083
+
1084
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_nil? fid id'>nil?</span>
1085
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
1086
+ <span class='rubyid_end end kw'>end</span>
1087
+ </pre>
1088
+ </td>
1089
+ </tr>
1090
+ </table>
1091
+ </div>
1092
+
1093
+ <div class="method_details ">
1094
+ <h3 class="signature " id="to_s-instance_method">
1095
+
1096
+ - (<tt>String</tt>) <strong>to_s</strong>
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+ </h3><div class="docstring">
1103
+ <div class="discussion">
1104
+
1105
+ <p>convert value to string, and in case of a Date or Time value, apply
1106
+ formatting</p>
1107
+
1108
+
1109
+ </div>
1110
+ </div>
1111
+ <div class="tags">
1112
+
1113
+ <p class="tag_title">Returns:</p>
1114
+ <ul class="return">
1115
+
1116
+ <li>
1117
+
1118
+
1119
+ <span class='type'>(<tt>String</tt>)</span>
1120
+
1121
+
1122
+
1123
+ </li>
1124
+
1125
+ </ul>
1126
+
1127
+ </div><table class="source_code">
1128
+ <tr>
1129
+ <td>
1130
+ <pre class="lines">
1131
+
1132
+
1133
+ 159
1134
+ 160
1135
+ 161
1136
+ 162
1137
+ 163
1138
+ 164
1139
+ 165</pre>
1140
+ </td>
1141
+ <td>
1142
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 159</span>
1143
+
1144
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_to_s identifier id'>to_s</span>
1145
+ <span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Date constant id'>Date</span> <span class='rubyid_or or kw'>or</span> <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Time constant id'>Time</span><span class='rparen token'>)</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_format identifier id'>format</span><span class='lbrack token'>[</span><span class='symbol val'>:number_format</span><span class='rbrack token'>]</span>
1146
+ <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_strftime identifier id'>strftime</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span><span class='lbrack token'>[</span><span class='symbol val'>:number_format</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
1147
+ <span class='rubyid_else else kw'>else</span>
1148
+ <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span>
1149
+ <span class='rubyid_end end kw'>end</span>
1150
+ <span class='rubyid_end end kw'>end</span>
1151
+ </pre>
1152
+ </td>
1153
+ </tr>
1154
+ </table>
1155
+ </div>
1156
+
1157
+ <div class="method_details ">
1158
+ <h3 class="signature " id="to_sym-instance_method">
1159
+
1160
+ - (<tt>Symbol</tt>) <strong>to_sym</strong>
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+ </h3><div class="docstring">
1167
+ <div class="discussion">
1168
+
1169
+ <p>returns a symbol representation of the cell’s value</p>
1170
+
1171
+
1172
+ </div>
1173
+ </div>
1174
+ <div class="tags">
1175
+
1176
+ <div class="examples">
1177
+ <p class="tag_title">Examples:</p>
1178
+
1179
+
1180
+ <pre class="example code">
1181
+ <span class='lt op'>&lt;</span><span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Cell constant id'>Cell</span> <span class='rubyid_value identifier id'>value</span><span class='assign token'>=</span><span class='string val'>&quot;yet another value&quot;</span><span class='gt op'>&gt;</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span> <span class='comment val'># returns :yet_another_value</span>
1182
+ </pre>
1183
+
1184
+ </div>
1185
+
1186
+ <p class="tag_title">Returns:</p>
1187
+ <ul class="return">
1188
+
1189
+ <li>
1190
+
1191
+
1192
+ <span class='type'>(<tt>Symbol</tt>)</span>
1193
+
1194
+
1195
+
1196
+ &mdash;
1197
+ <div class='inline'>
1198
+ <p>a symbol representation</p>
1199
+ </div>
1200
+
1201
+ </li>
1202
+
1203
+ </ul>
1204
+
1205
+ </div><table class="source_code">
1206
+ <tr>
1207
+ <td>
1208
+ <pre class="lines">
1209
+
1210
+
1211
+ 73
1212
+ 74
1213
+ 75
1214
+ 76
1215
+ 77
1216
+ 78
1217
+ 79
1218
+ 80
1219
+ 81
1220
+ 82
1221
+ 83
1222
+ 84
1223
+ 85
1224
+ 86
1225
+ 87
1226
+ 88
1227
+ 89
1228
+ 90
1229
+ 91
1230
+ 92
1231
+ 93
1232
+ 94
1233
+ 95
1234
+ 96
1235
+ 97
1236
+ 98
1237
+ 99
1238
+ 100
1239
+ 101
1240
+ 102
1241
+ 103
1242
+ 104
1243
+ 105
1244
+ 106
1245
+ 107
1246
+ 108
1247
+ 109
1248
+ 110
1249
+ 111
1250
+ 112
1251
+ 113
1252
+ 114
1253
+ 115</pre>
1254
+ </td>
1255
+ <td>
1256
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 73</span>
1257
+
1258
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_to_sym identifier id'>to_sym</span>
1259
+ <span class='comment val'>#mb_chars.normalize(:kd).</span>
1260
+ <span class='rubyid_v identifier id'>v</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
1261
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_value identifier id'>value</span>
1262
+ <span class='rubyid_v identifier id'>v</span> <span class='assign token'>=</span> <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span>
1263
+ <span class='rubyid_v identifier id'>v</span> <span class='assign token'>=</span> <span class='rubyid_v identifier id'>v</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>' (j/?/leeg)'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/dd-mm-(.*)/</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/\ja\/nee/</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/\(\)/</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/[\(\)]+/</span><span class='comma token'>,</span> <span class='string val'>''</span><span class='rparen token'>)</span>
1264
+ <span class='rubyid_v identifier id'>v</span> <span class='assign token'>=</span> <span class='rubyid_v identifier id'>v</span><span class='dot token'>.</span><span class='rubyid_strip identifier id'>strip</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/(\.|\?|,|\=)/</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1265
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'$'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1266
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/\&amp;/</span><span class='comma token'>,</span><span class='string val'>'en'</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1267
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/\+/</span><span class='comma token'>,</span><span class='string val'>'_plus_'</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1268
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/\s/</span><span class='comma token'>,</span> <span class='string val'>&quot;_&quot;</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1269
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'–_'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1270
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'-_'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1271
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'+_'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1272
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'/_'</span><span class='comma token'>,</span><span class='string val'>'_'</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1273
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'/'</span><span class='comma token'>,</span><span class='string val'>'_'</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1274
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'__'</span><span class='comma token'>,</span><span class='string val'>'_'</span><span class='rparen token'>)</span><span class='dot token'>.</span>
1275
+ <span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'-'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span>
1276
+
1277
+ <span class='rubyid_accents identifier id'>accents</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
1278
+ <span class='lbrack token'>[</span><span class='string val'>'á'</span><span class='comma token'>,</span><span class='string val'>'à'</span><span class='comma token'>,</span><span class='string val'>'â'</span><span class='comma token'>,</span><span class='string val'>'ä'</span><span class='comma token'>,</span><span class='string val'>'ã'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'a'</span><span class='comma token'>,</span>
1279
+ <span class='lbrack token'>[</span><span class='string val'>'Ã'</span><span class='comma token'>,</span><span class='string val'>'Ä'</span><span class='comma token'>,</span><span class='string val'>'Â'</span><span class='comma token'>,</span><span class='string val'>'À'</span><span class='comma token'>,</span><span class='string val'>'�?'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'A'</span><span class='comma token'>,</span>
1280
+ <span class='lbrack token'>[</span><span class='string val'>'é'</span><span class='comma token'>,</span><span class='string val'>'è'</span><span class='comma token'>,</span><span class='string val'>'ê'</span><span class='comma token'>,</span><span class='string val'>'ë'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'e'</span><span class='comma token'>,</span>
1281
+ <span class='lbrack token'>[</span><span class='string val'>'Ë'</span><span class='comma token'>,</span><span class='string val'>'É'</span><span class='comma token'>,</span><span class='string val'>'È'</span><span class='comma token'>,</span><span class='string val'>'Ê'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'E'</span><span class='comma token'>,</span>
1282
+ <span class='lbrack token'>[</span><span class='string val'>'í'</span><span class='comma token'>,</span><span class='string val'>'ì'</span><span class='comma token'>,</span><span class='string val'>'î'</span><span class='comma token'>,</span><span class='string val'>'ï'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'i'</span><span class='comma token'>,</span>
1283
+ <span class='lbrack token'>[</span><span class='string val'>'�?'</span><span class='comma token'>,</span><span class='string val'>'Î'</span><span class='comma token'>,</span><span class='string val'>'Ì'</span><span class='comma token'>,</span><span class='string val'>'�?'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'I'</span><span class='comma token'>,</span>
1284
+ <span class='lbrack token'>[</span><span class='string val'>'ó'</span><span class='comma token'>,</span><span class='string val'>'ò'</span><span class='comma token'>,</span><span class='string val'>'ô'</span><span class='comma token'>,</span><span class='string val'>'ö'</span><span class='comma token'>,</span><span class='string val'>'õ'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'o'</span><span class='comma token'>,</span>
1285
+ <span class='lbrack token'>[</span><span class='string val'>'Õ'</span><span class='comma token'>,</span><span class='string val'>'Ö'</span><span class='comma token'>,</span><span class='string val'>'Ô'</span><span class='comma token'>,</span><span class='string val'>'Ò'</span><span class='comma token'>,</span><span class='string val'>'Ó'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'O'</span><span class='comma token'>,</span>
1286
+ <span class='lbrack token'>[</span><span class='string val'>'ú'</span><span class='comma token'>,</span><span class='string val'>'ù'</span><span class='comma token'>,</span><span class='string val'>'û'</span><span class='comma token'>,</span><span class='string val'>'ü'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'u'</span><span class='comma token'>,</span>
1287
+ <span class='lbrack token'>[</span><span class='string val'>'Ú'</span><span class='comma token'>,</span><span class='string val'>'Û'</span><span class='comma token'>,</span><span class='string val'>'Ù'</span><span class='comma token'>,</span><span class='string val'>'Ü'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'U'</span><span class='comma token'>,</span>
1288
+ <span class='lbrack token'>[</span><span class='string val'>'ç'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'c'</span><span class='comma token'>,</span> <span class='lbrack token'>[</span><span class='string val'>'Ç'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'C'</span><span class='comma token'>,</span>
1289
+ <span class='lbrack token'>[</span><span class='string val'>'ñ'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'n'</span><span class='comma token'>,</span> <span class='lbrack token'>[</span><span class='string val'>'Ñ'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'N'</span>
1290
+ <span class='rbrace token'>}</span>
1291
+ <span class='rubyid_accents identifier id'>accents</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_ac identifier id'>ac</span><span class='comma token'>,</span><span class='rubyid_rep identifier id'>rep</span><span class='bitor op'>|</span>
1292
+ <span class='rubyid_ac identifier id'>ac</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_s identifier id'>s</span><span class='bitor op'>|</span>
1293
+ <span class='rubyid_v identifier id'>v</span> <span class='assign token'>=</span> <span class='rubyid_v identifier id'>v</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='rubyid_s identifier id'>s</span><span class='comma token'>,</span> <span class='rubyid_rep identifier id'>rep</span><span class='rparen token'>)</span>
1294
+ <span class='rubyid_end end kw'>end</span>
1295
+ <span class='rubyid_end end kw'>end</span>
1296
+
1297
+ <span class='rubyid_v identifier id'>v</span> <span class='assign token'>=</span> <span class='rubyid_v identifier id'>v</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/[^\x00-\x7F]/n</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span>
1298
+ <span class='rubyid_end end kw'>end</span>
1299
+ <span class='rubyid_v identifier id'>v</span>
1300
+ <span class='rubyid_end end kw'>end</span>
1301
+ </pre>
1302
+ </td>
1303
+ </tr>
1304
+ </table>
1305
+ </div>
1306
+
1307
+ <div class="method_details ">
1308
+ <h3 class="signature " id="valid_value?-instance_method">
1309
+
1310
+ - (<tt>Boolean</tt>) <strong>valid_value?</strong>(value)
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+ </h3><div class="docstring">
1317
+ <div class="discussion">
1318
+
1319
+ <p>Evaluates a value for class-validity</p>
1320
+
1321
+
1322
+ </div>
1323
+ </div>
1324
+ <div class="tags">
1325
+ <p class="tag_title">Parameters:</p>
1326
+ <ul class="param">
1327
+
1328
+ <li>
1329
+
1330
+ <span class='name'>value</span>
1331
+
1332
+
1333
+ <span class='type'>(<tt>Numeric</tt>, <tt>String</tt>, <tt>Time</tt>, <tt>Date</tt>, <tt>TrueClass</tt>, <tt>FalseClass</tt>, <tt>NilClass</tt>, <tt>Object</tt>)</span>
1334
+
1335
+
1336
+
1337
+ &mdash;
1338
+ <div class='inline'>
1339
+ <p>the value to evaluate</p>
1340
+ </div>
1341
+
1342
+ </li>
1343
+
1344
+ </ul>
1345
+
1346
+ <p class="tag_title">Returns:</p>
1347
+ <ul class="return">
1348
+
1349
+ <li>
1350
+
1351
+
1352
+ <span class='type'>(<tt>Boolean</tt>)</span>
1353
+
1354
+
1355
+
1356
+ &mdash;
1357
+ <div class='inline'>
1358
+ <p>returns true when the value is a valid cell value</p>
1359
+ </div>
1360
+
1361
+ </li>
1362
+
1363
+ </ul>
1364
+
1365
+ </div><table class="source_code">
1366
+ <tr>
1367
+ <td>
1368
+ <pre class="lines">
1369
+
1370
+
1371
+ 20
1372
+ 21
1373
+ 22
1374
+ 23
1375
+ 24</pre>
1376
+ </td>
1377
+ <td>
1378
+ <pre class="code"><span class="info file"># File 'lib/workbook/cell.rb', line 20</span>
1379
+
1380
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_valid_value? fid id'>valid_value?</span> <span class='rubyid_value identifier id'>value</span>
1381
+ <span class='rubyid_valid_type identifier id'>valid_type</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span>
1382
+ <span class='rubyid_VALID_TYPES constant id'>VALID_TYPES</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_t identifier id'>t</span><span class='bitor op'>|</span> <span class='rubyid_return return kw'>return</span> <span class='rubyid_true true kw'>true</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_t identifier id'>t</span><span class='rbrace token'>}</span>
1383
+ <span class='rubyid_valid_type identifier id'>valid_type</span>
1384
+ <span class='rubyid_end end kw'>end</span>
1385
+ </pre>
1386
+ </td>
1387
+ </tr>
1388
+ </table>
1389
+ </div>
1390
+
1391
+ </div>
1392
+
1393
+ </div>
1394
+
1395
+ <div id="footer">
1396
+ Generated on Thu Jan 17 13:16:03 2013 by
1397
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1398
+ 0.8.3 (ruby-1.8.7).
1399
+ </div>
1400
+
1401
+ </body>
1402
+ </html>