axlsx 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +10 -9
- data/doc/Axlsx.html +2443 -0
- data/doc/Axlsx/App.html +2640 -0
- data/doc/Axlsx/Axis.html +1047 -0
- data/doc/Axlsx/Bar3DChart.html +1153 -0
- data/doc/Axlsx/BarSeries.html +764 -0
- data/doc/Axlsx/Border.html +775 -0
- data/doc/Axlsx/BorderPr.html +709 -0
- data/doc/Axlsx/CatAxis.html +766 -0
- data/doc/Axlsx/Cell.html +1623 -0
- data/doc/Axlsx/CellAlignment.html +1247 -0
- data/doc/Axlsx/CellProtection.html +565 -0
- data/doc/Axlsx/CellStyle.html +949 -0
- data/doc/Axlsx/Chart.html +1459 -0
- data/doc/Axlsx/Color.html +665 -0
- data/doc/Axlsx/ContentType.html +340 -0
- data/doc/Axlsx/Core.html +465 -0
- data/doc/Axlsx/DataTypeValidator.html +324 -0
- data/doc/Axlsx/Default.html +575 -0
- data/doc/Axlsx/Drawing.html +1154 -0
- data/doc/Axlsx/Fill.html +460 -0
- data/doc/Axlsx/Font.html +1554 -0
- data/doc/Axlsx/GradientFill.html +1026 -0
- data/doc/Axlsx/GradientStop.html +526 -0
- data/doc/Axlsx/GraphicFrame.html +646 -0
- data/doc/Axlsx/Line3DChart.html +921 -0
- data/doc/Axlsx/LineSeries.html +656 -0
- data/doc/Axlsx/Marker.html +857 -0
- data/doc/Axlsx/NumFmt.html +562 -0
- data/doc/Axlsx/Override.html +568 -0
- data/doc/Axlsx/Package.html +1293 -0
- data/doc/Axlsx/PatternFill.html +681 -0
- data/doc/Axlsx/Pie3DChart.html +439 -0
- data/doc/Axlsx/PieSeries.html +762 -0
- data/doc/Axlsx/RegexValidator.html +268 -0
- data/doc/Axlsx/Relationship.html +554 -0
- data/doc/Axlsx/Relationships.html +343 -0
- data/doc/Axlsx/RestrictionValidator.html +300 -0
- data/doc/Axlsx/Row.html +771 -0
- data/doc/Axlsx/Scaling.html +740 -0
- data/doc/Axlsx/SerAxis.html +624 -0
- data/doc/Axlsx/Series.html +746 -0
- data/doc/Axlsx/SeriesTitle.html +289 -0
- data/doc/Axlsx/SimpleTypedList.html +1617 -0
- data/doc/Axlsx/Styles.html +1754 -0
- data/doc/Axlsx/TableStyle.html +710 -0
- data/doc/Axlsx/TableStyleElement.html +677 -0
- data/doc/Axlsx/TableStyles.html +599 -0
- data/doc/Axlsx/Title.html +625 -0
- data/doc/Axlsx/TwoCellAnchor.html +1115 -0
- data/doc/Axlsx/ValAxis.html +539 -0
- data/doc/Axlsx/View3D.html +971 -0
- data/doc/Axlsx/Workbook.html +1347 -0
- data/doc/Axlsx/Worksheet.html +1864 -0
- data/doc/Axlsx/Xf.html +1681 -0
- data/doc/_index.html +611 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +262 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +262 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +167 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +3038 -0
- data/doc/top-level-namespace.html +103 -0
- data/lib/axlsx/util/constants.rb +1 -1
- metadata +71 -3
@@ -0,0 +1,289 @@
|
|
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: Axlsx::SeriesTitle
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.3
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../_index.html">Index (S)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Axlsx.html" title="Axlsx (module)">Axlsx</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">SeriesTitle</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Class: Axlsx::SeriesTitle
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
<dt class="r1">Inherits:</dt>
|
68
|
+
<dd class="r1">
|
69
|
+
<span class="inheritName"><span class='object_link'><a href="Title.html" title="Axlsx::Title (class)">Title</a></span></span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next"><span class='object_link'><a href="Title.html" title="Axlsx::Title (class)">Title</a></span></li>
|
75
|
+
|
76
|
+
<li class="next">Axlsx::SeriesTitle</li>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
<a href="#" class="inheritanceTree">show all</a>
|
80
|
+
|
81
|
+
</dd>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
<dt class="r2 last">Defined in:</dt>
|
92
|
+
<dd class="r2 last">lib/axlsx/drawing/series_title.rb</dd>
|
93
|
+
|
94
|
+
</dl>
|
95
|
+
<div class="clear"></div>
|
96
|
+
|
97
|
+
<h2>Overview</h2><div class="docstring">
|
98
|
+
<div class="discussion">
|
99
|
+
<p>
|
100
|
+
A series title is a Title with a slightly different serialization
|
101
|
+
</p>
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
<div class="tags">
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<h2>Instance Attribute Summary</h2>
|
121
|
+
|
122
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Title.html" title="Axlsx::Title (class)">Title</a></span></h3>
|
123
|
+
<p class="inherited"><span class='object_link'><a href="Title.html#cell-instance_method" title="Axlsx::Title#cell (method)">cell</a></span>, <span class='object_link'><a href="Title.html#text-instance_method" title="Axlsx::Title#text (method)">text</a></span></p>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<h2>
|
128
|
+
Instance Method Summary
|
129
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
130
|
+
</h2>
|
131
|
+
|
132
|
+
<ul class="summary">
|
133
|
+
|
134
|
+
<li class="public ">
|
135
|
+
<span class="summary_signature">
|
136
|
+
|
137
|
+
<a href="#to_xml-instance_method" title="#to_xml (instance method)">- (String) <strong>to_xml</strong>(xml) </a>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
</span>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<span class="summary_desc"><div class='inline'><p>
|
151
|
+
Serializes the series title.
|
152
|
+
</p>
|
153
|
+
</div></span>
|
154
|
+
|
155
|
+
</li>
|
156
|
+
|
157
|
+
|
158
|
+
</ul>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Title.html" title="Axlsx::Title (class)">Title</a></span></h3>
|
170
|
+
<p class="inherited"><span class='object_link'><a href="Title.html#initialize-instance_method" title="Axlsx::Title#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Title.html#range-instance_method" title="Axlsx::Title#range (method)">#range</a></span></p>
|
171
|
+
<div id="constructor_details" class="method_details_list">
|
172
|
+
<h2>Constructor Details</h2>
|
173
|
+
|
174
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Title.html#initialize-instance_method" title="Axlsx::Title#initialize (method)">Axlsx::Title</a></span></p>
|
175
|
+
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
<div id="instance_method_details" class="method_details_list">
|
180
|
+
<h2>Instance Method Details</h2>
|
181
|
+
|
182
|
+
|
183
|
+
<div class="method_details first">
|
184
|
+
<p class="signature first" id="to_xml-instance_method">
|
185
|
+
|
186
|
+
- (<tt>String</tt>) <strong>to_xml</strong>(xml)
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
</p><div class="docstring">
|
191
|
+
<div class="discussion">
|
192
|
+
<p>
|
193
|
+
Serializes the series title
|
194
|
+
</p>
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="tags">
|
200
|
+
<h3>Parameters:</h3>
|
201
|
+
<ul class="param">
|
202
|
+
|
203
|
+
<li>
|
204
|
+
|
205
|
+
<span class='name'>xml</span>
|
206
|
+
|
207
|
+
|
208
|
+
<span class='type'>(<tt>Nokogiri::XML::Builder</tt>)</span>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
—
|
213
|
+
<div class='inline'><p>
|
214
|
+
The document builder instance this objects xml will be added to.
|
215
|
+
</p>
|
216
|
+
</div>
|
217
|
+
|
218
|
+
</li>
|
219
|
+
|
220
|
+
</ul>
|
221
|
+
|
222
|
+
<h3>Returns:</h3>
|
223
|
+
<ul class="return">
|
224
|
+
|
225
|
+
<li>
|
226
|
+
|
227
|
+
|
228
|
+
<span class='type'>(<tt>String</tt>)</span>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
</li>
|
233
|
+
|
234
|
+
</ul>
|
235
|
+
|
236
|
+
</div><table class="source_code">
|
237
|
+
<tr>
|
238
|
+
<td>
|
239
|
+
<pre class="lines">
|
240
|
+
|
241
|
+
|
242
|
+
8
|
243
|
+
9
|
244
|
+
10
|
245
|
+
11
|
246
|
+
12
|
247
|
+
13
|
248
|
+
14
|
249
|
+
15
|
250
|
+
16
|
251
|
+
17
|
252
|
+
18
|
253
|
+
19
|
254
|
+
20</pre>
|
255
|
+
</td>
|
256
|
+
<td>
|
257
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/series_title.rb', line 8</span>
|
258
|
+
|
259
|
+
<span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span>
|
260
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:tx'</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
|
261
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:strRef'</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
|
262
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:f'</span><span class='comma token'>,</span> <span class='range identifier id'>range</span><span class='rparen token'>)</span>
|
263
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:strCache'</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
|
264
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:ptCount'</span><span class='comma token'>,</span> <span class='symbol val'>:val=</span><span class='gt op'>></span><span class='integer val'>1</span><span class='rparen token'>)</span>
|
265
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:pt'</span><span class='comma token'>,</span> <span class='symbol val'>:idx=</span><span class='gt op'>></span><span class='integer val'>0</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
|
266
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:v'</span><span class='comma token'>,</span> <span class='@text ivar id'>@text</span><span class='rparen token'>)</span>
|
267
|
+
<span class='rbrace token'>}</span>
|
268
|
+
<span class='rbrace token'>}</span>
|
269
|
+
<span class='rbrace token'>}</span>
|
270
|
+
<span class='rbrace token'>}</span>
|
271
|
+
<span class='end end kw'>end</span>
|
272
|
+
</pre>
|
273
|
+
</td>
|
274
|
+
</tr>
|
275
|
+
</table>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
</div>
|
279
|
+
|
280
|
+
</div>
|
281
|
+
|
282
|
+
<div id="footer">
|
283
|
+
Generated on Tue Nov 22 00:27:38 2011 by
|
284
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
285
|
+
0.7.3 (ruby-1.8.7).
|
286
|
+
</div>
|
287
|
+
|
288
|
+
</body>
|
289
|
+
</html>
|
@@ -0,0 +1,1617 @@
|
|
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: Axlsx::SimpleTypedList
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.3
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../_index.html">Index (S)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Axlsx.html" title="Axlsx (module)">Axlsx</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">SimpleTypedList</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Class: Axlsx::SimpleTypedList
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
<dt class="r1">Inherits:</dt>
|
68
|
+
<dd class="r1">
|
69
|
+
<span class="inheritName">Object</span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next">Axlsx::SimpleTypedList</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
90
|
+
<dd class="r2 last">lib/axlsx/util/simple_typed_list.rb</dd>
|
91
|
+
|
92
|
+
</dl>
|
93
|
+
<div class="clear"></div>
|
94
|
+
|
95
|
+
<h2>Overview</h2><div class="docstring">
|
96
|
+
<div class="discussion">
|
97
|
+
<p>
|
98
|
+
A SimpleTypedList is a type restrictive collection that allows some of the
|
99
|
+
methods from Array and supports basic xml serialization.
|
100
|
+
</p>
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
<div class="tags">
|
106
|
+
|
107
|
+
|
108
|
+
</div><div id="subclasses">
|
109
|
+
<h2>Direct Known Subclasses</h2>
|
110
|
+
<p class="children"><span class='object_link'><a href="ContentType.html" title="Axlsx::ContentType (class)">ContentType</a></span>, <span class='object_link'><a href="Relationships.html" title="Axlsx::Relationships (class)">Relationships</a></span>, <span class='object_link'><a href="TableStyle.html" title="Axlsx::TableStyle (class)">TableStyle</a></span>, <span class='object_link'><a href="TableStyles.html" title="Axlsx::TableStyles (class)">TableStyles</a></span></p>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
|
114
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
115
|
+
<ul class="summary">
|
116
|
+
|
117
|
+
<li class="public ">
|
118
|
+
<span class="summary_signature">
|
119
|
+
|
120
|
+
<a href="#allowed_types-instance_method" title="#allowed_types (instance method)">- (Array) <strong>allowed_types</strong> </a>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</span>
|
125
|
+
|
126
|
+
|
127
|
+
<span class="note title readonly">readonly</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<span class="summary_desc"><div class='inline'><p>
|
137
|
+
The class constants of allowed types.
|
138
|
+
</p>
|
139
|
+
</div></span>
|
140
|
+
|
141
|
+
</li>
|
142
|
+
|
143
|
+
|
144
|
+
<li class="public ">
|
145
|
+
<span class="summary_signature">
|
146
|
+
|
147
|
+
<a href="#locked_at-instance_method" title="#locked_at (instance method)">- (Integer) <strong>locked_at</strong> </a>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
</span>
|
152
|
+
|
153
|
+
|
154
|
+
<span class="note title readonly">readonly</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
<span class="summary_desc"><div class='inline'><p>
|
164
|
+
The index below which items cannot be removed.
|
165
|
+
</p>
|
166
|
+
</div></span>
|
167
|
+
|
168
|
+
</li>
|
169
|
+
|
170
|
+
|
171
|
+
<li class="public ">
|
172
|
+
<span class="summary_signature">
|
173
|
+
|
174
|
+
<a href="#serialize_as-instance_method" title="#serialize_as (instance method)">- (String) <strong>serialize_as</strong> </a>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
</span>
|
179
|
+
|
180
|
+
|
181
|
+
<span class="note title readonly">readonly</span>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="summary_desc"><div class='inline'><p>
|
191
|
+
The tag name to use when serializing this object by default the parent node
|
192
|
+
for all items in the list is the classname of the first allowed type with
|
193
|
+
the first letter in lowercase.
|
194
|
+
</p>
|
195
|
+
</div></span>
|
196
|
+
|
197
|
+
</li>
|
198
|
+
|
199
|
+
|
200
|
+
</ul>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<h2>
|
207
|
+
Instance Method Summary
|
208
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
209
|
+
</h2>
|
210
|
+
|
211
|
+
<ul class="summary">
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#%3C%3C-instance_method" title="#<< (instance method)">- (Integer) <strong><<</strong>(v) </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<span class="summary_desc"><div class='inline'><p>
|
230
|
+
Concat operator.
|
231
|
+
</p>
|
232
|
+
</div></span>
|
233
|
+
|
234
|
+
</li>
|
235
|
+
|
236
|
+
|
237
|
+
<li class="public ">
|
238
|
+
<span class="summary_signature">
|
239
|
+
|
240
|
+
<a href="#%5B%5D%3D-instance_method" title="#[]= (instance method)">- (Object) <strong>[]=</strong>(index, v) </a>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
</span>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
<span class="summary_desc"><div class='inline'><p>
|
254
|
+
positional assignment.
|
255
|
+
</p>
|
256
|
+
</div></span>
|
257
|
+
|
258
|
+
</li>
|
259
|
+
|
260
|
+
|
261
|
+
<li class="public ">
|
262
|
+
<span class="summary_signature">
|
263
|
+
|
264
|
+
<a href="#delete-instance_method" title="#delete (instance method)">- (Any) <strong>delete</strong>(v) </a>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</span>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<span class="summary_desc"><div class='inline'><p>
|
278
|
+
delete the item from the list.
|
279
|
+
</p>
|
280
|
+
</div></span>
|
281
|
+
|
282
|
+
</li>
|
283
|
+
|
284
|
+
|
285
|
+
<li class="public ">
|
286
|
+
<span class="summary_signature">
|
287
|
+
|
288
|
+
<a href="#delete_at-instance_method" title="#delete_at (instance method)">- (Any) <strong>delete_at</strong>(index) </a>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
</span>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<span class="summary_desc"><div class='inline'><p>
|
302
|
+
delete the item from the list at the index position provided.
|
303
|
+
</p>
|
304
|
+
</div></span>
|
305
|
+
|
306
|
+
</li>
|
307
|
+
|
308
|
+
|
309
|
+
<li class="public ">
|
310
|
+
<span class="summary_signature">
|
311
|
+
|
312
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (SimpleTypedList) <strong>initialize</strong>(type, serialize_as = nil) </a>
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
</span>
|
317
|
+
|
318
|
+
<span class="note title constructor">constructor</span>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
<span class="summary_desc"><div class='inline'><p>
|
328
|
+
Creats a new typed list.
|
329
|
+
</p>
|
330
|
+
</div></span>
|
331
|
+
|
332
|
+
</li>
|
333
|
+
|
334
|
+
|
335
|
+
<li class="public ">
|
336
|
+
<span class="summary_signature">
|
337
|
+
|
338
|
+
<a href="#lock-instance_method" title="#lock (instance method)">- (self) <strong>lock</strong> </a>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</span>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
<span class="summary_desc"><div class='inline'><p>
|
352
|
+
Lock this list at the current size.
|
353
|
+
</p>
|
354
|
+
</div></span>
|
355
|
+
|
356
|
+
</li>
|
357
|
+
|
358
|
+
|
359
|
+
<li class="public ">
|
360
|
+
<span class="summary_signature">
|
361
|
+
|
362
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(meth, *args, &block) </a>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
</span>
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
<span class="summary_desc"><div class='inline'><p>
|
376
|
+
method_mission override to pass allowed methods to the list.
|
377
|
+
</p>
|
378
|
+
</div></span>
|
379
|
+
|
380
|
+
</li>
|
381
|
+
|
382
|
+
|
383
|
+
<li class="public ">
|
384
|
+
<span class="summary_signature">
|
385
|
+
|
386
|
+
<a href="#protected%3F-instance_method" title="#protected? (instance method)">- (Boolean) <strong>protected?</strong>(index) </a>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
</span>
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
<span class="summary_desc"><div class='inline'><p>
|
400
|
+
determines if the index is protected.
|
401
|
+
</p>
|
402
|
+
</div></span>
|
403
|
+
|
404
|
+
</li>
|
405
|
+
|
406
|
+
|
407
|
+
<li class="public ">
|
408
|
+
<span class="summary_signature">
|
409
|
+
|
410
|
+
<a href="#push-instance_method" title="#push (instance method)">- (Object) <strong>push</strong>(v) </a>
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
</span>
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
<span class="summary_desc"><div class='inline'><p>
|
424
|
+
alternate of << method.
|
425
|
+
</p>
|
426
|
+
</div></span>
|
427
|
+
|
428
|
+
</li>
|
429
|
+
|
430
|
+
|
431
|
+
<li class="public ">
|
432
|
+
<span class="summary_signature">
|
433
|
+
|
434
|
+
<a href="#to_xml-instance_method" title="#to_xml (instance method)">- (String) <strong>to_xml</strong>(xml) </a>
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
</span>
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
<span class="summary_desc"><div class='inline'><p>
|
448
|
+
Serializes the list If the serialize_as property is set, it is used as the
|
449
|
+
parent node name.
|
450
|
+
</p>
|
451
|
+
</div></span>
|
452
|
+
|
453
|
+
</li>
|
454
|
+
|
455
|
+
|
456
|
+
<li class="public ">
|
457
|
+
<span class="summary_signature">
|
458
|
+
|
459
|
+
<a href="#unlock-instance_method" title="#unlock (instance method)">- (self) <strong>unlock</strong> </a>
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
</span>
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
<span class="summary_desc"><div class='inline'><p>
|
473
|
+
Unlock the list.
|
474
|
+
</p>
|
475
|
+
</div></span>
|
476
|
+
|
477
|
+
</li>
|
478
|
+
|
479
|
+
|
480
|
+
</ul>
|
481
|
+
|
482
|
+
|
483
|
+
<div id="constructor_details" class="method_details_list">
|
484
|
+
<h2>Constructor Details</h2>
|
485
|
+
|
486
|
+
<div class="method_details first">
|
487
|
+
<p class="signature first" id="initialize-instance_method">
|
488
|
+
|
489
|
+
- (<tt><span class='object_link'><a href="" title="Axlsx::SimpleTypedList (class)">SimpleTypedList</a></span></tt>) <strong>initialize</strong>(type, serialize_as = nil)
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
</p><div class="docstring">
|
494
|
+
<div class="discussion">
|
495
|
+
<p>
|
496
|
+
Creats a new typed list
|
497
|
+
</p>
|
498
|
+
|
499
|
+
|
500
|
+
</div>
|
501
|
+
</div>
|
502
|
+
<div class="tags">
|
503
|
+
<h3>Parameters:</h3>
|
504
|
+
<ul class="param">
|
505
|
+
|
506
|
+
<li>
|
507
|
+
|
508
|
+
<span class='name'>type</span>
|
509
|
+
|
510
|
+
|
511
|
+
<span class='type'>(<tt>Array</tt>, <tt>Class</tt>)</span>
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
—
|
516
|
+
<div class='inline'><p>
|
517
|
+
An array of Class objects or a single Class object
|
518
|
+
</p>
|
519
|
+
</div>
|
520
|
+
|
521
|
+
</li>
|
522
|
+
|
523
|
+
<li>
|
524
|
+
|
525
|
+
<span class='name'>serialize</span>
|
526
|
+
|
527
|
+
|
528
|
+
<span class='type'>(<tt>String</tt>)</span>
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
—
|
533
|
+
<div class='inline'><p>
|
534
|
+
The tag name to use in serialization
|
535
|
+
</p>
|
536
|
+
</div>
|
537
|
+
|
538
|
+
</li>
|
539
|
+
|
540
|
+
</ul>
|
541
|
+
|
542
|
+
<h3>Raises:</h3>
|
543
|
+
<ul class="raise">
|
544
|
+
|
545
|
+
<li>
|
546
|
+
|
547
|
+
|
548
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
—
|
553
|
+
<div class='inline'><p>
|
554
|
+
if all members of type are not Class objects
|
555
|
+
</p>
|
556
|
+
</div>
|
557
|
+
|
558
|
+
</li>
|
559
|
+
|
560
|
+
</ul>
|
561
|
+
|
562
|
+
</div><table class="source_code">
|
563
|
+
<tr>
|
564
|
+
<td>
|
565
|
+
<pre class="lines">
|
566
|
+
|
567
|
+
|
568
|
+
22
|
569
|
+
23
|
570
|
+
24
|
571
|
+
25
|
572
|
+
26
|
573
|
+
27
|
574
|
+
28
|
575
|
+
29
|
576
|
+
30
|
577
|
+
31
|
578
|
+
32
|
579
|
+
33</pre>
|
580
|
+
</td>
|
581
|
+
<td>
|
582
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 22</span>
|
583
|
+
|
584
|
+
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span> <span class='type identifier id'>type</span><span class='comma token'>,</span> <span class='serialize_as identifier id'>serialize_as</span><span class='assign token'>=</span><span class='nil nil kw'>nil</span>
|
585
|
+
<span class='if if kw'>if</span> <span class='type identifier id'>type</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span> <span class='Array constant id'>Array</span>
|
586
|
+
<span class='type identifier id'>type</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='item identifier id'>item</span><span class='bitor op'>|</span> <span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='string val'>"All members of type must be Class objects"</span> <span class='unless unless_mod kw'>unless</span> <span class='item identifier id'>item</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span> <span class='Class constant id'>Class</span> <span class='rbrace token'>}</span>
|
587
|
+
<span class='@allowed_types ivar id'>@allowed_types</span> <span class='assign token'>=</span> <span class='type identifier id'>type</span>
|
588
|
+
<span class='else else kw'>else</span>
|
589
|
+
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='string val'>"Type must be a Class object or array of Class objects"</span> <span class='unless unless_mod kw'>unless</span> <span class='type identifier id'>type</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span> <span class='Class constant id'>Class</span>
|
590
|
+
<span class='@allowed_types ivar id'>@allowed_types</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='type identifier id'>type</span><span class='rbrack token'>]</span>
|
591
|
+
<span class='end end kw'>end</span>
|
592
|
+
<span class='@list ivar id'>@list</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
593
|
+
<span class='@locked_at ivar id'>@locked_at</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span>
|
594
|
+
<span class='@serialize_as ivar id'>@serialize_as</span> <span class='assign token'>=</span> <span class='serialize_as identifier id'>serialize_as</span>
|
595
|
+
<span class='end end kw'>end</span>
|
596
|
+
</pre>
|
597
|
+
</td>
|
598
|
+
</tr>
|
599
|
+
</table>
|
600
|
+
</div>
|
601
|
+
|
602
|
+
</div>
|
603
|
+
<div id="method_missing_details" class="method_details_list">
|
604
|
+
<h2>Dynamic Method Handling</h2>
|
605
|
+
<p class="notice this">
|
606
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
607
|
+
|
608
|
+
</p>
|
609
|
+
|
610
|
+
<div class="method_details first">
|
611
|
+
<p class="signature first" id="method_missing-instance_method">
|
612
|
+
|
613
|
+
- (<tt>Object</tt>) <strong>method_missing</strong>(meth, *args, &block)
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
</p><div class="docstring">
|
618
|
+
<div class="discussion">
|
619
|
+
|
620
|
+
<div class="note notetag">
|
621
|
+
<strong>Note:</strong>
|
622
|
+
<div class='inline'><p>
|
623
|
+
the following methods are not allowed
|
624
|
+
</p>
|
625
|
+
<pre class="code">
|
626
|
+
<span class='symbol val'>:replace</span>
|
627
|
+
<span class='symbol val'>:insert</span>
|
628
|
+
<span class='symbol val'>:collect!</span>
|
629
|
+
<span class='symbol val'>:map!</span>
|
630
|
+
<span class='symbol val'>:pop</span>
|
631
|
+
<span class='symbol val'>:delete_if</span>
|
632
|
+
<span class='symbol val'>:reverse!</span>
|
633
|
+
<span class='symbol val'>:shift</span>
|
634
|
+
<span class='symbol val'>:shuffle!</span>
|
635
|
+
<span class='symbol val'>:slice!</span>
|
636
|
+
<span class='symbol val'>:sort!</span>
|
637
|
+
<span class='symbol val'>:uniq!</span>
|
638
|
+
<span class='symbol val'>:unshift</span>
|
639
|
+
<span class='symbol val'>:zip</span>
|
640
|
+
<span class='symbol val'>:flatten!</span>
|
641
|
+
<span class='symbol val'>:fill</span>
|
642
|
+
<span class='symbol val'>:drop</span>
|
643
|
+
<span class='symbol val'>:drop_while</span>
|
644
|
+
<span class='symbol val'>:delete_if</span>
|
645
|
+
<span class='symbol val'>:clear</span>
|
646
|
+
<span class='symbol val'>:concat</span>
|
647
|
+
</pre>
|
648
|
+
</div>
|
649
|
+
</div>
|
650
|
+
|
651
|
+
<p>
|
652
|
+
method_mission override to pass allowed methods to the list.
|
653
|
+
</p>
|
654
|
+
|
655
|
+
|
656
|
+
</div>
|
657
|
+
</div>
|
658
|
+
<div class="tags">
|
659
|
+
|
660
|
+
<h3>Raises:</h3>
|
661
|
+
<ul class="raise">
|
662
|
+
|
663
|
+
<li>
|
664
|
+
|
665
|
+
|
666
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
</li>
|
671
|
+
|
672
|
+
</ul>
|
673
|
+
|
674
|
+
</div><table class="source_code">
|
675
|
+
<tr>
|
676
|
+
<td>
|
677
|
+
<pre class="lines">
|
678
|
+
|
679
|
+
|
680
|
+
127
|
681
|
+
128
|
682
|
+
129
|
683
|
+
130
|
684
|
+
131
|
685
|
+
132
|
686
|
+
133
|
687
|
+
134</pre>
|
688
|
+
</td>
|
689
|
+
<td>
|
690
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 127</span>
|
691
|
+
|
692
|
+
<span class='def def kw'>def</span> <span class='method_missing identifier id'>method_missing</span><span class='lparen token'>(</span><span class='meth identifier id'>meth</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='block identifier id'>block</span><span class='rparen token'>)</span>
|
693
|
+
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='dstring node'>"#{meth} not supported"</span> <span class='if if_mod kw'>if</span> <span class='lbrack token'>[</span><span class='symbol val'>:replace</span><span class='comma token'>,</span> <span class='symbol val'>:insert</span><span class='comma token'>,</span> <span class='symbol val'>:collect!</span><span class='comma token'>,</span> <span class='symbol val'>:map!</span><span class='comma token'>,</span> <span class='symbol val'>:pop</span><span class='comma token'>,</span> <span class='symbol val'>:delete_if</span><span class='comma token'>,</span> <span class='symbol val'>:reverse!</span><span class='comma token'>,</span> <span class='symbol val'>:shift</span><span class='comma token'>,</span> <span class='symbol val'>:shuffle!</span><span class='comma token'>,</span> <span class='symbol val'>:slice!</span><span class='comma token'>,</span> <span class='symbol val'>:sort!</span><span class='comma token'>,</span> <span class='symbol val'>:uniq!</span><span class='comma token'>,</span> <span class='symbol val'>:unshift</span><span class='comma token'>,</span> <span class='symbol val'>:zip</span><span class='comma token'>,</span> <span class='symbol val'>:flatten!</span><span class='comma token'>,</span> <span class='symbol val'>:fill</span><span class='comma token'>,</span> <span class='symbol val'>:drop</span><span class='comma token'>,</span> <span class='symbol val'>:drop_while</span><span class='comma token'>,</span> <span class='symbol val'>:delete_if</span><span class='comma token'>,</span> <span class='symbol val'>:clear</span><span class='comma token'>,</span> <span class='symbol val'>:concat</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='include? fid id'>include?</span> <span class='meth identifier id'>meth</span><span class='dot token'>.</span><span class='to_sym identifier id'>to_sym</span>
|
694
|
+
<span class='if if kw'>if</span> <span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span> <span class='meth identifier id'>meth</span>
|
695
|
+
<span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='meth identifier id'>meth</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='block identifier id'>block</span><span class='rparen token'>)</span>
|
696
|
+
<span class='else else kw'>else</span>
|
697
|
+
<span class='super super kw'>super</span>
|
698
|
+
<span class='end end kw'>end</span>
|
699
|
+
<span class='end end kw'>end</span>
|
700
|
+
</pre>
|
701
|
+
</td>
|
702
|
+
</tr>
|
703
|
+
</table>
|
704
|
+
</div>
|
705
|
+
|
706
|
+
</div>
|
707
|
+
|
708
|
+
<div id="instance_attr_details" class="attr_details">
|
709
|
+
<h2>Instance Attribute Details</h2>
|
710
|
+
|
711
|
+
|
712
|
+
<span id=""></span>
|
713
|
+
<span id="allowed_types-instance_method"></span>
|
714
|
+
<div class="method_details first">
|
715
|
+
<p class="signature first" id="allowed_types-instance_method">
|
716
|
+
|
717
|
+
- (<tt>Array</tt>) <strong>allowed_types</strong> <span class="extras">(readonly)</span>
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
</p><div class="docstring">
|
722
|
+
<div class="discussion">
|
723
|
+
<p>
|
724
|
+
The class constants of allowed types
|
725
|
+
</p>
|
726
|
+
|
727
|
+
|
728
|
+
</div>
|
729
|
+
</div>
|
730
|
+
<div class="tags">
|
731
|
+
|
732
|
+
<h3>Returns:</h3>
|
733
|
+
<ul class="return">
|
734
|
+
|
735
|
+
<li>
|
736
|
+
|
737
|
+
|
738
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
</li>
|
743
|
+
|
744
|
+
</ul>
|
745
|
+
|
746
|
+
</div><table class="source_code">
|
747
|
+
<tr>
|
748
|
+
<td>
|
749
|
+
<pre class="lines">
|
750
|
+
|
751
|
+
|
752
|
+
7
|
753
|
+
8
|
754
|
+
9</pre>
|
755
|
+
</td>
|
756
|
+
<td>
|
757
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 7</span>
|
758
|
+
|
759
|
+
<span class='def def kw'>def</span> <span class='allowed_types identifier id'>allowed_types</span>
|
760
|
+
<span class='@allowed_types ivar id'>@allowed_types</span>
|
761
|
+
<span class='end end kw'>end</span>
|
762
|
+
</pre>
|
763
|
+
</td>
|
764
|
+
</tr>
|
765
|
+
</table>
|
766
|
+
</div>
|
767
|
+
|
768
|
+
|
769
|
+
<span id=""></span>
|
770
|
+
<span id="locked_at-instance_method"></span>
|
771
|
+
<div class="method_details ">
|
772
|
+
<p class="signature " id="locked_at-instance_method">
|
773
|
+
|
774
|
+
- (<tt>Integer</tt>) <strong>locked_at</strong> <span class="extras">(readonly)</span>
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
</p><div class="docstring">
|
779
|
+
<div class="discussion">
|
780
|
+
<p>
|
781
|
+
The index below which items cannot be removed
|
782
|
+
</p>
|
783
|
+
|
784
|
+
|
785
|
+
</div>
|
786
|
+
</div>
|
787
|
+
<div class="tags">
|
788
|
+
|
789
|
+
<h3>Returns:</h3>
|
790
|
+
<ul class="return">
|
791
|
+
|
792
|
+
<li>
|
793
|
+
|
794
|
+
|
795
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
</li>
|
800
|
+
|
801
|
+
</ul>
|
802
|
+
|
803
|
+
</div><table class="source_code">
|
804
|
+
<tr>
|
805
|
+
<td>
|
806
|
+
<pre class="lines">
|
807
|
+
|
808
|
+
|
809
|
+
11
|
810
|
+
12
|
811
|
+
13</pre>
|
812
|
+
</td>
|
813
|
+
<td>
|
814
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 11</span>
|
815
|
+
|
816
|
+
<span class='def def kw'>def</span> <span class='locked_at identifier id'>locked_at</span>
|
817
|
+
<span class='@locked_at ivar id'>@locked_at</span>
|
818
|
+
<span class='end end kw'>end</span>
|
819
|
+
</pre>
|
820
|
+
</td>
|
821
|
+
</tr>
|
822
|
+
</table>
|
823
|
+
</div>
|
824
|
+
|
825
|
+
|
826
|
+
<span id=""></span>
|
827
|
+
<span id="serialize_as-instance_method"></span>
|
828
|
+
<div class="method_details ">
|
829
|
+
<p class="signature " id="serialize_as-instance_method">
|
830
|
+
|
831
|
+
- (<tt>String</tt>) <strong>serialize_as</strong> <span class="extras">(readonly)</span>
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
</p><div class="docstring">
|
836
|
+
<div class="discussion">
|
837
|
+
<p>
|
838
|
+
The tag name to use when serializing this object by default the parent node
|
839
|
+
for all items in the list is the classname of the first allowed type with
|
840
|
+
the first letter in lowercase.
|
841
|
+
</p>
|
842
|
+
|
843
|
+
|
844
|
+
</div>
|
845
|
+
</div>
|
846
|
+
<div class="tags">
|
847
|
+
|
848
|
+
<h3>Returns:</h3>
|
849
|
+
<ul class="return">
|
850
|
+
|
851
|
+
<li>
|
852
|
+
|
853
|
+
|
854
|
+
<span class='type'>(<tt>String</tt>)</span>
|
855
|
+
|
856
|
+
|
857
|
+
|
858
|
+
</li>
|
859
|
+
|
860
|
+
</ul>
|
861
|
+
|
862
|
+
</div><table class="source_code">
|
863
|
+
<tr>
|
864
|
+
<td>
|
865
|
+
<pre class="lines">
|
866
|
+
|
867
|
+
|
868
|
+
16
|
869
|
+
17
|
870
|
+
18</pre>
|
871
|
+
</td>
|
872
|
+
<td>
|
873
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 16</span>
|
874
|
+
|
875
|
+
<span class='def def kw'>def</span> <span class='serialize_as identifier id'>serialize_as</span>
|
876
|
+
<span class='@serialize_as ivar id'>@serialize_as</span>
|
877
|
+
<span class='end end kw'>end</span>
|
878
|
+
</pre>
|
879
|
+
</td>
|
880
|
+
</tr>
|
881
|
+
</table>
|
882
|
+
</div>
|
883
|
+
|
884
|
+
</div>
|
885
|
+
|
886
|
+
|
887
|
+
<div id="instance_method_details" class="method_details_list">
|
888
|
+
<h2>Instance Method Details</h2>
|
889
|
+
|
890
|
+
|
891
|
+
<div class="method_details first">
|
892
|
+
<p class="signature first" id="<<-instance_method">
|
893
|
+
|
894
|
+
- (<tt>Integer</tt>) <strong><<</strong>(v)
|
895
|
+
|
896
|
+
|
897
|
+
|
898
|
+
</p><div class="docstring">
|
899
|
+
<div class="discussion">
|
900
|
+
<p>
|
901
|
+
Concat operator
|
902
|
+
</p>
|
903
|
+
|
904
|
+
|
905
|
+
</div>
|
906
|
+
</div>
|
907
|
+
<div class="tags">
|
908
|
+
<h3>Parameters:</h3>
|
909
|
+
<ul class="param">
|
910
|
+
|
911
|
+
<li>
|
912
|
+
|
913
|
+
<span class='name'>v</span>
|
914
|
+
|
915
|
+
|
916
|
+
<span class='type'>(<tt>Any</tt>)</span>
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
—
|
921
|
+
<div class='inline'><p>
|
922
|
+
the data to be added
|
923
|
+
</p>
|
924
|
+
</div>
|
925
|
+
|
926
|
+
</li>
|
927
|
+
|
928
|
+
</ul>
|
929
|
+
|
930
|
+
<h3>Returns:</h3>
|
931
|
+
<ul class="return">
|
932
|
+
|
933
|
+
<li>
|
934
|
+
|
935
|
+
|
936
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
937
|
+
|
938
|
+
|
939
|
+
|
940
|
+
—
|
941
|
+
<div class='inline'><p>
|
942
|
+
returns the index of the item added.
|
943
|
+
</p>
|
944
|
+
</div>
|
945
|
+
|
946
|
+
</li>
|
947
|
+
|
948
|
+
</ul>
|
949
|
+
<h3>Raises:</h3>
|
950
|
+
<ul class="raise">
|
951
|
+
|
952
|
+
<li>
|
953
|
+
|
954
|
+
|
955
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
—
|
960
|
+
<div class='inline'><p>
|
961
|
+
if the value being added is not one fo the allowed types
|
962
|
+
</p>
|
963
|
+
</div>
|
964
|
+
|
965
|
+
</li>
|
966
|
+
|
967
|
+
</ul>
|
968
|
+
|
969
|
+
</div><table class="source_code">
|
970
|
+
<tr>
|
971
|
+
<td>
|
972
|
+
<pre class="lines">
|
973
|
+
|
974
|
+
|
975
|
+
53
|
976
|
+
54
|
977
|
+
55
|
978
|
+
56
|
979
|
+
57</pre>
|
980
|
+
</td>
|
981
|
+
<td>
|
982
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 53</span>
|
983
|
+
|
984
|
+
<span class='def def kw'>def</span> <span class='lshft op'><<</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span>
|
985
|
+
<span class='DataTypeValidator constant id'>DataTypeValidator</span><span class='dot token'>.</span><span class='validate identifier id'>validate</span> <span class='string val'>"SimpleTypedList.<<"</span><span class='comma token'>,</span> <span class='@allowed_types ivar id'>@allowed_types</span><span class='comma token'>,</span> <span class='v identifier id'>v</span>
|
986
|
+
<span class='@list ivar id'>@list</span> <span class='lshft op'><<</span> <span class='v identifier id'>v</span>
|
987
|
+
<span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='size identifier id'>size</span> <span class='minus op'>-</span> <span class='integer val'>1</span>
|
988
|
+
<span class='end end kw'>end</span>
|
989
|
+
</pre>
|
990
|
+
</td>
|
991
|
+
</tr>
|
992
|
+
</table>
|
993
|
+
</div>
|
994
|
+
|
995
|
+
<div class="method_details ">
|
996
|
+
<p class="signature " id="[]=-instance_method">
|
997
|
+
|
998
|
+
- (<tt>Object</tt>) <strong>[]=</strong>(index, v)
|
999
|
+
|
1000
|
+
|
1001
|
+
|
1002
|
+
</p><div class="docstring">
|
1003
|
+
<div class="discussion">
|
1004
|
+
<p>
|
1005
|
+
positional assignment. Adds the item at the index specified
|
1006
|
+
</p>
|
1007
|
+
|
1008
|
+
|
1009
|
+
</div>
|
1010
|
+
</div>
|
1011
|
+
<div class="tags">
|
1012
|
+
<h3>Parameters:</h3>
|
1013
|
+
<ul class="param">
|
1014
|
+
|
1015
|
+
<li>
|
1016
|
+
|
1017
|
+
<span class='name'>index</span>
|
1018
|
+
|
1019
|
+
|
1020
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
</li>
|
1025
|
+
|
1026
|
+
<li>
|
1027
|
+
|
1028
|
+
<span class='name'>v</span>
|
1029
|
+
|
1030
|
+
|
1031
|
+
<span class='type'>(<tt>Any</tt>)</span>
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
</li>
|
1036
|
+
|
1037
|
+
</ul>
|
1038
|
+
|
1039
|
+
<h3>Raises:</h3>
|
1040
|
+
<ul class="raise">
|
1041
|
+
|
1042
|
+
<li>
|
1043
|
+
|
1044
|
+
|
1045
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
—
|
1050
|
+
<div class='inline'><p>
|
1051
|
+
if the index is protected by locking
|
1052
|
+
</p>
|
1053
|
+
</div>
|
1054
|
+
|
1055
|
+
</li>
|
1056
|
+
|
1057
|
+
<li>
|
1058
|
+
|
1059
|
+
|
1060
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
—
|
1065
|
+
<div class='inline'><p>
|
1066
|
+
if the item is not one of the allowed types
|
1067
|
+
</p>
|
1068
|
+
</div>
|
1069
|
+
|
1070
|
+
</li>
|
1071
|
+
|
1072
|
+
</ul>
|
1073
|
+
|
1074
|
+
</div><table class="source_code">
|
1075
|
+
<tr>
|
1076
|
+
<td>
|
1077
|
+
<pre class="lines">
|
1078
|
+
|
1079
|
+
|
1080
|
+
89
|
1081
|
+
90
|
1082
|
+
91
|
1083
|
+
92
|
1084
|
+
93
|
1085
|
+
94</pre>
|
1086
|
+
</td>
|
1087
|
+
<td>
|
1088
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 89</span>
|
1089
|
+
|
1090
|
+
<span class='def def kw'>def</span> <span class='aset op'>[]=</span><span class='lparen token'>(</span><span class='index identifier id'>index</span><span class='comma token'>,</span> <span class='v identifier id'>v</span><span class='rparen token'>)</span>
|
1091
|
+
<span class='DataTypeValidator constant id'>DataTypeValidator</span><span class='dot token'>.</span><span class='validate identifier id'>validate</span> <span class='string val'>"SimpleTypedList.<<"</span><span class='comma token'>,</span> <span class='@allowed_types ivar id'>@allowed_types</span><span class='comma token'>,</span> <span class='v identifier id'>v</span>
|
1092
|
+
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='string val'>"Item is protected and cannot be changed"</span> <span class='if if_mod kw'>if</span> <span class='protected? fid id'>protected?</span> <span class='index identifier id'>index</span>
|
1093
|
+
<span class='@list ivar id'>@list</span><span class='lbrack token'>[</span><span class='index identifier id'>index</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='v identifier id'>v</span>
|
1094
|
+
<span class='v identifier id'>v</span>
|
1095
|
+
<span class='end end kw'>end</span>
|
1096
|
+
</pre>
|
1097
|
+
</td>
|
1098
|
+
</tr>
|
1099
|
+
</table>
|
1100
|
+
</div>
|
1101
|
+
|
1102
|
+
<div class="method_details ">
|
1103
|
+
<p class="signature " id="delete-instance_method">
|
1104
|
+
|
1105
|
+
- (<tt>Any</tt>) <strong>delete</strong>(v)
|
1106
|
+
|
1107
|
+
|
1108
|
+
|
1109
|
+
</p><div class="docstring">
|
1110
|
+
<div class="discussion">
|
1111
|
+
<p>
|
1112
|
+
delete the item from the list
|
1113
|
+
</p>
|
1114
|
+
|
1115
|
+
|
1116
|
+
</div>
|
1117
|
+
</div>
|
1118
|
+
<div class="tags">
|
1119
|
+
<h3>Parameters:</h3>
|
1120
|
+
<ul class="param">
|
1121
|
+
|
1122
|
+
<li>
|
1123
|
+
|
1124
|
+
<span class='name'>v</span>
|
1125
|
+
|
1126
|
+
|
1127
|
+
<span class='type'>(<tt>Any</tt>)</span>
|
1128
|
+
|
1129
|
+
|
1130
|
+
|
1131
|
+
—
|
1132
|
+
<div class='inline'><p>
|
1133
|
+
The item to be deleted.
|
1134
|
+
</p>
|
1135
|
+
</div>
|
1136
|
+
|
1137
|
+
</li>
|
1138
|
+
|
1139
|
+
</ul>
|
1140
|
+
|
1141
|
+
<h3>Returns:</h3>
|
1142
|
+
<ul class="return">
|
1143
|
+
|
1144
|
+
<li>
|
1145
|
+
|
1146
|
+
|
1147
|
+
<span class='type'>(<tt>Any</tt>)</span>
|
1148
|
+
|
1149
|
+
|
1150
|
+
|
1151
|
+
—
|
1152
|
+
<div class='inline'><p>
|
1153
|
+
The item deleted
|
1154
|
+
</p>
|
1155
|
+
</div>
|
1156
|
+
|
1157
|
+
</li>
|
1158
|
+
|
1159
|
+
</ul>
|
1160
|
+
<h3>Raises:</h3>
|
1161
|
+
<ul class="raise">
|
1162
|
+
|
1163
|
+
<li>
|
1164
|
+
|
1165
|
+
|
1166
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
—
|
1171
|
+
<div class='inline'><p>
|
1172
|
+
if the item’s index is protected by locking
|
1173
|
+
</p>
|
1174
|
+
</div>
|
1175
|
+
|
1176
|
+
</li>
|
1177
|
+
|
1178
|
+
</ul>
|
1179
|
+
|
1180
|
+
</div><table class="source_code">
|
1181
|
+
<tr>
|
1182
|
+
<td>
|
1183
|
+
<pre class="lines">
|
1184
|
+
|
1185
|
+
|
1186
|
+
69
|
1187
|
+
70
|
1188
|
+
71
|
1189
|
+
72
|
1190
|
+
73</pre>
|
1191
|
+
</td>
|
1192
|
+
<td>
|
1193
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 69</span>
|
1194
|
+
|
1195
|
+
<span class='def def kw'>def</span> <span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span>
|
1196
|
+
<span class='return return kw'>return</span> <span class='unless unless_mod kw'>unless</span> <span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='include? fid id'>include?</span> <span class='v identifier id'>v</span>
|
1197
|
+
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='string val'>"Item is protected and cannot be deleted"</span> <span class='if if_mod kw'>if</span> <span class='protected? fid id'>protected?</span> <span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='index identifier id'>index</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span>
|
1198
|
+
<span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span> <span class='v identifier id'>v</span>
|
1199
|
+
<span class='end end kw'>end</span>
|
1200
|
+
</pre>
|
1201
|
+
</td>
|
1202
|
+
</tr>
|
1203
|
+
</table>
|
1204
|
+
</div>
|
1205
|
+
|
1206
|
+
<div class="method_details ">
|
1207
|
+
<p class="signature " id="delete_at-instance_method">
|
1208
|
+
|
1209
|
+
- (<tt>Any</tt>) <strong>delete_at</strong>(index)
|
1210
|
+
|
1211
|
+
|
1212
|
+
|
1213
|
+
</p><div class="docstring">
|
1214
|
+
<div class="discussion">
|
1215
|
+
<p>
|
1216
|
+
delete the item from the list at the index position provided
|
1217
|
+
</p>
|
1218
|
+
|
1219
|
+
|
1220
|
+
</div>
|
1221
|
+
</div>
|
1222
|
+
<div class="tags">
|
1223
|
+
|
1224
|
+
<h3>Returns:</h3>
|
1225
|
+
<ul class="return">
|
1226
|
+
|
1227
|
+
<li>
|
1228
|
+
|
1229
|
+
|
1230
|
+
<span class='type'>(<tt>Any</tt>)</span>
|
1231
|
+
|
1232
|
+
|
1233
|
+
|
1234
|
+
—
|
1235
|
+
<div class='inline'><p>
|
1236
|
+
The item deleted
|
1237
|
+
</p>
|
1238
|
+
</div>
|
1239
|
+
|
1240
|
+
</li>
|
1241
|
+
|
1242
|
+
</ul>
|
1243
|
+
<h3>Raises:</h3>
|
1244
|
+
<ul class="raise">
|
1245
|
+
|
1246
|
+
<li>
|
1247
|
+
|
1248
|
+
|
1249
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1250
|
+
|
1251
|
+
|
1252
|
+
|
1253
|
+
—
|
1254
|
+
<div class='inline'><p>
|
1255
|
+
if the index is protected by locking
|
1256
|
+
</p>
|
1257
|
+
</div>
|
1258
|
+
|
1259
|
+
</li>
|
1260
|
+
|
1261
|
+
</ul>
|
1262
|
+
|
1263
|
+
</div><table class="source_code">
|
1264
|
+
<tr>
|
1265
|
+
<td>
|
1266
|
+
<pre class="lines">
|
1267
|
+
|
1268
|
+
|
1269
|
+
78
|
1270
|
+
79
|
1271
|
+
80
|
1272
|
+
81
|
1273
|
+
82</pre>
|
1274
|
+
</td>
|
1275
|
+
<td>
|
1276
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 78</span>
|
1277
|
+
|
1278
|
+
<span class='def def kw'>def</span> <span class='delete_at identifier id'>delete_at</span><span class='lparen token'>(</span><span class='index identifier id'>index</span><span class='rparen token'>)</span>
|
1279
|
+
<span class='@list ivar id'>@list</span><span class='lbrack token'>[</span><span class='index identifier id'>index</span><span class='rbrack token'>]</span>
|
1280
|
+
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='string val'>"Item is protected and cannot be deleted"</span> <span class='if if_mod kw'>if</span> <span class='protected? fid id'>protected?</span> <span class='index identifier id'>index</span>
|
1281
|
+
<span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='delete_at identifier id'>delete_at</span> <span class='index identifier id'>index</span>
|
1282
|
+
<span class='end end kw'>end</span>
|
1283
|
+
</pre>
|
1284
|
+
</td>
|
1285
|
+
</tr>
|
1286
|
+
</table>
|
1287
|
+
</div>
|
1288
|
+
|
1289
|
+
<div class="method_details ">
|
1290
|
+
<p class="signature " id="lock-instance_method">
|
1291
|
+
|
1292
|
+
- (<tt>self</tt>) <strong>lock</strong>
|
1293
|
+
|
1294
|
+
|
1295
|
+
|
1296
|
+
</p><div class="docstring">
|
1297
|
+
<div class="discussion">
|
1298
|
+
<p>
|
1299
|
+
Lock this list at the current size
|
1300
|
+
</p>
|
1301
|
+
|
1302
|
+
|
1303
|
+
</div>
|
1304
|
+
</div>
|
1305
|
+
<div class="tags">
|
1306
|
+
|
1307
|
+
<h3>Returns:</h3>
|
1308
|
+
<ul class="return">
|
1309
|
+
|
1310
|
+
<li>
|
1311
|
+
|
1312
|
+
|
1313
|
+
<span class='type'>(<tt>self</tt>)</span>
|
1314
|
+
|
1315
|
+
|
1316
|
+
|
1317
|
+
</li>
|
1318
|
+
|
1319
|
+
</ul>
|
1320
|
+
|
1321
|
+
</div><table class="source_code">
|
1322
|
+
<tr>
|
1323
|
+
<td>
|
1324
|
+
<pre class="lines">
|
1325
|
+
|
1326
|
+
|
1327
|
+
37
|
1328
|
+
38
|
1329
|
+
39
|
1330
|
+
40</pre>
|
1331
|
+
</td>
|
1332
|
+
<td>
|
1333
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 37</span>
|
1334
|
+
|
1335
|
+
<span class='def def kw'>def</span> <span class='lock identifier id'>lock</span>
|
1336
|
+
<span class='@locked_at ivar id'>@locked_at</span> <span class='assign token'>=</span> <span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='size identifier id'>size</span>
|
1337
|
+
<span class='self self kw'>self</span>
|
1338
|
+
<span class='end end kw'>end</span>
|
1339
|
+
</pre>
|
1340
|
+
</td>
|
1341
|
+
</tr>
|
1342
|
+
</table>
|
1343
|
+
</div>
|
1344
|
+
|
1345
|
+
<div class="method_details ">
|
1346
|
+
<p class="signature " id="protected?-instance_method">
|
1347
|
+
|
1348
|
+
- (<tt>Boolean</tt>) <strong>protected?</strong>(index)
|
1349
|
+
|
1350
|
+
|
1351
|
+
|
1352
|
+
</p><div class="docstring">
|
1353
|
+
<div class="discussion">
|
1354
|
+
<p>
|
1355
|
+
determines if the index is protected
|
1356
|
+
</p>
|
1357
|
+
|
1358
|
+
|
1359
|
+
</div>
|
1360
|
+
</div>
|
1361
|
+
<div class="tags">
|
1362
|
+
<h3>Parameters:</h3>
|
1363
|
+
<ul class="param">
|
1364
|
+
|
1365
|
+
<li>
|
1366
|
+
|
1367
|
+
<span class='name'>index</span>
|
1368
|
+
|
1369
|
+
|
1370
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1371
|
+
|
1372
|
+
|
1373
|
+
|
1374
|
+
</li>
|
1375
|
+
|
1376
|
+
</ul>
|
1377
|
+
|
1378
|
+
<h3>Returns:</h3>
|
1379
|
+
<ul class="return">
|
1380
|
+
|
1381
|
+
<li>
|
1382
|
+
|
1383
|
+
|
1384
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1385
|
+
|
1386
|
+
|
1387
|
+
|
1388
|
+
</li>
|
1389
|
+
|
1390
|
+
</ul>
|
1391
|
+
|
1392
|
+
</div><table class="source_code">
|
1393
|
+
<tr>
|
1394
|
+
<td>
|
1395
|
+
<pre class="lines">
|
1396
|
+
|
1397
|
+
|
1398
|
+
98
|
1399
|
+
99
|
1400
|
+
100
|
1401
|
+
101</pre>
|
1402
|
+
</td>
|
1403
|
+
<td>
|
1404
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 98</span>
|
1405
|
+
|
1406
|
+
<span class='def def kw'>def</span> <span class='protected? fid id'>protected?</span> <span class='index identifier id'>index</span>
|
1407
|
+
<span class='return return kw'>return</span> <span class='false false kw'>false</span> <span class='unless unless_mod kw'>unless</span> <span class='@locked_at ivar id'>@locked_at</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span> <span class='Fixnum constant id'>Fixnum</span>
|
1408
|
+
<span class='index identifier id'>index</span> <span class='lt op'><</span> <span class='@locked_at ivar id'>@locked_at</span>
|
1409
|
+
<span class='end end kw'>end</span>
|
1410
|
+
</pre>
|
1411
|
+
</td>
|
1412
|
+
</tr>
|
1413
|
+
</table>
|
1414
|
+
</div>
|
1415
|
+
|
1416
|
+
<div class="method_details ">
|
1417
|
+
<p class="signature " id="push-instance_method">
|
1418
|
+
|
1419
|
+
- (<tt>Object</tt>) <strong>push</strong>(v)
|
1420
|
+
|
1421
|
+
|
1422
|
+
|
1423
|
+
</p><div class="docstring">
|
1424
|
+
<div class="discussion">
|
1425
|
+
<p>
|
1426
|
+
alternate of << method
|
1427
|
+
</p>
|
1428
|
+
|
1429
|
+
|
1430
|
+
</div>
|
1431
|
+
</div>
|
1432
|
+
<div class="tags">
|
1433
|
+
|
1434
|
+
|
1435
|
+
<h3>See Also:</h3>
|
1436
|
+
<ul class="see">
|
1437
|
+
|
1438
|
+
<li><<</li>
|
1439
|
+
|
1440
|
+
</ul>
|
1441
|
+
|
1442
|
+
</div><table class="source_code">
|
1443
|
+
<tr>
|
1444
|
+
<td>
|
1445
|
+
<pre class="lines">
|
1446
|
+
|
1447
|
+
|
1448
|
+
61
|
1449
|
+
62
|
1450
|
+
63</pre>
|
1451
|
+
</td>
|
1452
|
+
<td>
|
1453
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 61</span>
|
1454
|
+
|
1455
|
+
<span class='def def kw'>def</span> <span class='push identifier id'>push</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span>
|
1456
|
+
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='lshft op'><<</span> <span class='v identifier id'>v</span>
|
1457
|
+
<span class='end end kw'>end</span>
|
1458
|
+
</pre>
|
1459
|
+
</td>
|
1460
|
+
</tr>
|
1461
|
+
</table>
|
1462
|
+
</div>
|
1463
|
+
|
1464
|
+
<div class="method_details ">
|
1465
|
+
<p class="signature " id="to_xml-instance_method">
|
1466
|
+
|
1467
|
+
- (<tt>String</tt>) <strong>to_xml</strong>(xml)
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1471
|
+
</p><div class="docstring">
|
1472
|
+
<div class="discussion">
|
1473
|
+
<p>
|
1474
|
+
Serializes the list If the serialize_as property is set, it is used as the
|
1475
|
+
parent node name. If the serialize_as property is nil, the first item in
|
1476
|
+
the list of allowed_types will be used, having the first letter of the
|
1477
|
+
class changed to lower case.
|
1478
|
+
</p>
|
1479
|
+
|
1480
|
+
|
1481
|
+
</div>
|
1482
|
+
</div>
|
1483
|
+
<div class="tags">
|
1484
|
+
<h3>Parameters:</h3>
|
1485
|
+
<ul class="param">
|
1486
|
+
|
1487
|
+
<li>
|
1488
|
+
|
1489
|
+
<span class='name'>xml</span>
|
1490
|
+
|
1491
|
+
|
1492
|
+
<span class='type'>(<tt>Nokogiri::XML::Builder</tt>)</span>
|
1493
|
+
|
1494
|
+
|
1495
|
+
|
1496
|
+
—
|
1497
|
+
<div class='inline'><p>
|
1498
|
+
The document builder instance this objects xml will be added to.
|
1499
|
+
</p>
|
1500
|
+
</div>
|
1501
|
+
|
1502
|
+
</li>
|
1503
|
+
|
1504
|
+
</ul>
|
1505
|
+
|
1506
|
+
<h3>Returns:</h3>
|
1507
|
+
<ul class="return">
|
1508
|
+
|
1509
|
+
<li>
|
1510
|
+
|
1511
|
+
|
1512
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
</li>
|
1517
|
+
|
1518
|
+
</ul>
|
1519
|
+
|
1520
|
+
</div><table class="source_code">
|
1521
|
+
<tr>
|
1522
|
+
<td>
|
1523
|
+
<pre class="lines">
|
1524
|
+
|
1525
|
+
|
1526
|
+
141
|
1527
|
+
142
|
1528
|
+
143
|
1529
|
+
144
|
1530
|
+
145
|
1531
|
+
146
|
1532
|
+
147</pre>
|
1533
|
+
</td>
|
1534
|
+
<td>
|
1535
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 141</span>
|
1536
|
+
|
1537
|
+
<span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span>
|
1538
|
+
<span class='classname identifier id'>classname</span> <span class='assign token'>=</span> <span class='@allowed_types ivar id'>@allowed_types</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='name identifier id'>name</span><span class='dot token'>.</span><span class='split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>'::'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='last identifier id'>last</span>
|
1539
|
+
<span class='el_name identifier id'>el_name</span> <span class='assign token'>=</span> <span class='serialize_as identifier id'>serialize_as</span> <span class='orop op'>||</span> <span class='lparen token'>(</span><span class='classname identifier id'>classname</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='downcase identifier id'>downcase</span> <span class='plus op'>+</span> <span class='classname identifier id'>classname</span><span class='lbrack token'>[</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='pluralize identifier id'>pluralize</span>
|
1540
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='el_name identifier id'>el_name</span><span class='comma token'>,</span> <span class='symbol val'>:count=</span><span class='gt op'>></span><span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='size identifier id'>size</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
|
1541
|
+
<span class='@list ivar id'>@list</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='item identifier id'>item</span><span class='bitor op'>|</span> <span class='item identifier id'>item</span><span class='dot token'>.</span><span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
1542
|
+
<span class='rbrace token'>}</span>
|
1543
|
+
<span class='end end kw'>end</span>
|
1544
|
+
</pre>
|
1545
|
+
</td>
|
1546
|
+
</tr>
|
1547
|
+
</table>
|
1548
|
+
</div>
|
1549
|
+
|
1550
|
+
<div class="method_details ">
|
1551
|
+
<p class="signature " id="unlock-instance_method">
|
1552
|
+
|
1553
|
+
- (<tt>self</tt>) <strong>unlock</strong>
|
1554
|
+
|
1555
|
+
|
1556
|
+
|
1557
|
+
</p><div class="docstring">
|
1558
|
+
<div class="discussion">
|
1559
|
+
<p>
|
1560
|
+
Unlock the list
|
1561
|
+
</p>
|
1562
|
+
|
1563
|
+
|
1564
|
+
</div>
|
1565
|
+
</div>
|
1566
|
+
<div class="tags">
|
1567
|
+
|
1568
|
+
<h3>Returns:</h3>
|
1569
|
+
<ul class="return">
|
1570
|
+
|
1571
|
+
<li>
|
1572
|
+
|
1573
|
+
|
1574
|
+
<span class='type'>(<tt>self</tt>)</span>
|
1575
|
+
|
1576
|
+
|
1577
|
+
|
1578
|
+
</li>
|
1579
|
+
|
1580
|
+
</ul>
|
1581
|
+
|
1582
|
+
</div><table class="source_code">
|
1583
|
+
<tr>
|
1584
|
+
<td>
|
1585
|
+
<pre class="lines">
|
1586
|
+
|
1587
|
+
|
1588
|
+
44
|
1589
|
+
45
|
1590
|
+
46
|
1591
|
+
47</pre>
|
1592
|
+
</td>
|
1593
|
+
<td>
|
1594
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/util/simple_typed_list.rb', line 44</span>
|
1595
|
+
|
1596
|
+
<span class='def def kw'>def</span> <span class='unlock identifier id'>unlock</span>
|
1597
|
+
<span class='@locked_at ivar id'>@locked_at</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span>
|
1598
|
+
<span class='self self kw'>self</span>
|
1599
|
+
<span class='end end kw'>end</span>
|
1600
|
+
</pre>
|
1601
|
+
</td>
|
1602
|
+
</tr>
|
1603
|
+
</table>
|
1604
|
+
</div>
|
1605
|
+
|
1606
|
+
</div>
|
1607
|
+
|
1608
|
+
</div>
|
1609
|
+
|
1610
|
+
<div id="footer">
|
1611
|
+
Generated on Tue Nov 22 00:27:51 2011 by
|
1612
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1613
|
+
0.7.3 (ruby-1.8.7).
|
1614
|
+
</div>
|
1615
|
+
|
1616
|
+
</body>
|
1617
|
+
</html>
|