porolog 0.0.4 → 1.0.0
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 +4 -4
- data/README.md +30 -5
- data/Rakefile +7 -2
- data/bin/porolog +58 -1
- data/coverage/badge.svg +1 -1
- data/coverage/index.html +76733 -2638
- data/doc/Array.html +1066 -0
- data/doc/Object.html +674 -0
- data/doc/Porolog.html +4153 -74
- data/doc/Symbol.html +501 -0
- data/doc/_index.html +280 -6
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +34 -39
- data/doc/index.html +34 -39
- data/doc/method_list.html +1337 -57
- data/doc/top-level-namespace.html +4 -2
- data/lib/porolog.rb +1144 -4
- data/lib/porolog/arguments.rb +28 -24
- data/lib/porolog/core_ext.rb +188 -0
- data/lib/porolog/error.rb +9 -0
- data/lib/porolog/goal.rb +357 -0
- data/lib/porolog/instantiation.rb +346 -0
- data/lib/porolog/predicate.rb +74 -31
- data/lib/porolog/predicate/builtin.rb +825 -0
- data/lib/porolog/rule.rb +162 -0
- data/lib/porolog/scope.rb +4 -4
- data/lib/porolog/tail.rb +57 -0
- data/lib/porolog/value.rb +105 -0
- data/lib/porolog/variable.rb +325 -0
- data/test/porolog/arguments_test.rb +244 -195
- data/test/porolog/core_ext_test.rb +290 -0
- data/test/porolog/goal_test.rb +891 -0
- data/test/porolog/instantiation_test.rb +910 -0
- data/test/porolog/porolog_test.rb +2376 -13
- data/test/porolog/predicate/builtin_test.rb +1340 -0
- data/test/porolog/predicate_test.rb +84 -30
- data/test/porolog/rule_test.rb +527 -0
- data/test/porolog/scope_test.rb +0 -2
- data/test/porolog/tail_test.rb +127 -0
- data/test/porolog/value_test.rb +315 -0
- data/test/porolog/variable_test.rb +1614 -0
- data/test/samples_test.rb +277 -0
- data/test/test_helper.rb +115 -0
- metadata +34 -7
data/doc/Array.html
ADDED
@@ -0,0 +1,1066 @@
|
|
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: Array
|
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 = "Array";
|
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 (A)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Array</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: Array
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></li>
|
76
|
+
|
77
|
+
<li class="next">Array</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/porolog/core_ext.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>In Porolog, Arrays are the equivalent of lists.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#%2F-instance_method" title="#/ (instance method)">#<strong>/</strong>(other) ⇒ Array </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
146
|
+
<p>An Array with the Object being the head and the other Object being the tail.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#clean-instance_method" title="#clean (instance method)">#<strong>clean</strong> ⇒ Array </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'>
|
170
|
+
<p>Removes Porolog processing objects.</p>
|
171
|
+
</div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#goal-instance_method" title="#goal (instance method)">#<strong>goal</strong> ⇒ Porolog::Goal </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<span class="summary_desc"><div class='inline'>
|
194
|
+
<p>The goal that is most likely to be the goal for this array.</p>
|
195
|
+
</div></span>
|
196
|
+
|
197
|
+
</li>
|
198
|
+
|
199
|
+
|
200
|
+
<li class="public ">
|
201
|
+
<span class="summary_signature">
|
202
|
+
|
203
|
+
<a href="#head-instance_method" title="#head (instance method)">#<strong>head</strong>(head_size = 1) ⇒ Object </a>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="summary_desc"><div class='inline'>
|
218
|
+
<p>The head of the Array.</p>
|
219
|
+
</div></span>
|
220
|
+
|
221
|
+
</li>
|
222
|
+
|
223
|
+
|
224
|
+
<li class="public ">
|
225
|
+
<span class="summary_signature">
|
226
|
+
|
227
|
+
<a href="#headtail%3F-instance_method" title="#headtail? (instance method)">#<strong>headtail?</strong> ⇒ Boolean </a>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</span>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
<span class="summary_desc"><div class='inline'>
|
242
|
+
<p>Whether the Object is an Array with a head and a tail.</p>
|
243
|
+
</div></span>
|
244
|
+
|
245
|
+
</li>
|
246
|
+
|
247
|
+
|
248
|
+
<li class="public ">
|
249
|
+
<span class="summary_signature">
|
250
|
+
|
251
|
+
<a href="#tail-instance_method" title="#tail (instance method)">#<strong>tail</strong>(head_size = 1) ⇒ Object </a>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
</span>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
<span class="summary_desc"><div class='inline'>
|
266
|
+
<p>The tail of the Array.</p>
|
267
|
+
</div></span>
|
268
|
+
|
269
|
+
</li>
|
270
|
+
|
271
|
+
|
272
|
+
<li class="public ">
|
273
|
+
<span class="summary_signature">
|
274
|
+
|
275
|
+
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ Symbol </a>
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
</span>
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
<span class="summary_desc"><div class='inline'>
|
290
|
+
<p>The type of the object (for an Array, should be :array).</p>
|
291
|
+
</div></span>
|
292
|
+
|
293
|
+
</li>
|
294
|
+
|
295
|
+
|
296
|
+
<li class="public ">
|
297
|
+
<span class="summary_signature">
|
298
|
+
|
299
|
+
<a href="#value-instance_method" title="#value (instance method)">#<strong>value</strong>(visited = []) ⇒ Array </a>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
</span>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
<span class="summary_desc"><div class='inline'>
|
314
|
+
<p>The values of its elements.</p>
|
315
|
+
</div></span>
|
316
|
+
|
317
|
+
</li>
|
318
|
+
|
319
|
+
|
320
|
+
<li class="public ">
|
321
|
+
<span class="summary_signature">
|
322
|
+
|
323
|
+
<a href="#variables-instance_method" title="#variables (instance method)">#<strong>variables</strong> ⇒ Array </a>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
</span>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
<span class="summary_desc"><div class='inline'>
|
338
|
+
<p>Embedded variables.</p>
|
339
|
+
</div></span>
|
340
|
+
|
341
|
+
</li>
|
342
|
+
|
343
|
+
|
344
|
+
</ul>
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
<div id="instance_method_details" class="method_details_list">
|
350
|
+
<h2>Instance Method Details</h2>
|
351
|
+
|
352
|
+
|
353
|
+
<div class="method_details first">
|
354
|
+
<h3 class="signature first" id="/-instance_method">
|
355
|
+
|
356
|
+
#<strong>/</strong>(other) ⇒ <tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
</h3><div class="docstring">
|
363
|
+
<div class="discussion">
|
364
|
+
|
365
|
+
<p>Returns an Array with the Object being the head and the other Object being the tail.</p>
|
366
|
+
|
367
|
+
|
368
|
+
</div>
|
369
|
+
</div>
|
370
|
+
<div class="tags">
|
371
|
+
<p class="tag_title">Parameters:</p>
|
372
|
+
<ul class="param">
|
373
|
+
|
374
|
+
<li>
|
375
|
+
|
376
|
+
<span class='name'>other</span>
|
377
|
+
|
378
|
+
|
379
|
+
<span class='type'>(<tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>)</span>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
—
|
384
|
+
<div class='inline'>
|
385
|
+
<p>the Object which is to be the tail</p>
|
386
|
+
</div>
|
387
|
+
|
388
|
+
</li>
|
389
|
+
|
390
|
+
</ul>
|
391
|
+
|
392
|
+
<p class="tag_title">Returns:</p>
|
393
|
+
<ul class="return">
|
394
|
+
|
395
|
+
<li>
|
396
|
+
|
397
|
+
|
398
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>)</span>
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
—
|
403
|
+
<div class='inline'>
|
404
|
+
<p>an Array with the Object being the head and the other Object being the tail.</p>
|
405
|
+
</div>
|
406
|
+
|
407
|
+
</li>
|
408
|
+
|
409
|
+
</ul>
|
410
|
+
|
411
|
+
</div><table class="source_code">
|
412
|
+
<tr>
|
413
|
+
<td>
|
414
|
+
<pre class="lines">
|
415
|
+
|
416
|
+
|
417
|
+
146
|
418
|
+
147
|
419
|
+
148
|
420
|
+
149
|
421
|
+
150
|
422
|
+
151
|
423
|
+
152</pre>
|
424
|
+
</td>
|
425
|
+
<td>
|
426
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 146</span>
|
427
|
+
|
428
|
+
<span class='kw'>def</span> <span class='op'>/</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
429
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Porolog.html" title="Porolog (module)">Porolog</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Porolog/Variable.html" title="Porolog::Variable (class)">Variable</a></span></span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Symbol.html" title="Symbol (class)">Symbol</a></span></span><span class='rparen'>)</span>
|
430
|
+
<span class='kw'>self</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='const'>Tail</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
431
|
+
<span class='kw'>else</span>
|
432
|
+
<span class='kw'>self</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='id identifier rubyid_other'>other</span><span class='rbracket'>]</span>
|
433
|
+
<span class='kw'>end</span>
|
434
|
+
<span class='kw'>end</span></pre>
|
435
|
+
</td>
|
436
|
+
</tr>
|
437
|
+
</table>
|
438
|
+
</div>
|
439
|
+
|
440
|
+
<div class="method_details ">
|
441
|
+
<h3 class="signature " id="clean-instance_method">
|
442
|
+
|
443
|
+
#<strong>clean</strong> ⇒ <tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
</h3><div class="docstring">
|
450
|
+
<div class="discussion">
|
451
|
+
|
452
|
+
<p>Removes Porolog processing objects.</p>
|
453
|
+
|
454
|
+
|
455
|
+
</div>
|
456
|
+
</div>
|
457
|
+
<div class="tags">
|
458
|
+
|
459
|
+
<p class="tag_title">Returns:</p>
|
460
|
+
<ul class="return">
|
461
|
+
|
462
|
+
<li>
|
463
|
+
|
464
|
+
|
465
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>)</span>
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
—
|
470
|
+
<div class='inline'>
|
471
|
+
<p>the values of its elements with variables replaced by nil and Tails replaced by UNKNOWN_TAIL.</p>
|
472
|
+
</div>
|
473
|
+
|
474
|
+
</li>
|
475
|
+
|
476
|
+
</ul>
|
477
|
+
|
478
|
+
</div><table class="source_code">
|
479
|
+
<tr>
|
480
|
+
<td>
|
481
|
+
<pre class="lines">
|
482
|
+
|
483
|
+
|
484
|
+
125
|
485
|
+
126
|
486
|
+
127
|
487
|
+
128
|
488
|
+
129
|
489
|
+
130
|
490
|
+
131
|
491
|
+
132
|
492
|
+
133
|
493
|
+
134
|
494
|
+
135
|
495
|
+
136
|
496
|
+
137</pre>
|
497
|
+
</td>
|
498
|
+
<td>
|
499
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 125</span>
|
500
|
+
|
501
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_clean'>clean</span>
|
502
|
+
<span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_element'>element</span><span class='op'>|</span>
|
503
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Array (class)">Array</a></span></span><span class='rparen'>)</span>
|
504
|
+
<span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_clean'>clean</span>
|
505
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Tail</span><span class='rparen'>)</span>
|
506
|
+
<span class='const'>UNKNOWN_TAIL</span>
|
507
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Variable</span><span class='rparen'>)</span>
|
508
|
+
<span class='kw'>nil</span>
|
509
|
+
<span class='kw'>else</span>
|
510
|
+
<span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
511
|
+
<span class='kw'>end</span>
|
512
|
+
<span class='rbrace'>}</span>
|
513
|
+
<span class='kw'>end</span></pre>
|
514
|
+
</td>
|
515
|
+
</tr>
|
516
|
+
</table>
|
517
|
+
</div>
|
518
|
+
|
519
|
+
<div class="method_details ">
|
520
|
+
<h3 class="signature " id="goal-instance_method">
|
521
|
+
|
522
|
+
#<strong>goal</strong> ⇒ <tt><span class='object_link'><a href="Porolog/Goal.html" title="Porolog::Goal (class)">Porolog::Goal</a></span></tt>
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
</h3><div class="docstring">
|
529
|
+
<div class="discussion">
|
530
|
+
|
531
|
+
<p>Returns the goal that is most likely to be the goal for this array.</p>
|
532
|
+
|
533
|
+
|
534
|
+
</div>
|
535
|
+
</div>
|
536
|
+
<div class="tags">
|
537
|
+
|
538
|
+
<p class="tag_title">Returns:</p>
|
539
|
+
<ul class="return">
|
540
|
+
|
541
|
+
<li>
|
542
|
+
|
543
|
+
|
544
|
+
<span class='type'>(<tt><span class='object_link'><a href="Porolog/Goal.html" title="Porolog::Goal (class)">Porolog::Goal</a></span></tt>)</span>
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
—
|
549
|
+
<div class='inline'>
|
550
|
+
<p>the goal that is most likely to be the goal for this array.</p>
|
551
|
+
</div>
|
552
|
+
|
553
|
+
</li>
|
554
|
+
|
555
|
+
</ul>
|
556
|
+
|
557
|
+
</div><table class="source_code">
|
558
|
+
<tr>
|
559
|
+
<td>
|
560
|
+
<pre class="lines">
|
561
|
+
|
562
|
+
|
563
|
+
184
|
564
|
+
185
|
565
|
+
186</pre>
|
566
|
+
</td>
|
567
|
+
<td>
|
568
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 184</span>
|
569
|
+
|
570
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_goal'>goal</span>
|
571
|
+
<span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_element'>element</span><span class='op'>|</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_goal'>goal</span> <span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:goal</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_goal'>goal</span><span class='op'>|</span> <span class='id identifier rubyid_goal'>goal</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Porolog.html" title="Porolog (module)">Porolog</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Porolog/Goal.html" title="Porolog::Goal (class)">Goal</a></span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
572
|
+
<span class='kw'>end</span></pre>
|
573
|
+
</td>
|
574
|
+
</tr>
|
575
|
+
</table>
|
576
|
+
</div>
|
577
|
+
|
578
|
+
<div class="method_details ">
|
579
|
+
<h3 class="signature " id="head-instance_method">
|
580
|
+
|
581
|
+
#<strong>head</strong>(head_size = 1) ⇒ <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
</h3><div class="docstring">
|
588
|
+
<div class="discussion">
|
589
|
+
|
590
|
+
<p>Returns the head of the Array</p>
|
591
|
+
|
592
|
+
|
593
|
+
</div>
|
594
|
+
</div>
|
595
|
+
<div class="tags">
|
596
|
+
<p class="tag_title">Parameters:</p>
|
597
|
+
<ul class="param">
|
598
|
+
|
599
|
+
<li>
|
600
|
+
|
601
|
+
<span class='name'>head_size</span>
|
602
|
+
|
603
|
+
|
604
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
605
|
+
|
606
|
+
|
607
|
+
<em class="default">(defaults to: <tt>1</tt>)</em>
|
608
|
+
|
609
|
+
|
610
|
+
—
|
611
|
+
<div class='inline'>
|
612
|
+
<p>specifies the size of the head</p>
|
613
|
+
</div>
|
614
|
+
|
615
|
+
</li>
|
616
|
+
|
617
|
+
</ul>
|
618
|
+
|
619
|
+
<p class="tag_title">Returns:</p>
|
620
|
+
<ul class="return">
|
621
|
+
|
622
|
+
<li>
|
623
|
+
|
624
|
+
|
625
|
+
<span class='type'>(<tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>)</span>
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
—
|
630
|
+
<div class='inline'>
|
631
|
+
<p>the head of the Array</p>
|
632
|
+
</div>
|
633
|
+
|
634
|
+
</li>
|
635
|
+
|
636
|
+
</ul>
|
637
|
+
|
638
|
+
</div><table class="source_code">
|
639
|
+
<tr>
|
640
|
+
<td>
|
641
|
+
<pre class="lines">
|
642
|
+
|
643
|
+
|
644
|
+
156
|
645
|
+
157
|
646
|
+
158
|
647
|
+
159
|
648
|
+
160
|
649
|
+
161
|
650
|
+
162
|
651
|
+
163
|
652
|
+
164
|
653
|
+
165
|
654
|
+
166</pre>
|
655
|
+
</td>
|
656
|
+
<td>
|
657
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 156</span>
|
658
|
+
|
659
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_head'>head</span><span class='lparen'>(</span><span class='id identifier rubyid_head_size'>head_size</span> <span class='op'>=</span> <span class='int'>1</span><span class='rparen'>)</span>
|
660
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_head_size'>head_size</span> <span class='op'>==</span> <span class='int'>1</span>
|
661
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_first'>first</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="Porolog.html" title="Porolog (module)">Porolog</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Porolog.html#UNKNOWN_TAIL-constant" title="Porolog::UNKNOWN_TAIL (constant)">UNKNOWN_TAIL</a></span></span>
|
662
|
+
<span class='kw'>nil</span>
|
663
|
+
<span class='kw'>else</span>
|
664
|
+
<span class='id identifier rubyid_first'>first</span>
|
665
|
+
<span class='kw'>end</span>
|
666
|
+
<span class='kw'>else</span>
|
667
|
+
<span class='kw'>self</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='id identifier rubyid_head_size'>head_size</span><span class='rbracket'>]</span>
|
668
|
+
<span class='kw'>end</span>
|
669
|
+
<span class='kw'>end</span></pre>
|
670
|
+
</td>
|
671
|
+
</tr>
|
672
|
+
</table>
|
673
|
+
</div>
|
674
|
+
|
675
|
+
<div class="method_details ">
|
676
|
+
<h3 class="signature " id="headtail?-instance_method">
|
677
|
+
|
678
|
+
#<strong>headtail?</strong> ⇒ <tt>Boolean</tt>
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
</h3><div class="docstring">
|
685
|
+
<div class="discussion">
|
686
|
+
|
687
|
+
<p>Returns whether the Object is an Array with a head and a tail.</p>
|
688
|
+
|
689
|
+
|
690
|
+
</div>
|
691
|
+
</div>
|
692
|
+
<div class="tags">
|
693
|
+
|
694
|
+
<p class="tag_title">Returns:</p>
|
695
|
+
<ul class="return">
|
696
|
+
|
697
|
+
<li>
|
698
|
+
|
699
|
+
|
700
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
—
|
705
|
+
<div class='inline'>
|
706
|
+
<p>whether the Object is an Array with a head and a tail.</p>
|
707
|
+
</div>
|
708
|
+
|
709
|
+
</li>
|
710
|
+
|
711
|
+
</ul>
|
712
|
+
|
713
|
+
</div><table class="source_code">
|
714
|
+
<tr>
|
715
|
+
<td>
|
716
|
+
<pre class="lines">
|
717
|
+
|
718
|
+
|
719
|
+
179
|
720
|
+
180
|
721
|
+
181</pre>
|
722
|
+
</td>
|
723
|
+
<td>
|
724
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 179</span>
|
725
|
+
|
726
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_headtail?'>headtail?</span>
|
727
|
+
<span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>2</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='id identifier rubyid_last'>last</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Tail</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_last'>last</span> <span class='op'>==</span> <span class='const'>UNKNOWN_TAIL</span><span class='rparen'>)</span>
|
728
|
+
<span class='kw'>end</span></pre>
|
729
|
+
</td>
|
730
|
+
</tr>
|
731
|
+
</table>
|
732
|
+
</div>
|
733
|
+
|
734
|
+
<div class="method_details ">
|
735
|
+
<h3 class="signature " id="tail-instance_method">
|
736
|
+
|
737
|
+
#<strong>tail</strong>(head_size = 1) ⇒ <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
</h3><div class="docstring">
|
744
|
+
<div class="discussion">
|
745
|
+
|
746
|
+
<p>Returns the tail of the Array</p>
|
747
|
+
|
748
|
+
|
749
|
+
</div>
|
750
|
+
</div>
|
751
|
+
<div class="tags">
|
752
|
+
<p class="tag_title">Parameters:</p>
|
753
|
+
<ul class="param">
|
754
|
+
|
755
|
+
<li>
|
756
|
+
|
757
|
+
<span class='name'>head_size</span>
|
758
|
+
|
759
|
+
|
760
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
761
|
+
|
762
|
+
|
763
|
+
<em class="default">(defaults to: <tt>1</tt>)</em>
|
764
|
+
|
765
|
+
|
766
|
+
—
|
767
|
+
<div class='inline'>
|
768
|
+
<p>specifies the size of the head</p>
|
769
|
+
</div>
|
770
|
+
|
771
|
+
</li>
|
772
|
+
|
773
|
+
</ul>
|
774
|
+
|
775
|
+
<p class="tag_title">Returns:</p>
|
776
|
+
<ul class="return">
|
777
|
+
|
778
|
+
<li>
|
779
|
+
|
780
|
+
|
781
|
+
<span class='type'>(<tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>)</span>
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
—
|
786
|
+
<div class='inline'>
|
787
|
+
<p>the tail of the Array</p>
|
788
|
+
</div>
|
789
|
+
|
790
|
+
</li>
|
791
|
+
|
792
|
+
</ul>
|
793
|
+
|
794
|
+
</div><table class="source_code">
|
795
|
+
<tr>
|
796
|
+
<td>
|
797
|
+
<pre class="lines">
|
798
|
+
|
799
|
+
|
800
|
+
170
|
801
|
+
171
|
802
|
+
172
|
803
|
+
173
|
804
|
+
174
|
805
|
+
175
|
806
|
+
176</pre>
|
807
|
+
</td>
|
808
|
+
<td>
|
809
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 170</span>
|
810
|
+
|
811
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tail'>tail</span><span class='lparen'>(</span><span class='id identifier rubyid_head_size'>head_size</span> <span class='op'>=</span> <span class='int'>1</span><span class='rparen'>)</span>
|
812
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_last'>last</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="Porolog.html" title="Porolog (module)">Porolog</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Porolog.html#UNKNOWN_TAIL-constant" title="Porolog::UNKNOWN_TAIL (constant)">UNKNOWN_TAIL</a></span></span>
|
813
|
+
<span class='lbracket'>[</span><span class='op'>*</span><span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_head_size'>head_size</span><span class='op'>..</span><span class='op'>-</span><span class='int'>2</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Porolog.html" title="Porolog (module)">Porolog</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Porolog.html#UNKNOWN_TAIL-constant" title="Porolog::UNKNOWN_TAIL (constant)">UNKNOWN_TAIL</a></span></span><span class='rbracket'>]</span>
|
814
|
+
<span class='kw'>else</span>
|
815
|
+
<span class='lbracket'>[</span><span class='op'>*</span><span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_head_size'>head_size</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
|
816
|
+
<span class='kw'>end</span>
|
817
|
+
<span class='kw'>end</span></pre>
|
818
|
+
</td>
|
819
|
+
</tr>
|
820
|
+
</table>
|
821
|
+
</div>
|
822
|
+
|
823
|
+
<div class="method_details ">
|
824
|
+
<h3 class="signature " id="type-instance_method">
|
825
|
+
|
826
|
+
#<strong>type</strong> ⇒ <tt><span class='object_link'><a href="Symbol.html" title="Symbol (class)">Symbol</a></span></tt>
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
</h3><div class="docstring">
|
833
|
+
<div class="discussion">
|
834
|
+
|
835
|
+
<p>Returns the type of the object (for an Array, should be :array)</p>
|
836
|
+
|
837
|
+
|
838
|
+
</div>
|
839
|
+
</div>
|
840
|
+
<div class="tags">
|
841
|
+
|
842
|
+
<p class="tag_title">Returns:</p>
|
843
|
+
<ul class="return">
|
844
|
+
|
845
|
+
<li>
|
846
|
+
|
847
|
+
|
848
|
+
<span class='type'>(<tt><span class='object_link'><a href="Symbol.html" title="Symbol (class)">Symbol</a></span></tt>)</span>
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
—
|
853
|
+
<div class='inline'>
|
854
|
+
<p>the type of the object (for an Array, should be :array)</p>
|
855
|
+
</div>
|
856
|
+
|
857
|
+
</li>
|
858
|
+
|
859
|
+
</ul>
|
860
|
+
|
861
|
+
</div><table class="source_code">
|
862
|
+
<tr>
|
863
|
+
<td>
|
864
|
+
<pre class="lines">
|
865
|
+
|
866
|
+
|
867
|
+
140
|
868
|
+
141
|
869
|
+
142</pre>
|
870
|
+
</td>
|
871
|
+
<td>
|
872
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 140</span>
|
873
|
+
|
874
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
875
|
+
<span class='symbol'>:array</span>
|
876
|
+
<span class='kw'>end</span></pre>
|
877
|
+
</td>
|
878
|
+
</tr>
|
879
|
+
</table>
|
880
|
+
</div>
|
881
|
+
|
882
|
+
<div class="method_details ">
|
883
|
+
<h3 class="signature " id="value-instance_method">
|
884
|
+
|
885
|
+
#<strong>value</strong>(visited = []) ⇒ <tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
</h3><div class="docstring">
|
892
|
+
<div class="discussion">
|
893
|
+
|
894
|
+
<p>Returns the values of its elements.</p>
|
895
|
+
|
896
|
+
|
897
|
+
</div>
|
898
|
+
</div>
|
899
|
+
<div class="tags">
|
900
|
+
|
901
|
+
<p class="tag_title">Returns:</p>
|
902
|
+
<ul class="return">
|
903
|
+
|
904
|
+
<li>
|
905
|
+
|
906
|
+
|
907
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>)</span>
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
—
|
912
|
+
<div class='inline'>
|
913
|
+
<p>the values of its elements.</p>
|
914
|
+
</div>
|
915
|
+
|
916
|
+
</li>
|
917
|
+
|
918
|
+
</ul>
|
919
|
+
|
920
|
+
</div><table class="source_code">
|
921
|
+
<tr>
|
922
|
+
<td>
|
923
|
+
<pre class="lines">
|
924
|
+
|
925
|
+
|
926
|
+
92
|
927
|
+
93
|
928
|
+
94
|
929
|
+
95
|
930
|
+
96
|
931
|
+
97
|
932
|
+
98
|
933
|
+
99
|
934
|
+
100
|
935
|
+
101
|
936
|
+
102
|
937
|
+
103
|
938
|
+
104
|
939
|
+
105
|
940
|
+
106
|
941
|
+
107
|
942
|
+
108
|
943
|
+
109
|
944
|
+
110
|
945
|
+
111
|
946
|
+
112
|
947
|
+
113
|
948
|
+
114
|
949
|
+
115
|
950
|
+
116
|
951
|
+
117
|
952
|
+
118
|
953
|
+
119
|
954
|
+
120
|
955
|
+
121</pre>
|
956
|
+
</td>
|
957
|
+
<td>
|
958
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 92</span>
|
959
|
+
|
960
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_visited'>visited</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
961
|
+
<span class='kw'>return</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='id identifier rubyid_visited'>visited</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
962
|
+
<span class='id identifier rubyid_visited'>visited</span> <span class='op'>=</span> <span class='id identifier rubyid_visited'>visited</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span>
|
963
|
+
<span class='id identifier rubyid_flat_map'>flat_map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_element'>element</span><span class='op'>|</span>
|
964
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Tail</span><span class='rparen'>)</span>
|
965
|
+
<span class='id identifier rubyid_tail'>tail</span> <span class='op'>=</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_visited'>visited</span><span class='rparen'>)</span>
|
966
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Array (class)">Array</a></span></span><span class='rparen'>)</span>
|
967
|
+
<span class='id identifier rubyid_tail'>tail</span>
|
968
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Variable</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Value</span><span class='rparen'>)</span>
|
969
|
+
<span class='id identifier rubyid_tail'>tail</span> <span class='op'>=</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_visited'>visited</span><span class='rparen'>)</span>
|
970
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Array (class)">Array</a></span></span><span class='rparen'>)</span>
|
971
|
+
<span class='id identifier rubyid_tail'>tail</span>
|
972
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Variable</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Value</span><span class='rparen'>)</span>
|
973
|
+
<span class='id identifier rubyid_tail'>tail</span> <span class='op'>=</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_goal'>goal</span><span class='period'>.</span><span class='id identifier rubyid_variablise'>variablise</span><span class='lparen'>(</span><span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_visited'>visited</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
974
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_tail'>tail</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Array (class)">Array</a></span></span><span class='rparen'>)</span>
|
975
|
+
<span class='id identifier rubyid_tail'>tail</span>
|
976
|
+
<span class='kw'>else</span>
|
977
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_element'>element</span><span class='rbracket'>]</span>
|
978
|
+
<span class='kw'>end</span>
|
979
|
+
<span class='kw'>else</span>
|
980
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_element'>element</span><span class='rbracket'>]</span>
|
981
|
+
<span class='kw'>end</span>
|
982
|
+
<span class='kw'>else</span>
|
983
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_element'>element</span><span class='rbracket'>]</span>
|
984
|
+
<span class='kw'>end</span>
|
985
|
+
<span class='kw'>else</span>
|
986
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_visited'>visited</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
987
|
+
<span class='kw'>end</span>
|
988
|
+
<span class='rbrace'>}</span>
|
989
|
+
<span class='kw'>end</span></pre>
|
990
|
+
</td>
|
991
|
+
</tr>
|
992
|
+
</table>
|
993
|
+
</div>
|
994
|
+
|
995
|
+
<div class="method_details ">
|
996
|
+
<h3 class="signature " id="variables-instance_method">
|
997
|
+
|
998
|
+
#<strong>variables</strong> ⇒ <tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>
|
999
|
+
|
1000
|
+
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
</h3><div class="docstring">
|
1005
|
+
<div class="discussion">
|
1006
|
+
|
1007
|
+
<p>Returns embedded variables.</p>
|
1008
|
+
|
1009
|
+
|
1010
|
+
</div>
|
1011
|
+
</div>
|
1012
|
+
<div class="tags">
|
1013
|
+
|
1014
|
+
<p class="tag_title">Returns:</p>
|
1015
|
+
<ul class="return">
|
1016
|
+
|
1017
|
+
<li>
|
1018
|
+
|
1019
|
+
|
1020
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Array (class)">Array</a></span></tt>)</span>
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
—
|
1025
|
+
<div class='inline'>
|
1026
|
+
<p>embedded variables.</p>
|
1027
|
+
</div>
|
1028
|
+
|
1029
|
+
</li>
|
1030
|
+
|
1031
|
+
</ul>
|
1032
|
+
|
1033
|
+
</div><table class="source_code">
|
1034
|
+
<tr>
|
1035
|
+
<td>
|
1036
|
+
<pre class="lines">
|
1037
|
+
|
1038
|
+
|
1039
|
+
87
|
1040
|
+
88
|
1041
|
+
89</pre>
|
1042
|
+
</td>
|
1043
|
+
<td>
|
1044
|
+
<pre class="code"><span class="info file"># File 'lib/porolog/core_ext.rb', line 87</span>
|
1045
|
+
|
1046
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_variables'>variables</span>
|
1047
|
+
<span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:variables</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
|
1048
|
+
<span class='kw'>end</span></pre>
|
1049
|
+
</td>
|
1050
|
+
</tr>
|
1051
|
+
</table>
|
1052
|
+
</div>
|
1053
|
+
|
1054
|
+
</div>
|
1055
|
+
|
1056
|
+
</div>
|
1057
|
+
|
1058
|
+
<div id="footer">
|
1059
|
+
Generated on Sun Aug 2 19:24:17 2020 by
|
1060
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1061
|
+
0.9.19 (ruby-2.6.5).
|
1062
|
+
</div>
|
1063
|
+
|
1064
|
+
</div>
|
1065
|
+
</body>
|
1066
|
+
</html>
|