axlsx 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +14 -0
- data/Gemfile +3 -7
- data/Gemfile.lock +17 -8
- data/README.md +88 -59
- data/axlsx.gemspec +9 -3
- data/doc/Axlsx.html +482 -248
- data/doc/Axlsx/App.html +237 -159
- data/doc/Axlsx/Axis.html +75 -51
- data/doc/Axlsx/Bar3DChart.html +75 -53
- data/doc/Axlsx/BarSeries.html +45 -31
- data/doc/Axlsx/Border.html +70 -50
- data/doc/Axlsx/BorderPr.html +80 -62
- data/doc/Axlsx/CatAxis.html +62 -43
- data/doc/Axlsx/CatAxisData.html +23 -16
- data/doc/Axlsx/Cell.html +2022 -393
- data/doc/Axlsx/CellAlignment.html +103 -75
- data/doc/Axlsx/CellProtection.html +44 -30
- data/doc/Axlsx/CellStyle.html +66 -46
- data/doc/Axlsx/Chart.html +159 -108
- data/doc/Axlsx/Color.html +73 -52
- data/doc/Axlsx/ContentType.html +20 -14
- data/doc/Axlsx/Core.html +29 -20
- data/doc/Axlsx/DataTypeValidator.html +27 -19
- data/doc/Axlsx/Default.html +39 -27
- data/doc/Axlsx/Drawing.html +104 -70
- data/doc/Axlsx/Fill.html +33 -23
- data/doc/Axlsx/Font.html +132 -98
- data/doc/Axlsx/GradientFill.html +70 -48
- data/doc/Axlsx/GradientStop.html +31 -21
- data/doc/Axlsx/GraphicFrame.html +40 -27
- data/doc/Axlsx/Line3DChart.html +62 -43
- data/doc/Axlsx/LineSeries.html +37 -25
- data/doc/Axlsx/Marker.html +63 -43
- data/doc/Axlsx/NumFmt.html +79 -65
- data/doc/Axlsx/OneCellAnchor.html +78 -54
- data/doc/Axlsx/Override.html +39 -27
- data/doc/Axlsx/Package.html +103 -163
- data/doc/Axlsx/Parser.html +549 -0
- data/doc/Axlsx/PatternFill.html +66 -51
- data/doc/Axlsx/Pic.html +230 -123
- data/doc/Axlsx/PictureLocking.html +1159 -0
- data/doc/Axlsx/Pie3DChart.html +23 -16
- data/doc/Axlsx/PieSeries.html +44 -30
- data/doc/Axlsx/RegexValidator.html +14 -10
- data/doc/Axlsx/Relationship.html +40 -27
- data/doc/Axlsx/Relationships.html +20 -14
- data/doc/Axlsx/RestrictionValidator.html +25 -17
- data/doc/Axlsx/Row.html +73 -53
- data/doc/Axlsx/Scaling.html +46 -31
- data/doc/Axlsx/SerAxis.html +49 -33
- data/doc/Axlsx/Series.html +51 -35
- data/doc/Axlsx/SeriesTitle.html +14 -10
- data/doc/Axlsx/Styles.html +210 -156
- data/doc/Axlsx/TableStyle.html +47 -32
- data/doc/Axlsx/TableStyleElement.html +75 -61
- data/doc/Axlsx/TableStyles.html +42 -28
- data/doc/Axlsx/Title.html +36 -25
- data/doc/Axlsx/TwoCellAnchor.html +83 -58
- data/doc/Axlsx/ValAxis.html +35 -24
- data/doc/Axlsx/ValAxisData.html +13 -9
- data/doc/Axlsx/View3D.html +64 -43
- data/doc/Axlsx/Workbook.html +305 -147
- data/doc/Axlsx/Worksheet.html +567 -271
- data/doc/Axlsx/Xf.html +114 -77
- data/doc/_index.html +15 -1
- data/doc/class_list.html +1 -1
- data/doc/css/style.css +1 -1
- data/doc/file.LICENSE.html +25 -21
- data/doc/file.README.html +89 -66
- data/doc/index.html +89 -66
- data/doc/js/app.js +4 -4
- data/doc/method_list.html +717 -413
- data/doc/top-level-namespace.html +1 -1
- data/examples/example.rb +52 -25
- data/examples/follow_20111202.xlsx +0 -0
- data/lib/axlsx.rb +14 -1
- data/lib/axlsx/drawing/chart.rb +20 -4
- data/lib/axlsx/drawing/drawing.rb +1 -1
- data/lib/axlsx/drawing/pic.rb +5 -2
- data/lib/axlsx/drawing/picture_locking.rb +72 -0
- data/lib/axlsx/package.rb +9 -7
- data/lib/axlsx/stylesheet/color.rb +19 -9
- data/lib/axlsx/stylesheet/styles.rb +2 -0
- data/lib/axlsx/util/constants.rb +6 -0
- data/lib/axlsx/util/parser.rb +43 -0
- data/lib/axlsx/version.rb +1 -1
- data/lib/axlsx/workbook/workbook.rb +21 -1
- data/lib/axlsx/workbook/worksheet/cell.rb +159 -7
- data/lib/axlsx/workbook/worksheet/row.rb +4 -2
- data/lib/axlsx/workbook/worksheet/worksheet.rb +38 -4
- data/test/drawing/tc_picture_locking.rb +73 -0
- data/test/rels/tc_relationships.rb +0 -1
- data/test/stylesheet/tc_styles.rb +0 -12
- data/test/tc_package.rb +5 -3
- data/test/workbook/tc_workbook.rb +7 -0
- data/test/workbook/worksheet/tc_cell.rb +102 -1
- data/test/workbook/worksheet/tc_worksheet.rb +17 -0
- metadata +79 -19
- data/doc/Axlsx/Ar.html +0 -196
- data/doc/Axlsx/Ar/ClassMethods.html +0 -188
- data/doc/Axlsx/Ar/InstanceMethods.html +0 -108
- data/doc/Axlsx/Ar/SingletonMethods.html +0 -312
data/doc/Axlsx/Override.html
CHANGED
@@ -94,9 +94,10 @@
|
|
94
94
|
|
95
95
|
<h2>Overview</h2><div class="docstring">
|
96
96
|
<div class="discussion">
|
97
|
-
|
98
|
-
|
99
|
-
based on the content of your package
|
97
|
+
<p>
|
98
|
+
An override content part. These parts are automatically created by for you
|
99
|
+
based on the content of your package.
|
100
|
+
</p>
|
100
101
|
|
101
102
|
|
102
103
|
</div>
|
@@ -128,8 +129,9 @@ based on the content of your package.</p>
|
|
128
129
|
|
129
130
|
|
130
131
|
|
131
|
-
<span class="summary_desc"><div class='inline'>
|
132
|
-
|
132
|
+
<span class="summary_desc"><div class='inline'><p>
|
133
|
+
The type of content.
|
134
|
+
</p>
|
133
135
|
</div></span>
|
134
136
|
|
135
137
|
</li>
|
@@ -154,8 +156,9 @@ based on the content of your package.</p>
|
|
154
156
|
|
155
157
|
|
156
158
|
|
157
|
-
<span class="summary_desc"><div class='inline'>
|
158
|
-
|
159
|
+
<span class="summary_desc"><div class='inline'><p>
|
160
|
+
The name and location of the part.
|
161
|
+
</p>
|
159
162
|
</div></span>
|
160
163
|
|
161
164
|
</li>
|
@@ -192,8 +195,9 @@ based on the content of your package.</p>
|
|
192
195
|
|
193
196
|
|
194
197
|
|
195
|
-
<span class="summary_desc"><div class='inline'>
|
196
|
-
|
198
|
+
<span class="summary_desc"><div class='inline'><p>
|
199
|
+
Creates a new Override object.
|
200
|
+
</p>
|
197
201
|
</div></span>
|
198
202
|
|
199
203
|
</li>
|
@@ -215,8 +219,9 @@ based on the content of your package.</p>
|
|
215
219
|
|
216
220
|
|
217
221
|
|
218
|
-
<span class="summary_desc"><div class='inline'>
|
219
|
-
|
222
|
+
<span class="summary_desc"><div class='inline'><p>
|
223
|
+
Serializes the Override object to xml.
|
224
|
+
</p>
|
220
225
|
</div></span>
|
221
226
|
|
222
227
|
</li>
|
@@ -237,8 +242,9 @@ based on the content of your package.</p>
|
|
237
242
|
|
238
243
|
</p><div class="docstring">
|
239
244
|
<div class="discussion">
|
240
|
-
|
241
|
-
|
245
|
+
<p>
|
246
|
+
Creates a new Override object
|
247
|
+
</p>
|
242
248
|
|
243
249
|
|
244
250
|
</div>
|
@@ -259,8 +265,9 @@ based on the content of your package.</p>
|
|
259
265
|
|
260
266
|
|
261
267
|
—
|
262
|
-
<div class='inline'>
|
263
|
-
|
268
|
+
<div class='inline'><p>
|
269
|
+
a customizable set of options
|
270
|
+
</p>
|
264
271
|
</div>
|
265
272
|
|
266
273
|
</li>
|
@@ -305,9 +312,10 @@ based on the content of your package.</p>
|
|
305
312
|
|
306
313
|
|
307
314
|
—
|
308
|
-
<div class='inline'>
|
309
|
-
|
310
|
-
specified
|
315
|
+
<div class='inline'><p>
|
316
|
+
An argument error is raised if both PartName and ContentType are not
|
317
|
+
specified.
|
318
|
+
</p>
|
311
319
|
</div>
|
312
320
|
|
313
321
|
</li>
|
@@ -359,8 +367,9 @@ specified.</p>
|
|
359
367
|
|
360
368
|
</p><div class="docstring">
|
361
369
|
<div class="discussion">
|
362
|
-
|
363
|
-
|
370
|
+
<p>
|
371
|
+
The type of content.
|
372
|
+
</p>
|
364
373
|
|
365
374
|
|
366
375
|
</div>
|
@@ -415,8 +424,9 @@ specified.</p>
|
|
415
424
|
|
416
425
|
</p><div class="docstring">
|
417
426
|
<div class="discussion">
|
418
|
-
|
419
|
-
|
427
|
+
<p>
|
428
|
+
The name and location of the part.
|
429
|
+
</p>
|
420
430
|
|
421
431
|
|
422
432
|
</div>
|
@@ -475,8 +485,9 @@ specified.</p>
|
|
475
485
|
|
476
486
|
</p><div class="docstring">
|
477
487
|
<div class="discussion">
|
478
|
-
|
479
|
-
|
488
|
+
<p>
|
489
|
+
Serializes the Override object to xml
|
490
|
+
</p>
|
480
491
|
|
481
492
|
|
482
493
|
</div>
|
@@ -495,8 +506,9 @@ specified.</p>
|
|
495
506
|
|
496
507
|
|
497
508
|
—
|
498
|
-
<div class='inline'>
|
499
|
-
|
509
|
+
<div class='inline'><p>
|
510
|
+
The document builder instance this objects xml will be added to.
|
511
|
+
</p>
|
500
512
|
</div>
|
501
513
|
|
502
514
|
</li>
|
@@ -531,7 +543,7 @@ specified.</p>
|
|
531
543
|
</div>
|
532
544
|
|
533
545
|
<div id="footer">
|
534
|
-
Generated on
|
546
|
+
Generated on Mon Dec 5 14:21:11 2011 by
|
535
547
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
536
548
|
0.7.3 (ruby-1.8.7).
|
537
549
|
</div>
|
data/doc/Axlsx/Package.html
CHANGED
@@ -94,10 +94,11 @@
|
|
94
94
|
|
95
95
|
<h2>Overview</h2><div class="docstring">
|
96
96
|
<div class="discussion">
|
97
|
-
|
98
|
-
|
97
|
+
<p>
|
98
|
+
Package is responsible for managing all the bits and peices that Open
|
99
99
|
Office XML requires to make a valid xlsx document including valdation and
|
100
|
-
serialization
|
100
|
+
serialization.
|
101
|
+
</p>
|
101
102
|
|
102
103
|
|
103
104
|
</div>
|
@@ -136,31 +137,9 @@ serialization.</p>
|
|
136
137
|
|
137
138
|
|
138
139
|
|
139
|
-
<span class="summary_desc"><div class='inline'>
|
140
|
-
|
141
|
-
</
|
142
|
-
|
143
|
-
</li>
|
144
|
-
|
145
|
-
|
146
|
-
<li class="public ">
|
147
|
-
<span class="summary_signature">
|
148
|
-
|
149
|
-
<a href="#ruport_table-instance_method" title="#ruport_table (instance method)">- (Object) <strong>ruport_table</strong>(table) </a>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
</span>
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
<span class="summary_desc"><div class='inline'>
|
163
|
-
<p>Accepts a ruport table for serialization to xlsx.</p>
|
140
|
+
<span class="summary_desc"><div class='inline'><p>
|
141
|
+
Initializes your package.
|
142
|
+
</p>
|
164
143
|
</div></span>
|
165
144
|
|
166
145
|
</li>
|
@@ -182,8 +161,9 @@ serialization.</p>
|
|
182
161
|
|
183
162
|
|
184
163
|
|
185
|
-
<span class="summary_desc"><div class='inline'>
|
186
|
-
|
164
|
+
<span class="summary_desc"><div class='inline'><p>
|
165
|
+
Serialize your workbook to disk as an xlsx document.
|
166
|
+
</p>
|
187
167
|
</div></span>
|
188
168
|
|
189
169
|
</li>
|
@@ -205,8 +185,9 @@ serialization.</p>
|
|
205
185
|
|
206
186
|
|
207
187
|
|
208
|
-
<span class="summary_desc"><div class='inline'>
|
209
|
-
|
188
|
+
<span class="summary_desc"><div class='inline'><p>
|
189
|
+
Validate all parts of the package against xsd schema.
|
190
|
+
</p>
|
210
191
|
</div></span>
|
211
192
|
|
212
193
|
</li>
|
@@ -228,8 +209,9 @@ serialization.</p>
|
|
228
209
|
|
229
210
|
|
230
211
|
|
231
|
-
<span class="summary_desc"><div class='inline'>
|
232
|
-
|
212
|
+
<span class="summary_desc"><div class='inline'><p>
|
213
|
+
The workbook this package will serialize or validate.
|
214
|
+
</p>
|
233
215
|
</div></span>
|
234
216
|
|
235
217
|
</li>
|
@@ -271,8 +253,9 @@ serialization.</p>
|
|
271
253
|
|
272
254
|
</p><div class="docstring">
|
273
255
|
<div class="discussion">
|
274
|
-
|
275
|
-
|
256
|
+
<p>
|
257
|
+
Initializes your package
|
258
|
+
</p>
|
276
259
|
|
277
260
|
|
278
261
|
</div>
|
@@ -282,8 +265,9 @@ serialization.</p>
|
|
282
265
|
<div class="examples">
|
283
266
|
<h3>Examples:</h3>
|
284
267
|
|
285
|
-
<h4><div class='inline'>
|
286
|
-
|
268
|
+
<h4><div class='inline'><p>
|
269
|
+
Package.new :author => ‘you!’, :workbook => Workbook.new
|
270
|
+
</p>
|
287
271
|
</div></h4>
|
288
272
|
<pre class="example code">
|
289
273
|
</pre>
|
@@ -304,9 +288,10 @@ serialization.</p>
|
|
304
288
|
|
305
289
|
|
306
290
|
—
|
307
|
-
<div class='inline'>
|
308
|
-
|
309
|
-
package
|
291
|
+
<div class='inline'><p>
|
292
|
+
A hash that you can use to specify the author and workbook for this
|
293
|
+
package.
|
294
|
+
</p>
|
310
295
|
</div>
|
311
296
|
|
312
297
|
</li>
|
@@ -325,8 +310,9 @@ package.</p>
|
|
325
310
|
<span class="default">
|
326
311
|
|
327
312
|
</span>
|
328
|
-
— <div class='inline'>
|
329
|
-
|
313
|
+
— <div class='inline'><p>
|
314
|
+
The author of the document
|
315
|
+
</p>
|
330
316
|
</div>
|
331
317
|
</li>
|
332
318
|
|
@@ -359,8 +345,9 @@ package.</p>
|
|
359
345
|
|
360
346
|
|
361
347
|
—
|
362
|
-
<div class='inline'>
|
363
|
-
|
348
|
+
<div class='inline'><p>
|
349
|
+
the object that the method was called on
|
350
|
+
</p>
|
364
351
|
</div>
|
365
352
|
|
366
353
|
</li>
|
@@ -403,67 +390,7 @@ package.</p>
|
|
403
390
|
|
404
391
|
|
405
392
|
<div class="method_details first">
|
406
|
-
<p class="signature first" id="
|
407
|
-
|
408
|
-
- (<tt>Object</tt>) <strong>ruport_table</strong>(table)
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
</p><div class="docstring">
|
413
|
-
<div class="discussion">
|
414
|
-
|
415
|
-
<p>Accepts a ruport table for serialization to xlsx</p>
|
416
|
-
|
417
|
-
|
418
|
-
</div>
|
419
|
-
</div>
|
420
|
-
<div class="tags">
|
421
|
-
<h3>Parameters:</h3>
|
422
|
-
<ul class="param">
|
423
|
-
|
424
|
-
<li>
|
425
|
-
|
426
|
-
<span class='name'>table</span>
|
427
|
-
|
428
|
-
|
429
|
-
<span class='type'>(<tt>Table</tt>)</span>
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
—
|
434
|
-
<div class='inline'>
|
435
|
-
<p>a ruport Table object</p>
|
436
|
-
</div>
|
437
|
-
|
438
|
-
</li>
|
439
|
-
|
440
|
-
</ul>
|
441
|
-
|
442
|
-
|
443
|
-
</div><table class="source_code">
|
444
|
-
<tr>
|
445
|
-
<td>
|
446
|
-
<pre class="lines">
|
447
|
-
|
448
|
-
|
449
|
-
21
|
450
|
-
22
|
451
|
-
23</pre>
|
452
|
-
</td>
|
453
|
-
<td>
|
454
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line 21</span>
|
455
|
-
|
456
|
-
<span class='def def kw'>def</span> <span class='ruport_table identifier id'>ruport_table</span><span class='lparen token'>(</span><span class='table identifier id'>table</span><span class='rparen token'>)</span>
|
457
|
-
<span class='puts identifier id'>puts</span> <span class='table identifier id'>table</span>
|
458
|
-
<span class='end end kw'>end</span>
|
459
|
-
</pre>
|
460
|
-
</td>
|
461
|
-
</tr>
|
462
|
-
</table>
|
463
|
-
</div>
|
464
|
-
|
465
|
-
<div class="method_details ">
|
466
|
-
<p class="signature " id="serialize-instance_method">
|
393
|
+
<p class="signature first" id="serialize-instance_method">
|
467
394
|
|
468
395
|
- (<tt>Boolean</tt>) <strong>serialize</strong>(output, confirm_valid = false)
|
469
396
|
|
@@ -474,15 +401,17 @@ package.</p>
|
|
474
401
|
|
475
402
|
<div class="note notetag">
|
476
403
|
<strong>Note:</strong>
|
477
|
-
<div class='inline'>
|
478
|
-
|
404
|
+
<div class='inline'><p>
|
405
|
+
A tremendous amount of effort has gone into ensuring that you cannot create
|
479
406
|
invalid xlsx documents. confirm_valid should be used in the rare case that
|
480
|
-
you cannot open the serialized file
|
407
|
+
you cannot open the serialized file.
|
408
|
+
</p>
|
481
409
|
</div>
|
482
410
|
</div>
|
483
411
|
|
484
|
-
|
485
|
-
|
412
|
+
<p>
|
413
|
+
Serialize your workbook to disk as an xlsx document.
|
414
|
+
</p>
|
486
415
|
|
487
416
|
|
488
417
|
</div>
|
@@ -515,8 +444,9 @@ you cannot open the serialized file.</p>
|
|
515
444
|
|
516
445
|
|
517
446
|
—
|
518
|
-
<div class='inline'>
|
519
|
-
|
447
|
+
<div class='inline'><p>
|
448
|
+
The file you want to serialize your package to
|
449
|
+
</p>
|
520
450
|
</div>
|
521
451
|
|
522
452
|
</li>
|
@@ -533,8 +463,9 @@ you cannot open the serialized file.</p>
|
|
533
463
|
|
534
464
|
|
535
465
|
—
|
536
|
-
<div class='inline'>
|
537
|
-
|
466
|
+
<div class='inline'><p>
|
467
|
+
Validate the package prior to serialization.
|
468
|
+
</p>
|
538
469
|
</div>
|
539
470
|
|
540
471
|
</li>
|
@@ -552,9 +483,10 @@ you cannot open the serialized file.</p>
|
|
552
483
|
|
553
484
|
|
554
485
|
—
|
555
|
-
<div class='inline'>
|
556
|
-
|
557
|
-
serialized
|
486
|
+
<div class='inline'><p>
|
487
|
+
False if confirm_valid and validation errors exist. True if the package was
|
488
|
+
serialized
|
489
|
+
</p>
|
558
490
|
</div>
|
559
491
|
|
560
492
|
</li>
|
@@ -574,7 +506,6 @@ serialized</p>
|
|
574
506
|
<pre class="lines">
|
575
507
|
|
576
508
|
|
577
|
-
61
|
578
509
|
62
|
579
510
|
63
|
580
511
|
64
|
@@ -591,10 +522,11 @@ serialized</p>
|
|
591
522
|
75
|
592
523
|
76
|
593
524
|
77
|
594
|
-
78
|
525
|
+
78
|
526
|
+
79</pre>
|
595
527
|
</td>
|
596
528
|
<td>
|
597
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line
|
529
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line 62</span>
|
598
530
|
|
599
531
|
<span class='def def kw'>def</span> <span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='output identifier id'>output</span><span class='comma token'>,</span> <span class='confirm_valid identifier id'>confirm_valid</span><span class='assign token'>=</span><span class='false false kw'>false</span><span class='rparen token'>)</span>
|
600
532
|
<span class='return return kw'>return</span> <span class='false false kw'>false</span> <span class='unless unless_mod kw'>unless</span> <span class='notop op'>!</span><span class='confirm_valid identifier id'>confirm_valid</span> <span class='orop op'>||</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='validate identifier id'>validate</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span>
|
@@ -632,22 +564,25 @@ serialized</p>
|
|
632
564
|
|
633
565
|
<div class="note notetag">
|
634
566
|
<strong>Note:</strong>
|
635
|
-
<div class='inline'>
|
636
|
-
|
567
|
+
<div class='inline'><p>
|
568
|
+
This gem includes all schema from OfficeOpenXML-XMLSchema-Transitional.zip
|
637
569
|
and OpenPackagingConventions-XMLSchema.zip as per ECMA-376, Third edition.
|
638
570
|
opc schema require an internet connection to import remote schema from
|
639
571
|
dublin core for dc, dcterms and xml namespaces. Those remote schema are
|
640
|
-
included in this gem, and the original files have been altered to
|
641
|
-
the local versions
|
642
|
-
|
643
|
-
<p>
|
572
|
+
included in this gem, and the original files have been altered to refer to
|
573
|
+
the local versions.
|
574
|
+
</p>
|
575
|
+
<p>
|
576
|
+
If by chance you are able to creat a package that does not validate it
|
644
577
|
indicates that the internal validation is not robust enough and needs to be
|
645
|
-
improved. Please report your errors to the gem author
|
578
|
+
improved. Please report your errors to the gem author.
|
579
|
+
</p>
|
646
580
|
</div>
|
647
581
|
</div>
|
648
582
|
|
649
|
-
|
650
|
-
|
583
|
+
<p>
|
584
|
+
Validate all parts of the package against xsd schema.
|
585
|
+
</p>
|
651
586
|
|
652
587
|
|
653
588
|
</div>
|
@@ -677,8 +612,9 @@ improved. Please report your errors to the gem author.</p>
|
|
677
612
|
|
678
613
|
|
679
614
|
—
|
680
|
-
<div class='inline'>
|
681
|
-
|
615
|
+
<div class='inline'><p>
|
616
|
+
An array of all validation errors found.
|
617
|
+
</p>
|
682
618
|
</div>
|
683
619
|
|
684
620
|
</li>
|
@@ -698,14 +634,14 @@ improved. Please report your errors to the gem author.</p>
|
|
698
634
|
<pre class="lines">
|
699
635
|
|
700
636
|
|
701
|
-
95
|
702
|
-
96
|
703
637
|
97
|
704
638
|
98
|
705
|
-
99
|
639
|
+
99
|
640
|
+
100
|
641
|
+
101</pre>
|
706
642
|
</td>
|
707
643
|
<td>
|
708
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line
|
644
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line 97</span>
|
709
645
|
|
710
646
|
<span class='def def kw'>def</span> <span class='validate identifier id'>validate</span>
|
711
647
|
<span class='errors identifier id'>errors</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
@@ -730,23 +666,25 @@ improved. Please report your errors to the gem author.</p>
|
|
730
666
|
|
731
667
|
<div class="note notetag">
|
732
668
|
<strong>Note:</strong>
|
733
|
-
<div class='inline'>
|
734
|
-
|
735
|
-
are a few examples
|
736
|
-
|
737
|
-
<pre class="
|
738
|
-
<span class=
|
739
|
-
|
740
|
-
|
741
|
-
<span class=
|
742
|
-
<span class=
|
743
|
-
<span class=
|
669
|
+
<div class='inline'><p>
|
670
|
+
As there are multiple ways to instantiate a workbook for the package, here
|
671
|
+
are a few examples:
|
672
|
+
</p>
|
673
|
+
<pre class="code">
|
674
|
+
<span class='comment val'># assign directly during package instanciation</span>
|
675
|
+
<span class='wb identifier id'>wb</span> <span class='assign token'>=</span> <span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:workbook</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span>
|
676
|
+
|
677
|
+
<span class='comment val'># get a fresh workbook automatically from the package</span>
|
678
|
+
<span class='wb identifier id'>wb</span> <span class='assign token'>=</span> <span class='Pacakge constant id'>Pacakge</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span>
|
679
|
+
<span class='comment val'># # set the workbook after creating the package</span>
|
680
|
+
<span class='wb identifier id'>wb</span> <span class='assign token'>=</span> <span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span> <span class='assign token'>=</span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
744
681
|
</pre>
|
745
682
|
</div>
|
746
683
|
</div>
|
747
684
|
|
748
|
-
|
749
|
-
|
685
|
+
<p>
|
686
|
+
The workbook this package will serialize or validate.
|
687
|
+
</p>
|
750
688
|
|
751
689
|
|
752
690
|
</div>
|
@@ -777,9 +715,10 @@ are a few examples:</p>
|
|
777
715
|
|
778
716
|
|
779
717
|
—
|
780
|
-
<div class='inline'>
|
781
|
-
|
782
|
-
instance is returned
|
718
|
+
<div class='inline'><p>
|
719
|
+
If no workbook instance has been assigned with this package a new Workbook
|
720
|
+
instance is returned.
|
721
|
+
</p>
|
783
722
|
</div>
|
784
723
|
|
785
724
|
</li>
|
@@ -796,8 +735,9 @@ instance is returned.</p>
|
|
796
735
|
|
797
736
|
|
798
737
|
|
799
|
-
<div class='inline'>
|
800
|
-
|
738
|
+
<div class='inline'><p>
|
739
|
+
ArgumentError if workbook parameter is not a Workbook instance.
|
740
|
+
</p>
|
801
741
|
</div>
|
802
742
|
|
803
743
|
</li>
|
@@ -810,14 +750,14 @@ instance is returned.</p>
|
|
810
750
|
<pre class="lines">
|
811
751
|
|
812
752
|
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
753
|
+
31
|
754
|
+
32
|
755
|
+
33
|
756
|
+
34
|
757
|
+
35</pre>
|
818
758
|
</td>
|
819
759
|
<td>
|
820
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line
|
760
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line 31</span>
|
821
761
|
|
822
762
|
<span class='def def kw'>def</span> <span class='workbook identifier id'>workbook</span>
|
823
763
|
<span class='@workbook ivar id'>@workbook</span> <span class='orop op'>||</span> <span class='@workbook ivar id'>@workbook</span> <span class='assign token'>=</span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
@@ -859,10 +799,10 @@ instance is returned.</p>
|
|
859
799
|
<pre class="lines">
|
860
800
|
|
861
801
|
|
862
|
-
|
802
|
+
45</pre>
|
863
803
|
</td>
|
864
804
|
<td>
|
865
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line
|
805
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/package.rb', line 45</span>
|
866
806
|
|
867
807
|
<span class='def def kw'>def</span> <span class='workbook= identifier id'>workbook=</span><span class='lparen token'>(</span><span class='workbook identifier id'>workbook</span><span class='rparen token'>)</span> <span class='DataTypeValidator constant id'>DataTypeValidator</span><span class='dot token'>.</span><span class='validate identifier id'>validate</span> <span class='string val'>"Package.workbook"</span><span class='comma token'>,</span> <span class='Workbook constant id'>Workbook</span><span class='comma token'>,</span> <span class='workbook identifier id'>workbook</span><span class='semicolon token'>;</span> <span class='@workbook ivar id'>@workbook</span> <span class='assign token'>=</span> <span class='workbook identifier id'>workbook</span> <span class='end end kw'>end</span>
|
868
808
|
</pre>
|
@@ -876,7 +816,7 @@ instance is returned.</p>
|
|
876
816
|
</div>
|
877
817
|
|
878
818
|
<div id="footer">
|
879
|
-
Generated on
|
819
|
+
Generated on Mon Dec 5 14:21:15 2011 by
|
880
820
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
881
821
|
0.7.3 (ruby-1.8.7).
|
882
822
|
</div>
|