kdict 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/.yardopts +3 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +43 -0
- data/LICENSE.txt +21 -0
- data/README.md +301 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/Between.html +302 -0
- data/docs/Bool.html +121 -0
- data/docs/Example1.md +195 -0
- data/docs/FalseClass.html +143 -0
- data/docs/KDict/Error.html +135 -0
- data/docs/KDict.html +128 -0
- data/docs/Kdict/Error.html +135 -0
- data/docs/Kdict.html +157 -0
- data/docs/Kdict_.html +143 -0
- data/docs/KwargDict.html +697 -0
- data/docs/KwargModel.html +638 -0
- data/docs/KwargTypes.html +988 -0
- data/docs/Numeric.html +148 -0
- data/docs/TrueClass.html +143 -0
- data/docs/_index.html +184 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.Example1.html +240 -0
- data/docs/file.README.html +370 -0
- data/docs/file_list.html +61 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +370 -0
- data/docs/js/app.js +303 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +187 -0
- data/docs/top-level-namespace.html +112 -0
- data/examples/example1.rb +90 -0
- data/kdict.gemspec +39 -0
- data/lib/kdict/kwargdict/kwargtypes/bool.rb +9 -0
- data/lib/kdict/kwargdict/kwargtypes.rb +196 -0
- data/lib/kdict/kwargdict.rb +75 -0
- data/lib/kdict/kwargmodel.rb +40 -0
- data/lib/kdict/version.rb +5 -0
- data/lib/kdict.rb +19 -0
- data/ndoc/checksums +6 -0
- data/ndoc/complete +0 -0
- data/ndoc/object_types +0 -0
- data/ndoc/objects/root.dat +0 -0
- data/ndoc/proxy_types +0 -0
- metadata +150 -0
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Class: KwargModel
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.19
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
pathId = "KwargModel";
|
|
19
|
+
relpath = '';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="_index.html">Index (K)</a> »
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<span class="title">KwargModel</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Class: KwargModel
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName">Object</span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">KwargModel</li>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
81
|
+
|
|
82
|
+
</dd>
|
|
83
|
+
</dl>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<dl>
|
|
96
|
+
<dt>Defined in:</dt>
|
|
97
|
+
<dd>lib/kdict/kwargmodel.rb</dd>
|
|
98
|
+
</dl>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
|
103
|
+
<div class="discussion">
|
|
104
|
+
|
|
105
|
+
<p>A convenient class for storing a unique Keyword-Argument Model</p>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="tags">
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
118
|
+
<ul class="summary">
|
|
119
|
+
|
|
120
|
+
<li class="public ">
|
|
121
|
+
<span class="summary_signature">
|
|
122
|
+
|
|
123
|
+
<a href="#prc-instance_method" title="#prc (instance method)">#<strong>prc</strong> ⇒ Proc </a>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
</span>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<span class="note title readonly">readonly</span>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
|
143
|
+
<p>Returns a unique Proc if it exists, otherwise nil.</p>
|
|
144
|
+
</div></span>
|
|
145
|
+
|
|
146
|
+
</li>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<li class="public ">
|
|
150
|
+
<span class="summary_signature">
|
|
151
|
+
|
|
152
|
+
<a href="#struct-instance_method" title="#struct (instance method)">#<strong>struct</strong> ⇒ Object </a>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
</span>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<span class="note title readonly">readonly</span>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
|
172
|
+
<p>Returns the structure of the typedef.</p>
|
|
173
|
+
</div></span>
|
|
174
|
+
|
|
175
|
+
</li>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<li class="public ">
|
|
179
|
+
<span class="summary_signature">
|
|
180
|
+
|
|
181
|
+
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ typedef </a>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
</span>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
<span class="note title readonly">readonly</span>
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
|
201
|
+
<p>Returns the typdef of the Model.</p>
|
|
202
|
+
</div></span>
|
|
203
|
+
|
|
204
|
+
</li>
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
</ul>
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
<h2>
|
|
214
|
+
Instance Method Summary
|
|
215
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
216
|
+
</h2>
|
|
217
|
+
|
|
218
|
+
<ul class="summary">
|
|
219
|
+
|
|
220
|
+
<li class="public ">
|
|
221
|
+
<span class="summary_signature">
|
|
222
|
+
|
|
223
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(type, struct, prc = nil) ⇒ KwargModel </a>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
</span>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
<span class="note title constructor">constructor</span>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
<span class="summary_desc"><div class='inline'>
|
|
240
|
+
<p>A new instance of KwargModel.</p>
|
|
241
|
+
</div></span>
|
|
242
|
+
|
|
243
|
+
</li>
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<li class="public ">
|
|
247
|
+
<span class="summary_signature">
|
|
248
|
+
|
|
249
|
+
<a href="#splay-instance_method" title="#splay (instance method)">#<strong>splay</strong> ⇒ [type, struct, prc], [type, struct] </a>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
</span>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
<span class="summary_desc"><div class='inline'>
|
|
264
|
+
<p>Returns the attributes of the instance as an array.</p>
|
|
265
|
+
</div></span>
|
|
266
|
+
|
|
267
|
+
</li>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
</ul>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
<div id="constructor_details" class="method_details_list">
|
|
274
|
+
<h2>Constructor Details</h2>
|
|
275
|
+
|
|
276
|
+
<div class="method_details first">
|
|
277
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
278
|
+
|
|
279
|
+
#<strong>initialize</strong>(type, struct, prc = nil) ⇒ <tt><span class='object_link'><a href="" title="KwargModel (class)">KwargModel</a></span></tt>
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
</h3><div class="docstring">
|
|
286
|
+
<div class="discussion">
|
|
287
|
+
|
|
288
|
+
<p>Returns a new instance of KwargModel</p>
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
<div class="tags">
|
|
294
|
+
<p class="tag_title">Parameters:</p>
|
|
295
|
+
<ul class="param">
|
|
296
|
+
|
|
297
|
+
<li>
|
|
298
|
+
|
|
299
|
+
<span class='name'>type</span>
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
—
|
|
307
|
+
<div class='inline'>
|
|
308
|
+
<p>the typedef of the instance. It can be any one of the <span class='object_link'><a href="KwargTypes.html" title="KwargTypes (module)">typedefs</a></span></p>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
</li>
|
|
312
|
+
|
|
313
|
+
<li>
|
|
314
|
+
|
|
315
|
+
<span class='name'>struct</span>
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
<span class='type'></span>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
—
|
|
323
|
+
<div class='inline'>
|
|
324
|
+
<p>the structure of the typedef.</p>
|
|
325
|
+
</div>
|
|
326
|
+
|
|
327
|
+
</li>
|
|
328
|
+
|
|
329
|
+
<li>
|
|
330
|
+
|
|
331
|
+
<span class='name'>prc</span>
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
<span class='type'></span>
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
—
|
|
341
|
+
<div class='inline'>
|
|
342
|
+
<p>an optional Proc that modifies the 'specificity' of struct</p>
|
|
343
|
+
</div>
|
|
344
|
+
|
|
345
|
+
</li>
|
|
346
|
+
|
|
347
|
+
</ul>
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
</div><table class="source_code">
|
|
351
|
+
<tr>
|
|
352
|
+
<td>
|
|
353
|
+
<pre class="lines">
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
21
|
|
357
|
+
22
|
|
358
|
+
23
|
|
359
|
+
24
|
|
360
|
+
25</pre>
|
|
361
|
+
</td>
|
|
362
|
+
<td>
|
|
363
|
+
<pre class="code"><span class="info file"># File 'lib/kdict/kwargmodel.rb', line 21</span>
|
|
364
|
+
|
|
365
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_struct'>struct</span><span class='comma'>,</span> <span class='id identifier rubyid_prc'>prc</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
|
366
|
+
<span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span>
|
|
367
|
+
<span class='ivar'>@struct</span> <span class='op'>=</span> <span class='id identifier rubyid_struct'>struct</span>
|
|
368
|
+
<span class='ivar'>@prc</span> <span class='op'>=</span> <span class='id identifier rubyid_prc'>prc</span> <span class='kw'>if</span> <span class='id identifier rubyid_prc'>prc</span>
|
|
369
|
+
<span class='kw'>end</span></pre>
|
|
370
|
+
</td>
|
|
371
|
+
</tr>
|
|
372
|
+
</table>
|
|
373
|
+
</div>
|
|
374
|
+
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
<div id="instance_attr_details" class="attr_details">
|
|
378
|
+
<h2>Instance Attribute Details</h2>
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
<span id=""></span>
|
|
382
|
+
<div class="method_details first">
|
|
383
|
+
<h3 class="signature first" id="prc-instance_method">
|
|
384
|
+
|
|
385
|
+
#<strong>prc</strong> ⇒ <tt>Proc</tt> <span class="extras">(readonly)</span>
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
</h3><div class="docstring">
|
|
392
|
+
<div class="discussion">
|
|
393
|
+
|
|
394
|
+
<p>Returns a unique Proc if it exists, otherwise nil.</p>
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
<div class="tags">
|
|
400
|
+
|
|
401
|
+
<p class="tag_title">Returns:</p>
|
|
402
|
+
<ul class="return">
|
|
403
|
+
|
|
404
|
+
<li>
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
<span class='type'>(<tt>Proc</tt>)</span>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
</li>
|
|
412
|
+
|
|
413
|
+
</ul>
|
|
414
|
+
|
|
415
|
+
</div><table class="source_code">
|
|
416
|
+
<tr>
|
|
417
|
+
<td>
|
|
418
|
+
<pre class="lines">
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
14
|
|
422
|
+
15
|
|
423
|
+
16</pre>
|
|
424
|
+
</td>
|
|
425
|
+
<td>
|
|
426
|
+
<pre class="code"><span class="info file"># File 'lib/kdict/kwargmodel.rb', line 14</span>
|
|
427
|
+
|
|
428
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prc'>prc</span>
|
|
429
|
+
<span class='ivar'>@prc</span>
|
|
430
|
+
<span class='kw'>end</span></pre>
|
|
431
|
+
</td>
|
|
432
|
+
</tr>
|
|
433
|
+
</table>
|
|
434
|
+
</div>
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
<span id=""></span>
|
|
438
|
+
<div class="method_details ">
|
|
439
|
+
<h3 class="signature " id="struct-instance_method">
|
|
440
|
+
|
|
441
|
+
#<strong>struct</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
</h3><div class="docstring">
|
|
448
|
+
<div class="discussion">
|
|
449
|
+
|
|
450
|
+
<p>Returns the structure of the typedef.</p>
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
<div class="tags">
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
</div><table class="source_code">
|
|
459
|
+
<tr>
|
|
460
|
+
<td>
|
|
461
|
+
<pre class="lines">
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
11
|
|
465
|
+
12
|
|
466
|
+
13</pre>
|
|
467
|
+
</td>
|
|
468
|
+
<td>
|
|
469
|
+
<pre class="code"><span class="info file"># File 'lib/kdict/kwargmodel.rb', line 11</span>
|
|
470
|
+
|
|
471
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_struct'>struct</span>
|
|
472
|
+
<span class='ivar'>@struct</span>
|
|
473
|
+
<span class='kw'>end</span></pre>
|
|
474
|
+
</td>
|
|
475
|
+
</tr>
|
|
476
|
+
</table>
|
|
477
|
+
</div>
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
<span id=""></span>
|
|
481
|
+
<div class="method_details ">
|
|
482
|
+
<h3 class="signature " id="type-instance_method">
|
|
483
|
+
|
|
484
|
+
#<strong>type</strong> ⇒ <tt>typedef</tt> <span class="extras">(readonly)</span>
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
</h3><div class="docstring">
|
|
491
|
+
<div class="discussion">
|
|
492
|
+
|
|
493
|
+
<p>Returns the typdef of the Model.</p>
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
</div>
|
|
497
|
+
</div>
|
|
498
|
+
<div class="tags">
|
|
499
|
+
|
|
500
|
+
<p class="tag_title">Returns:</p>
|
|
501
|
+
<ul class="return">
|
|
502
|
+
|
|
503
|
+
<li>
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
<span class='type'>(<tt>typedef</tt>)</span>
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
</li>
|
|
511
|
+
|
|
512
|
+
</ul>
|
|
513
|
+
|
|
514
|
+
</div><table class="source_code">
|
|
515
|
+
<tr>
|
|
516
|
+
<td>
|
|
517
|
+
<pre class="lines">
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
7
|
|
521
|
+
8
|
|
522
|
+
9</pre>
|
|
523
|
+
</td>
|
|
524
|
+
<td>
|
|
525
|
+
<pre class="code"><span class="info file"># File 'lib/kdict/kwargmodel.rb', line 7</span>
|
|
526
|
+
|
|
527
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
|
528
|
+
<span class='ivar'>@type</span>
|
|
529
|
+
<span class='kw'>end</span></pre>
|
|
530
|
+
</td>
|
|
531
|
+
</tr>
|
|
532
|
+
</table>
|
|
533
|
+
</div>
|
|
534
|
+
|
|
535
|
+
</div>
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
<div id="instance_method_details" class="method_details_list">
|
|
539
|
+
<h2>Instance Method Details</h2>
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
<div class="method_details first">
|
|
543
|
+
<h3 class="signature first" id="splay-instance_method">
|
|
544
|
+
|
|
545
|
+
#<strong>splay</strong> ⇒ <tt>[<span class='object_link'><a href="#type-instance_method" title="KwargModel#type (method)">type</a></span>, <span class='object_link'><a href="#struct-instance_method" title="KwargModel#struct (method)">struct</a></span>, <span class='object_link'><a href="#prc-instance_method" title="KwargModel#prc (method)">prc</a></span>]</tt>, <tt>[<span class='object_link'><a href="#type-instance_method" title="KwargModel#type (method)">type</a></span>, <span class='object_link'><a href="#struct-instance_method" title="KwargModel#struct (method)">struct</a></span>]</tt>
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
</h3><div class="docstring">
|
|
552
|
+
<div class="discussion">
|
|
553
|
+
|
|
554
|
+
<p>Returns the attributes of the instance as an array.</p>
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
</div>
|
|
558
|
+
</div>
|
|
559
|
+
<div class="tags">
|
|
560
|
+
|
|
561
|
+
<div class="examples">
|
|
562
|
+
<p class="tag_title">Examples:</p>
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
<pre class="example code"><code><span class='id identifier rubyid_km1'>km1</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="KwargModel (class)">KwargModel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="KwargModel#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:typeof</span><span class='comma'>,</span> <span class='const'>Float</span><span class='rparen'>)</span>
|
|
566
|
+
<span class='id identifier rubyid_km2'>km2</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="KwargModel (class)">KwargModel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="KwargModel#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:typeof</span><span class='comma'>,</span> <span class='const'>Float</span><span class='comma'>,</span> <span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lbrace'>{</span><span class='kw'>true</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
567
|
+
<span class='id identifier rubyid_km1'>km1</span><span class='period'>.</span><span class='id identifier rubyid_splay'>splay</span> <span class='comment'>#=> [:typeof, Float]
|
|
568
|
+
</span><span class='id identifier rubyid_km2'>km2</span><span class='period'>.</span><span class='id identifier rubyid_splay'>splay</span> <span class='comment'>#=> [:typeof, Float, @prc=#<Proc:0x000055c85d7671b0@kwargmodel.rb:20>]</span></code></pre>
|
|
569
|
+
|
|
570
|
+
</div>
|
|
571
|
+
|
|
572
|
+
<p class="tag_title">Returns:</p>
|
|
573
|
+
<ul class="return">
|
|
574
|
+
|
|
575
|
+
<li>
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
<span class='type'>(<tt>[<span class='object_link'><a href="#type-instance_method" title="KwargModel#type (method)">type</a></span>, <span class='object_link'><a href="#struct-instance_method" title="KwargModel#struct (method)">struct</a></span>, <span class='object_link'><a href="#prc-instance_method" title="KwargModel#prc (method)">prc</a></span>]</tt>)</span>
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
—
|
|
583
|
+
<div class='inline'>
|
|
584
|
+
<p>if prc exists.</p>
|
|
585
|
+
</div>
|
|
586
|
+
|
|
587
|
+
</li>
|
|
588
|
+
|
|
589
|
+
<li>
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
<span class='type'>(<tt>[<span class='object_link'><a href="#type-instance_method" title="KwargModel#type (method)">type</a></span>, <span class='object_link'><a href="#struct-instance_method" title="KwargModel#struct (method)">struct</a></span>]</tt>)</span>
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
—
|
|
597
|
+
<div class='inline'>
|
|
598
|
+
<p>if prc is nil.</p>
|
|
599
|
+
</div>
|
|
600
|
+
|
|
601
|
+
</li>
|
|
602
|
+
|
|
603
|
+
</ul>
|
|
604
|
+
|
|
605
|
+
</div><table class="source_code">
|
|
606
|
+
<tr>
|
|
607
|
+
<td>
|
|
608
|
+
<pre class="lines">
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
36
|
|
612
|
+
37
|
|
613
|
+
38</pre>
|
|
614
|
+
</td>
|
|
615
|
+
<td>
|
|
616
|
+
<pre class="code"><span class="info file"># File 'lib/kdict/kwargmodel.rb', line 36</span>
|
|
617
|
+
|
|
618
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_splay'>splay</span>
|
|
619
|
+
<span class='ivar'>@prc</span> <span class='op'>?</span> <span class='lbracket'>[</span><span class='ivar'>@type</span><span class='comma'>,</span> <span class='ivar'>@struct</span><span class='comma'>,</span> <span class='ivar'>@prc</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='ivar'>@type</span><span class='comma'>,</span> <span class='ivar'>@struct</span><span class='rbracket'>]</span>
|
|
620
|
+
<span class='kw'>end</span></pre>
|
|
621
|
+
</td>
|
|
622
|
+
</tr>
|
|
623
|
+
</table>
|
|
624
|
+
</div>
|
|
625
|
+
|
|
626
|
+
</div>
|
|
627
|
+
|
|
628
|
+
</div>
|
|
629
|
+
|
|
630
|
+
<div id="footer">
|
|
631
|
+
Generated on Thu Apr 11 21:45:30 2019 by
|
|
632
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
633
|
+
0.9.19 (ruby-2.6.2).
|
|
634
|
+
</div>
|
|
635
|
+
|
|
636
|
+
</div>
|
|
637
|
+
</body>
|
|
638
|
+
</html>
|