alimento_alu0101050218 0.1.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 +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +95 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +11 -0
- data/Rakefile +6 -0
- data/alimento.gemspec +38 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/Alimento.html +158 -0
- data/docs/Alimento/Alimento.html +1999 -0
- data/docs/Alimento/Error.html +124 -0
- data/docs/Alimento/List.html +963 -0
- data/docs/Alimento/Node.html +415 -0
- data/docs/Alimento/Plato.html +1132 -0
- data/docs/Alimento/PlatoAmbiental.html +1165 -0
- data/docs/Array.html +391 -0
- data/docs/_index.html +186 -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.README.html +80 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +80 -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 +459 -0
- data/docs/top-level-namespace.html +112 -0
- data/lib/alimento.rb +14 -0
- data/lib/alimento/Array.rb +31 -0
- data/lib/alimento/alimento.rb +135 -0
- data/lib/alimento/list.rb +87 -0
- data/lib/alimento/menuDSL.rb +59 -0
- data/lib/alimento/plato.rb +93 -0
- data/lib/alimento/platoDSL.rb +56 -0
- data/lib/alimento/platoambiental.rb +100 -0
- data/lib/alimento/version.rb +3 -0
- metadata +186 -0
@@ -0,0 +1,124 @@
|
|
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
|
+
Exception: Alimento::Error
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
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 = "Alimento::Error";
|
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 (E)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Alimento.html" title="Alimento (module)">Alimento</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Error</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>Exception: Alimento::Error
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">StandardError</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">StandardError</li>
|
78
|
+
|
79
|
+
<li class="next">Alimento::Error</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/alimento.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
<div id="footer">
|
117
|
+
Generated on Tue Dec 17 22:28:19 2019 by
|
118
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
|
+
0.9.20 (ruby-2.5.1).
|
120
|
+
</div>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</body>
|
124
|
+
</html>
|
@@ -0,0 +1,963 @@
|
|
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: Alimento::List
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
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 = "Alimento::List";
|
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 (L)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Alimento.html" title="Alimento (module)">Alimento</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">List</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: Alimento::List
|
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">Alimento::List</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd>Enumerable</dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/alimento/list.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
112
|
+
<ul class="summary">
|
113
|
+
|
114
|
+
<li class="public ">
|
115
|
+
<span class="summary_signature">
|
116
|
+
|
117
|
+
<a href="#head-instance_method" title="#head (instance method)">#<strong>head</strong> ⇒ Object </a>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
</span>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<span class="note title readonly">readonly</span>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<span class="summary_desc"><div class='inline'>
|
137
|
+
<p>Returns the value of attribute head.</p>
|
138
|
+
</div></span>
|
139
|
+
|
140
|
+
</li>
|
141
|
+
|
142
|
+
|
143
|
+
<li class="public ">
|
144
|
+
<span class="summary_signature">
|
145
|
+
|
146
|
+
<a href="#tail-instance_method" title="#tail (instance method)">#<strong>tail</strong> ⇒ Object </a>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
</span>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<span class="note title readonly">readonly</span>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<span class="summary_desc"><div class='inline'>
|
166
|
+
<p>Returns the value of attribute tail.</p>
|
167
|
+
</div></span>
|
168
|
+
|
169
|
+
</li>
|
170
|
+
|
171
|
+
|
172
|
+
</ul>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<h2>
|
179
|
+
Instance Method Summary
|
180
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
181
|
+
</h2>
|
182
|
+
|
183
|
+
<ul class="summary">
|
184
|
+
|
185
|
+
<li class="public ">
|
186
|
+
<span class="summary_signature">
|
187
|
+
|
188
|
+
<a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong> ⇒ Object </a>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
</span>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
<li class="public ">
|
208
|
+
<span class="summary_signature">
|
209
|
+
|
210
|
+
<a href="#extract_head-instance_method" title="#extract_head (instance method)">#<strong>extract_head</strong> ⇒ Node </a>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
</span>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
<span class="summary_desc"><div class='inline'>
|
225
|
+
<p>Nodo de la lista extraido.</p>
|
226
|
+
</div></span>
|
227
|
+
|
228
|
+
</li>
|
229
|
+
|
230
|
+
|
231
|
+
<li class="public ">
|
232
|
+
<span class="summary_signature">
|
233
|
+
|
234
|
+
<a href="#extract_tail-instance_method" title="#extract_tail (instance method)">#<strong>extract_tail</strong> ⇒ Node </a>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
</span>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
<span class="summary_desc"><div class='inline'>
|
249
|
+
<p>Nodo de la lista extraido.</p>
|
250
|
+
</div></span>
|
251
|
+
|
252
|
+
</li>
|
253
|
+
|
254
|
+
|
255
|
+
<li class="public ">
|
256
|
+
<span class="summary_signature">
|
257
|
+
|
258
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(value) ⇒ List </a>
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
</span>
|
263
|
+
|
264
|
+
|
265
|
+
<span class="note title constructor">constructor</span>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
<span class="summary_desc"><div class='inline'>
|
275
|
+
<p>A new instance of List.</p>
|
276
|
+
</div></span>
|
277
|
+
|
278
|
+
</li>
|
279
|
+
|
280
|
+
|
281
|
+
<li class="public ">
|
282
|
+
<span class="summary_signature">
|
283
|
+
|
284
|
+
<a href="#insert_head-instance_method" title="#insert_head (instance method)">#<strong>insert_head</strong>(value) ⇒ Object </a>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
</span>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
299
|
+
|
300
|
+
</li>
|
301
|
+
|
302
|
+
|
303
|
+
<li class="public ">
|
304
|
+
<span class="summary_signature">
|
305
|
+
|
306
|
+
<a href="#insert_sundry-instance_method" title="#insert_sundry (instance method)">#<strong>insert_sundry</strong>(value_array) ⇒ Object </a>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
</span>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
321
|
+
|
322
|
+
</li>
|
323
|
+
|
324
|
+
|
325
|
+
<li class="public ">
|
326
|
+
<span class="summary_signature">
|
327
|
+
|
328
|
+
<a href="#insert_tail-instance_method" title="#insert_tail (instance method)">#<strong>insert_tail</strong>(value) ⇒ Object </a>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
</span>
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
343
|
+
|
344
|
+
</li>
|
345
|
+
|
346
|
+
|
347
|
+
</ul>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
<div id="constructor_details" class="method_details_list">
|
352
|
+
<h2>Constructor Details</h2>
|
353
|
+
|
354
|
+
<div class="method_details first">
|
355
|
+
<h3 class="signature first" id="initialize-instance_method">
|
356
|
+
|
357
|
+
#<strong>initialize</strong>(value) ⇒ <tt><span class='object_link'><a href="" title="Alimento::List (class)">List</a></span></tt>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
</h3><div class="docstring">
|
364
|
+
<div class="discussion">
|
365
|
+
|
366
|
+
<div class="note notetag">
|
367
|
+
<strong>Note:</strong>
|
368
|
+
<div class='inline'>
|
369
|
+
<p>Constructor de la clase</p>
|
370
|
+
</div>
|
371
|
+
</div>
|
372
|
+
|
373
|
+
|
374
|
+
<p>Returns a new instance of List</p>
|
375
|
+
|
376
|
+
|
377
|
+
</div>
|
378
|
+
</div>
|
379
|
+
<div class="tags">
|
380
|
+
<p class="tag_title">Parameters:</p>
|
381
|
+
<ul class="param">
|
382
|
+
|
383
|
+
<li>
|
384
|
+
|
385
|
+
<span class='name'>value</span>
|
386
|
+
|
387
|
+
|
388
|
+
<span class='type'></span>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
—
|
393
|
+
<div class='inline'>
|
394
|
+
<p>Contenido de un nodo</p>
|
395
|
+
</div>
|
396
|
+
|
397
|
+
</li>
|
398
|
+
|
399
|
+
</ul>
|
400
|
+
|
401
|
+
|
402
|
+
</div><table class="source_code">
|
403
|
+
<tr>
|
404
|
+
<td>
|
405
|
+
<pre class="lines">
|
406
|
+
|
407
|
+
|
408
|
+
15
|
409
|
+
16
|
410
|
+
17
|
411
|
+
18</pre>
|
412
|
+
</td>
|
413
|
+
<td>
|
414
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 15</span>
|
415
|
+
|
416
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
417
|
+
<span class='ivar'>@head</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Node.html" title="Alimento::Node (class)">Node</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
418
|
+
<span class='ivar'>@tail</span> <span class='op'>=</span> <span class='ivar'>@head</span>
|
419
|
+
<span class='kw'>end</span></pre>
|
420
|
+
</td>
|
421
|
+
</tr>
|
422
|
+
</table>
|
423
|
+
</div>
|
424
|
+
|
425
|
+
</div>
|
426
|
+
|
427
|
+
<div id="instance_attr_details" class="attr_details">
|
428
|
+
<h2>Instance Attribute Details</h2>
|
429
|
+
|
430
|
+
|
431
|
+
<span id=""></span>
|
432
|
+
<div class="method_details first">
|
433
|
+
<h3 class="signature first" id="head-instance_method">
|
434
|
+
|
435
|
+
#<strong>head</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
</h3><div class="docstring">
|
442
|
+
<div class="discussion">
|
443
|
+
|
444
|
+
<p>Returns the value of attribute head</p>
|
445
|
+
|
446
|
+
|
447
|
+
</div>
|
448
|
+
</div>
|
449
|
+
<div class="tags">
|
450
|
+
|
451
|
+
|
452
|
+
</div><table class="source_code">
|
453
|
+
<tr>
|
454
|
+
<td>
|
455
|
+
<pre class="lines">
|
456
|
+
|
457
|
+
|
458
|
+
11
|
459
|
+
12
|
460
|
+
13</pre>
|
461
|
+
</td>
|
462
|
+
<td>
|
463
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 11</span>
|
464
|
+
|
465
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_head'>head</span>
|
466
|
+
<span class='ivar'>@head</span>
|
467
|
+
<span class='kw'>end</span></pre>
|
468
|
+
</td>
|
469
|
+
</tr>
|
470
|
+
</table>
|
471
|
+
</div>
|
472
|
+
|
473
|
+
|
474
|
+
<span id=""></span>
|
475
|
+
<div class="method_details ">
|
476
|
+
<h3 class="signature " id="tail-instance_method">
|
477
|
+
|
478
|
+
#<strong>tail</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
</h3><div class="docstring">
|
485
|
+
<div class="discussion">
|
486
|
+
|
487
|
+
<p>Returns the value of attribute tail</p>
|
488
|
+
|
489
|
+
|
490
|
+
</div>
|
491
|
+
</div>
|
492
|
+
<div class="tags">
|
493
|
+
|
494
|
+
|
495
|
+
</div><table class="source_code">
|
496
|
+
<tr>
|
497
|
+
<td>
|
498
|
+
<pre class="lines">
|
499
|
+
|
500
|
+
|
501
|
+
11
|
502
|
+
12
|
503
|
+
13</pre>
|
504
|
+
</td>
|
505
|
+
<td>
|
506
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 11</span>
|
507
|
+
|
508
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tail'>tail</span>
|
509
|
+
<span class='ivar'>@tail</span>
|
510
|
+
<span class='kw'>end</span></pre>
|
511
|
+
</td>
|
512
|
+
</tr>
|
513
|
+
</table>
|
514
|
+
</div>
|
515
|
+
|
516
|
+
</div>
|
517
|
+
|
518
|
+
|
519
|
+
<div id="instance_method_details" class="method_details_list">
|
520
|
+
<h2>Instance Method Details</h2>
|
521
|
+
|
522
|
+
|
523
|
+
<div class="method_details first">
|
524
|
+
<h3 class="signature first" id="each-instance_method">
|
525
|
+
|
526
|
+
#<strong>each</strong> ⇒ <tt>Object</tt>
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
</h3><div class="docstring">
|
533
|
+
<div class="discussion">
|
534
|
+
|
535
|
+
<div class="note notetag">
|
536
|
+
<strong>Note:</strong>
|
537
|
+
<div class='inline'>
|
538
|
+
<p>Recorrer la lista</p>
|
539
|
+
</div>
|
540
|
+
</div>
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
</div>
|
545
|
+
</div>
|
546
|
+
<div class="tags">
|
547
|
+
|
548
|
+
|
549
|
+
</div><table class="source_code">
|
550
|
+
<tr>
|
551
|
+
<td>
|
552
|
+
<pre class="lines">
|
553
|
+
|
554
|
+
|
555
|
+
22
|
556
|
+
23
|
557
|
+
24
|
558
|
+
25
|
559
|
+
26
|
560
|
+
27
|
561
|
+
28
|
562
|
+
29</pre>
|
563
|
+
</td>
|
564
|
+
<td>
|
565
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 22</span>
|
566
|
+
|
567
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span>
|
568
|
+
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
569
|
+
<span class='id identifier rubyid_actual'>actual</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_tail'>tail</span>
|
570
|
+
<span class='kw'>while</span> <span class='id identifier rubyid_actual'>actual</span>
|
571
|
+
<span class='kw'>yield</span> <span class='id identifier rubyid_actual'>actual</span>
|
572
|
+
<span class='id identifier rubyid_actual'>actual</span> <span class='op'>=</span> <span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span>
|
573
|
+
<span class='kw'>end</span>
|
574
|
+
<span class='kw'>end</span></pre>
|
575
|
+
</td>
|
576
|
+
</tr>
|
577
|
+
</table>
|
578
|
+
</div>
|
579
|
+
|
580
|
+
<div class="method_details ">
|
581
|
+
<h3 class="signature " id="extract_head-instance_method">
|
582
|
+
|
583
|
+
#<strong>extract_head</strong> ⇒ <tt><span class='object_link'><a href="Node.html" title="Alimento::Node (class)">Node</a></span></tt>
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
</h3><div class="docstring">
|
590
|
+
<div class="discussion">
|
591
|
+
|
592
|
+
<div class="note notetag">
|
593
|
+
<strong>Note:</strong>
|
594
|
+
<div class='inline'>
|
595
|
+
<p>Extraer el elemento en la cabeza de la lista</p>
|
596
|
+
</div>
|
597
|
+
</div>
|
598
|
+
|
599
|
+
|
600
|
+
<p>Returns Nodo de la lista extraido</p>
|
601
|
+
|
602
|
+
|
603
|
+
</div>
|
604
|
+
</div>
|
605
|
+
<div class="tags">
|
606
|
+
|
607
|
+
<p class="tag_title">Returns:</p>
|
608
|
+
<ul class="return">
|
609
|
+
|
610
|
+
<li>
|
611
|
+
|
612
|
+
|
613
|
+
<span class='type'>(<tt><span class='object_link'><a href="Node.html" title="Alimento::Node (class)">Node</a></span></tt>)</span>
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
—
|
618
|
+
<div class='inline'>
|
619
|
+
<p>Nodo de la lista extraido</p>
|
620
|
+
</div>
|
621
|
+
|
622
|
+
</li>
|
623
|
+
|
624
|
+
</ul>
|
625
|
+
|
626
|
+
</div><table class="source_code">
|
627
|
+
<tr>
|
628
|
+
<td>
|
629
|
+
<pre class="lines">
|
630
|
+
|
631
|
+
|
632
|
+
66
|
633
|
+
67
|
634
|
+
68
|
635
|
+
69
|
636
|
+
70
|
637
|
+
71
|
638
|
+
72</pre>
|
639
|
+
</td>
|
640
|
+
<td>
|
641
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 66</span>
|
642
|
+
|
643
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extract_head'>extract_head</span>
|
644
|
+
<span class='id identifier rubyid_actual_head'>actual_head</span> <span class='op'>=</span> <span class='ivar'>@head</span>
|
645
|
+
<span class='id identifier rubyid_new_head'>new_head</span> <span class='op'>=</span> <span class='id identifier rubyid_actual_head'>actual_head</span><span class='period'>.</span><span class='id identifier rubyid_prev'>prev</span>
|
646
|
+
<span class='id identifier rubyid_actual_head'>actual_head</span><span class='period'>.</span><span class='id identifier rubyid_prev'>prev</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
647
|
+
<span class='id identifier rubyid_new_head'>new_head</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
648
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_new_head'>new_head</span>
|
649
|
+
<span class='kw'>end</span></pre>
|
650
|
+
</td>
|
651
|
+
</tr>
|
652
|
+
</table>
|
653
|
+
</div>
|
654
|
+
|
655
|
+
<div class="method_details ">
|
656
|
+
<h3 class="signature " id="extract_tail-instance_method">
|
657
|
+
|
658
|
+
#<strong>extract_tail</strong> ⇒ <tt><span class='object_link'><a href="Node.html" title="Alimento::Node (class)">Node</a></span></tt>
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
|
664
|
+
</h3><div class="docstring">
|
665
|
+
<div class="discussion">
|
666
|
+
|
667
|
+
<div class="note notetag">
|
668
|
+
<strong>Note:</strong>
|
669
|
+
<div class='inline'>
|
670
|
+
<p>Extraer elemento en la cabeza de la lista</p>
|
671
|
+
</div>
|
672
|
+
</div>
|
673
|
+
|
674
|
+
|
675
|
+
<p>Returns Nodo de la lista extraido</p>
|
676
|
+
|
677
|
+
|
678
|
+
</div>
|
679
|
+
</div>
|
680
|
+
<div class="tags">
|
681
|
+
|
682
|
+
<p class="tag_title">Returns:</p>
|
683
|
+
<ul class="return">
|
684
|
+
|
685
|
+
<li>
|
686
|
+
|
687
|
+
|
688
|
+
<span class='type'>(<tt><span class='object_link'><a href="Node.html" title="Alimento::Node (class)">Node</a></span></tt>)</span>
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
—
|
693
|
+
<div class='inline'>
|
694
|
+
<p>Nodo de la lista extraido</p>
|
695
|
+
</div>
|
696
|
+
|
697
|
+
</li>
|
698
|
+
|
699
|
+
</ul>
|
700
|
+
|
701
|
+
</div><table class="source_code">
|
702
|
+
<tr>
|
703
|
+
<td>
|
704
|
+
<pre class="lines">
|
705
|
+
|
706
|
+
|
707
|
+
77
|
708
|
+
78
|
709
|
+
79
|
710
|
+
80
|
711
|
+
81
|
712
|
+
82
|
713
|
+
83</pre>
|
714
|
+
</td>
|
715
|
+
<td>
|
716
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 77</span>
|
717
|
+
|
718
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extract_tail'>extract_tail</span>
|
719
|
+
<span class='id identifier rubyid_actual_tail'>actual_tail</span> <span class='op'>=</span> <span class='ivar'>@tail</span>
|
720
|
+
<span class='id identifier rubyid_new_tail'>new_tail</span> <span class='op'>=</span> <span class='id identifier rubyid_actual_tail'>actual_tail</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span>
|
721
|
+
<span class='id identifier rubyid_actual_tail'>actual_tail</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
722
|
+
<span class='id identifier rubyid_new_tail'>new_tail</span><span class='period'>.</span><span class='id identifier rubyid_prev'>prev</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
723
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_new_tail'>new_tail</span>
|
724
|
+
<span class='kw'>end</span></pre>
|
725
|
+
</td>
|
726
|
+
</tr>
|
727
|
+
</table>
|
728
|
+
</div>
|
729
|
+
|
730
|
+
<div class="method_details ">
|
731
|
+
<h3 class="signature " id="insert_head-instance_method">
|
732
|
+
|
733
|
+
#<strong>insert_head</strong>(value) ⇒ <tt>Object</tt>
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
</h3><div class="docstring">
|
740
|
+
<div class="discussion">
|
741
|
+
|
742
|
+
<div class="note notetag">
|
743
|
+
<strong>Note:</strong>
|
744
|
+
<div class='inline'>
|
745
|
+
<p>Insertar elemento en la cabeza de la lista</p>
|
746
|
+
</div>
|
747
|
+
</div>
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
</div>
|
752
|
+
</div>
|
753
|
+
<div class="tags">
|
754
|
+
<p class="tag_title">Parameters:</p>
|
755
|
+
<ul class="param">
|
756
|
+
|
757
|
+
<li>
|
758
|
+
|
759
|
+
<span class='name'>value</span>
|
760
|
+
|
761
|
+
|
762
|
+
<span class='type'></span>
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
—
|
767
|
+
<div class='inline'>
|
768
|
+
<p>Contenido del nodo a insertar</p>
|
769
|
+
</div>
|
770
|
+
|
771
|
+
</li>
|
772
|
+
|
773
|
+
</ul>
|
774
|
+
|
775
|
+
|
776
|
+
</div><table class="source_code">
|
777
|
+
<tr>
|
778
|
+
<td>
|
779
|
+
<pre class="lines">
|
780
|
+
|
781
|
+
|
782
|
+
34
|
783
|
+
35
|
784
|
+
36
|
785
|
+
37
|
786
|
+
38
|
787
|
+
39</pre>
|
788
|
+
</td>
|
789
|
+
<td>
|
790
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 34</span>
|
791
|
+
|
792
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_insert_head'>insert_head</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
793
|
+
<span class='id identifier rubyid_actual_head'>actual_head</span> <span class='op'>=</span> <span class='ivar'>@head</span>
|
794
|
+
<span class='id identifier rubyid_new_head'>new_head</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Node.html" title="Alimento::Node (class)">Node</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span><span class='id identifier rubyid_actual_head'>actual_head</span><span class='rparen'>)</span>
|
795
|
+
<span class='id identifier rubyid_actual_head'>actual_head</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span> <span class='op'>=</span> <span class='id identifier rubyid_new_head'>new_head</span>
|
796
|
+
<span class='ivar'>@head</span> <span class='op'>=</span> <span class='id identifier rubyid_new_head'>new_head</span>
|
797
|
+
<span class='kw'>end</span></pre>
|
798
|
+
</td>
|
799
|
+
</tr>
|
800
|
+
</table>
|
801
|
+
</div>
|
802
|
+
|
803
|
+
<div class="method_details ">
|
804
|
+
<h3 class="signature " id="insert_sundry-instance_method">
|
805
|
+
|
806
|
+
#<strong>insert_sundry</strong>(value_array) ⇒ <tt>Object</tt>
|
807
|
+
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
</h3><div class="docstring">
|
813
|
+
<div class="discussion">
|
814
|
+
|
815
|
+
<div class="note notetag">
|
816
|
+
<strong>Note:</strong>
|
817
|
+
<div class='inline'>
|
818
|
+
<p>Insertar varios elementos en la lista</p>
|
819
|
+
</div>
|
820
|
+
</div>
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
</div>
|
825
|
+
</div>
|
826
|
+
<div class="tags">
|
827
|
+
<p class="tag_title">Parameters:</p>
|
828
|
+
<ul class="param">
|
829
|
+
|
830
|
+
<li>
|
831
|
+
|
832
|
+
<span class='name'>value_array</span>
|
833
|
+
|
834
|
+
|
835
|
+
<span class='type'></span>
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
—
|
840
|
+
<div class='inline'>
|
841
|
+
<p>Vector de elementos a insertar en la lista</p>
|
842
|
+
</div>
|
843
|
+
|
844
|
+
</li>
|
845
|
+
|
846
|
+
</ul>
|
847
|
+
|
848
|
+
|
849
|
+
</div><table class="source_code">
|
850
|
+
<tr>
|
851
|
+
<td>
|
852
|
+
<pre class="lines">
|
853
|
+
|
854
|
+
|
855
|
+
54
|
856
|
+
55
|
857
|
+
56
|
858
|
+
57
|
859
|
+
58
|
860
|
+
59
|
861
|
+
60</pre>
|
862
|
+
</td>
|
863
|
+
<td>
|
864
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 54</span>
|
865
|
+
|
866
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_insert_sundry'>insert_sundry</span><span class='lparen'>(</span><span class='id identifier rubyid_value_array'>value_array</span><span class='rparen'>)</span>
|
867
|
+
<span class='id identifier rubyid_i'>i</span> <span class='op'>=</span> <span class='int'>0</span>
|
868
|
+
<span class='kw'>while</span> <span class='id identifier rubyid_i'>i</span> <span class='op'><</span> <span class='id identifier rubyid_value_array'>value_array</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='kw'>do</span>
|
869
|
+
<span class='id identifier rubyid_insert_head'>insert_head</span><span class='lparen'>(</span><span class='id identifier rubyid_value_array'>value_array</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
870
|
+
<span class='id identifier rubyid_i'>i</span> <span class='op'>+=</span> <span class='int'>1</span>
|
871
|
+
<span class='kw'>end</span>
|
872
|
+
<span class='kw'>end</span></pre>
|
873
|
+
</td>
|
874
|
+
</tr>
|
875
|
+
</table>
|
876
|
+
</div>
|
877
|
+
|
878
|
+
<div class="method_details ">
|
879
|
+
<h3 class="signature " id="insert_tail-instance_method">
|
880
|
+
|
881
|
+
#<strong>insert_tail</strong>(value) ⇒ <tt>Object</tt>
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
|
886
|
+
|
887
|
+
</h3><div class="docstring">
|
888
|
+
<div class="discussion">
|
889
|
+
|
890
|
+
<div class="note notetag">
|
891
|
+
<strong>Note:</strong>
|
892
|
+
<div class='inline'>
|
893
|
+
<p>Insertar elemento por la cola de la lista</p>
|
894
|
+
</div>
|
895
|
+
</div>
|
896
|
+
|
897
|
+
|
898
|
+
|
899
|
+
</div>
|
900
|
+
</div>
|
901
|
+
<div class="tags">
|
902
|
+
<p class="tag_title">Parameters:</p>
|
903
|
+
<ul class="param">
|
904
|
+
|
905
|
+
<li>
|
906
|
+
|
907
|
+
<span class='name'>value</span>
|
908
|
+
|
909
|
+
|
910
|
+
<span class='type'></span>
|
911
|
+
|
912
|
+
|
913
|
+
|
914
|
+
—
|
915
|
+
<div class='inline'>
|
916
|
+
<p>Contenido del nodo a insertar</p>
|
917
|
+
</div>
|
918
|
+
|
919
|
+
</li>
|
920
|
+
|
921
|
+
</ul>
|
922
|
+
|
923
|
+
|
924
|
+
</div><table class="source_code">
|
925
|
+
<tr>
|
926
|
+
<td>
|
927
|
+
<pre class="lines">
|
928
|
+
|
929
|
+
|
930
|
+
44
|
931
|
+
45
|
932
|
+
46
|
933
|
+
47
|
934
|
+
48
|
935
|
+
49</pre>
|
936
|
+
</td>
|
937
|
+
<td>
|
938
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/list.rb', line 44</span>
|
939
|
+
|
940
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_insert_tail'>insert_tail</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
941
|
+
<span class='id identifier rubyid_actual_tail'>actual_tail</span> <span class='op'>=</span> <span class='ivar'>@tail</span>
|
942
|
+
<span class='id identifier rubyid_new_tail'>new_tail</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Node.html" title="Alimento::Node (class)">Node</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_actual_tail'>actual_tail</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
943
|
+
<span class='id identifier rubyid_actual_tail'>actual_tail</span><span class='period'>.</span><span class='id identifier rubyid_prev'>prev</span> <span class='op'>=</span> <span class='id identifier rubyid_new_tail'>new_tail</span>
|
944
|
+
<span class='ivar'>@tail</span> <span class='op'>=</span> <span class='id identifier rubyid_new_tail'>new_tail</span>
|
945
|
+
<span class='kw'>end</span></pre>
|
946
|
+
</td>
|
947
|
+
</tr>
|
948
|
+
</table>
|
949
|
+
</div>
|
950
|
+
|
951
|
+
</div>
|
952
|
+
|
953
|
+
</div>
|
954
|
+
|
955
|
+
<div id="footer">
|
956
|
+
Generated on Tue Dec 17 22:28:20 2019 by
|
957
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
958
|
+
0.9.20 (ruby-2.5.1).
|
959
|
+
</div>
|
960
|
+
|
961
|
+
</div>
|
962
|
+
</body>
|
963
|
+
</html>
|