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