practica6germanAT 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/.coveralls.yml +2 -0
- data/.gitignore +10 -0
- data/.rspec +3 -0
- data/.travis.yml +9 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +95 -0
- data/Guardfile +85 -0
- data/README.md +19 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/Comida.html +1030 -0
- data/doc/List.html +1346 -0
- data/doc/List/Node.html +409 -0
- data/doc/MejorPlato.html +1007 -0
- data/doc/Menu.html +400 -0
- data/doc/Plato.html +1125 -0
- data/doc/Practica6.html +144 -0
- data/doc/Practica6/Error.html +124 -0
- data/doc/_index.html +186 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +97 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +97 -0
- data/doc/js/app.js +303 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +443 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/practica6.rb +14 -0
- data/lib/practica6/comida.rb +59 -0
- data/lib/practica6/lista.rb +173 -0
- data/lib/practica6/mejorplatos.rb +122 -0
- data/lib/practica6/menu.rb +48 -0
- data/lib/practica6/platos.rb +136 -0
- data/lib/practica6/version.rb +7 -0
- data/practica6.gemspec +36 -0
- metadata +167 -0
data/doc/Menu.html
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
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: Menu
|
|
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 = "Menu";
|
|
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 (M)</a> »
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<span class="title">Menu</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: Menu
|
|
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">Menu</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/practica6/menu.rb</dd>
|
|
98
|
+
</dl>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
107
|
+
<ul class="summary">
|
|
108
|
+
|
|
109
|
+
<li class="public ">
|
|
110
|
+
<span class="summary_signature">
|
|
111
|
+
|
|
112
|
+
<a href="#platosmenu-instance_method" title="#platosmenu (instance method)">#<strong>platosmenu</strong> ⇒ Object </a>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</span>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<span class="summary_desc"><div class='inline'>
|
|
130
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
131
|
+
</div></span>
|
|
132
|
+
|
|
133
|
+
</li>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</ul>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
<h2>
|
|
143
|
+
Instance Method Summary
|
|
144
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
145
|
+
</h2>
|
|
146
|
+
|
|
147
|
+
<ul class="summary">
|
|
148
|
+
|
|
149
|
+
<li class="public ">
|
|
150
|
+
<span class="summary_signature">
|
|
151
|
+
|
|
152
|
+
<a href="#impacto-instance_method" title="#impacto (instance method)">#<strong>impacto</strong> ⇒ Double </a>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
</span>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
<span class="summary_desc"><div class='inline'>
|
|
167
|
+
<p>Impacto ambiental del menú.</p>
|
|
168
|
+
</div></span>
|
|
169
|
+
|
|
170
|
+
</li>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<li class="public ">
|
|
174
|
+
<span class="summary_signature">
|
|
175
|
+
|
|
176
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(platosmenu) ⇒ Menu </a>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
</span>
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
<span class="note title constructor">constructor</span>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
<span class="summary_desc"><div class='inline'>
|
|
193
|
+
<p>Constructor.</p>
|
|
194
|
+
</div></span>
|
|
195
|
+
|
|
196
|
+
</li>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
</ul>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
<div id="constructor_details" class="method_details_list">
|
|
203
|
+
<h2>Constructor Details</h2>
|
|
204
|
+
|
|
205
|
+
<div class="method_details first">
|
|
206
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
207
|
+
|
|
208
|
+
#<strong>initialize</strong>(platosmenu) ⇒ <tt><span class='object_link'><a href="" title="Menu (class)">Menu</a></span></tt>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
</h3><div class="docstring">
|
|
215
|
+
<div class="discussion">
|
|
216
|
+
|
|
217
|
+
<p>Constructor.</p>
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="tags">
|
|
223
|
+
<p class="tag_title">Parameters:</p>
|
|
224
|
+
<ul class="param">
|
|
225
|
+
|
|
226
|
+
<li>
|
|
227
|
+
|
|
228
|
+
<span class='name'>platosmenu</span>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<span class='type'>(<tt><span class='object_link'><a href="List.html" title="List (class)">List</a></span></tt>)</span>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
—
|
|
236
|
+
<div class='inline'>
|
|
237
|
+
<p>Lista de platos del menú.</p>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
</li>
|
|
241
|
+
|
|
242
|
+
</ul>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
</div><table class="source_code">
|
|
246
|
+
<tr>
|
|
247
|
+
<td>
|
|
248
|
+
<pre class="lines">
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
11
|
|
252
|
+
12
|
|
253
|
+
13</pre>
|
|
254
|
+
</td>
|
|
255
|
+
<td>
|
|
256
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/menu.rb', line 11</span>
|
|
257
|
+
|
|
258
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_platosmenu'>platosmenu</span><span class='rparen'>)</span>
|
|
259
|
+
<span class='ivar'>@platosmenu</span><span class='op'>=</span> <span class='id identifier rubyid_platosmenu'>platosmenu</span>
|
|
260
|
+
<span class='kw'>end</span></pre>
|
|
261
|
+
</td>
|
|
262
|
+
</tr>
|
|
263
|
+
</table>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
<div id="instance_attr_details" class="attr_details">
|
|
269
|
+
<h2>Instance Attribute Details</h2>
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
<span id="platosmenu=-instance_method"></span>
|
|
273
|
+
<div class="method_details first">
|
|
274
|
+
<h3 class="signature first" id="platosmenu-instance_method">
|
|
275
|
+
|
|
276
|
+
#<strong>platosmenu</strong> ⇒ <tt>Object</tt>
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
</h3><div class="docstring">
|
|
283
|
+
<div class="discussion">
|
|
284
|
+
|
|
285
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
<div class="tags">
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
</div><table class="source_code">
|
|
294
|
+
<tr>
|
|
295
|
+
<td>
|
|
296
|
+
<pre class="lines">
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
4
|
|
300
|
+
5
|
|
301
|
+
6</pre>
|
|
302
|
+
</td>
|
|
303
|
+
<td>
|
|
304
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/menu.rb', line 4</span>
|
|
305
|
+
|
|
306
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_platosmenu'>platosmenu</span>
|
|
307
|
+
<span class='ivar'>@platosmenu</span>
|
|
308
|
+
<span class='kw'>end</span></pre>
|
|
309
|
+
</td>
|
|
310
|
+
</tr>
|
|
311
|
+
</table>
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
<div id="instance_method_details" class="method_details_list">
|
|
318
|
+
<h2>Instance Method Details</h2>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
<div class="method_details first">
|
|
322
|
+
<h3 class="signature first" id="impacto-instance_method">
|
|
323
|
+
|
|
324
|
+
#<strong>impacto</strong> ⇒ <tt>Double</tt>
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
</h3><div class="docstring">
|
|
331
|
+
<div class="discussion">
|
|
332
|
+
|
|
333
|
+
<p>Impacto ambiental del menú.</p>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
<div class="tags">
|
|
339
|
+
|
|
340
|
+
<p class="tag_title">Returns:</p>
|
|
341
|
+
<ul class="return">
|
|
342
|
+
|
|
343
|
+
<li>
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
<span class='type'>(<tt>Double</tt>)</span>
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
—
|
|
351
|
+
<div class='inline'>
|
|
352
|
+
<p>Impacto ambiental del menú.</p>
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
</li>
|
|
356
|
+
|
|
357
|
+
</ul>
|
|
358
|
+
|
|
359
|
+
</div><table class="source_code">
|
|
360
|
+
<tr>
|
|
361
|
+
<td>
|
|
362
|
+
<pre class="lines">
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
19
|
|
366
|
+
20
|
|
367
|
+
21
|
|
368
|
+
22
|
|
369
|
+
23
|
|
370
|
+
24
|
|
371
|
+
25</pre>
|
|
372
|
+
</td>
|
|
373
|
+
<td>
|
|
374
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/menu.rb', line 19</span>
|
|
375
|
+
|
|
376
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_impacto'>impacto</span>
|
|
377
|
+
<span class='id identifier rubyid_aux'>aux</span><span class='op'>=</span> <span class='float'>0.0</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span>
|
|
378
|
+
<span class='ivar'>@platosmenu</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_plato'>plato</span><span class='op'>|</span>
|
|
379
|
+
<span class='id identifier rubyid_aux'>aux</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_plato'>plato</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='const'>GEI</span><span class='op'>*</span> <span class='id identifier rubyid_plato'>plato</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
380
|
+
<span class='kw'>end</span>
|
|
381
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_aux'>aux</span>
|
|
382
|
+
<span class='kw'>end</span></pre>
|
|
383
|
+
</td>
|
|
384
|
+
</tr>
|
|
385
|
+
</table>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<div id="footer">
|
|
393
|
+
Generated on Tue Dec 17 19:32:04 2019 by
|
|
394
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
395
|
+
0.9.20 (ruby-2.5.1).
|
|
396
|
+
</div>
|
|
397
|
+
|
|
398
|
+
</div>
|
|
399
|
+
</body>
|
|
400
|
+
</html>
|
data/doc/Plato.html
ADDED
|
@@ -0,0 +1,1125 @@
|
|
|
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: Plato
|
|
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 = "Plato";
|
|
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 (P)</a> »
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<span class="title">Plato</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: Plato
|
|
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">Plato</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>Comparable</dd>
|
|
93
|
+
</dl>
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<dl>
|
|
101
|
+
<dt>Defined in:</dt>
|
|
102
|
+
<dd>lib/practica6/platos.rb</dd>
|
|
103
|
+
</dl>
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div id="subclasses">
|
|
108
|
+
<h2>Direct Known Subclasses</h2>
|
|
109
|
+
<p class="children"><span class='object_link'><a href="MejorPlato.html" title="MejorPlato (class)">MejorPlato</a></span></p>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
116
|
+
<ul class="summary">
|
|
117
|
+
|
|
118
|
+
<li class="public ">
|
|
119
|
+
<span class="summary_signature">
|
|
120
|
+
|
|
121
|
+
<a href="#conjuntoAlimentos-instance_method" title="#conjuntoAlimentos (instance method)">#<strong>conjuntoAlimentos</strong> ⇒ Object </a>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
</span>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<span class="summary_desc"><div class='inline'>
|
|
139
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
140
|
+
</div></span>
|
|
141
|
+
|
|
142
|
+
</li>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<li class="public ">
|
|
146
|
+
<span class="summary_signature">
|
|
147
|
+
|
|
148
|
+
<a href="#conjuntoCantidades-instance_method" title="#conjuntoCantidades (instance method)">#<strong>conjuntoCantidades</strong> ⇒ Object </a>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
</span>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<span class="summary_desc"><div class='inline'>
|
|
166
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
167
|
+
</div></span>
|
|
168
|
+
|
|
169
|
+
</li>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
<li class="public ">
|
|
173
|
+
<span class="summary_signature">
|
|
174
|
+
|
|
175
|
+
<a href="#nombrePlato-instance_method" title="#nombrePlato (instance method)">#<strong>nombrePlato</strong> ⇒ Object </a>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
</span>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
<span class="summary_desc"><div class='inline'>
|
|
193
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
194
|
+
</div></span>
|
|
195
|
+
|
|
196
|
+
</li>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
</ul>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
<h2>
|
|
206
|
+
Instance Method Summary
|
|
207
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
208
|
+
</h2>
|
|
209
|
+
|
|
210
|
+
<ul class="summary">
|
|
211
|
+
|
|
212
|
+
<li class="public ">
|
|
213
|
+
<span class="summary_signature">
|
|
214
|
+
|
|
215
|
+
<a href="#<=>-instance_method" title="#<=> (instance method)">#<strong><=></strong>(another) ⇒ Object </a>
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
</span>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
<span class="summary_desc"><div class='inline'>
|
|
230
|
+
<p>Sobreescritura de la funcion <=> de la clase Comparable para comparar
|
|
231
|
+
dos elementos.</p>
|
|
232
|
+
</div></span>
|
|
233
|
+
|
|
234
|
+
</li>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
<li class="public ">
|
|
238
|
+
<span class="summary_signature">
|
|
239
|
+
|
|
240
|
+
<a href="#conjuntoPorcentaje-instance_method" title="#conjuntoPorcentaje (instance method)">#<strong>conjuntoPorcentaje</strong> ⇒ Double </a>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
</span>
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
<span class="summary_desc"><div class='inline'>
|
|
255
|
+
<p>Funcion auxiliar de #porProteinas, #porLipidos y #porCarbohidratos.</p>
|
|
256
|
+
</div></span>
|
|
257
|
+
|
|
258
|
+
</li>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<li class="public ">
|
|
262
|
+
<span class="summary_signature">
|
|
263
|
+
|
|
264
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(nombrePlato, conjuntoAlimentos, conjuntoCantidades) ⇒ Plato </a>
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
</span>
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
<span class="note title constructor">constructor</span>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
<span class="summary_desc"><div class='inline'>
|
|
281
|
+
<p>A new instance of Plato.</p>
|
|
282
|
+
</div></span>
|
|
283
|
+
|
|
284
|
+
</li>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
<li class="public ">
|
|
288
|
+
<span class="summary_signature">
|
|
289
|
+
|
|
290
|
+
<a href="#porCarbohidratos-instance_method" title="#porCarbohidratos (instance method)">#<strong>porCarbohidratos</strong> ⇒ Double </a>
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
</span>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
<span class="summary_desc"><div class='inline'>
|
|
305
|
+
<p>% de carbohidratos del plato respecto a otros componentes.</p>
|
|
306
|
+
</div></span>
|
|
307
|
+
|
|
308
|
+
</li>
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
<li class="public ">
|
|
312
|
+
<span class="summary_signature">
|
|
313
|
+
|
|
314
|
+
<a href="#porLipidos-instance_method" title="#porLipidos (instance method)">#<strong>porLipidos</strong> ⇒ Double </a>
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
</span>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
<span class="summary_desc"><div class='inline'>
|
|
329
|
+
<p>% de lipidos del plato respecto a otros componentes.</p>
|
|
330
|
+
</div></span>
|
|
331
|
+
|
|
332
|
+
</li>
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
<li class="public ">
|
|
336
|
+
<span class="summary_signature">
|
|
337
|
+
|
|
338
|
+
<a href="#porProteinas-instance_method" title="#porProteinas (instance method)">#<strong>porProteinas</strong> ⇒ Double </a>
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
</span>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
<span class="summary_desc"><div class='inline'>
|
|
353
|
+
<p>% de proteinas del plato respecto a otros componentes.</p>
|
|
354
|
+
</div></span>
|
|
355
|
+
|
|
356
|
+
</li>
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
<li class="public ">
|
|
360
|
+
<span class="summary_signature">
|
|
361
|
+
|
|
362
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a>
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
</span>
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
<span class="summary_desc"><div class='inline'>
|
|
377
|
+
<p>Foramte el plato a una cadena de texto legible.</p>
|
|
378
|
+
</div></span>
|
|
379
|
+
|
|
380
|
+
</li>
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
<li class="public ">
|
|
384
|
+
<span class="summary_signature">
|
|
385
|
+
|
|
386
|
+
<a href="#valorCaloricoTotal-instance_method" title="#valorCaloricoTotal (instance method)">#<strong>valorCaloricoTotal</strong> ⇒ Double </a>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
</span>
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
<span class="summary_desc"><div class='inline'>
|
|
401
|
+
<p>Calor calórico del plato.</p>
|
|
402
|
+
</div></span>
|
|
403
|
+
|
|
404
|
+
</li>
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
</ul>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
<div id="constructor_details" class="method_details_list">
|
|
412
|
+
<h2>Constructor Details</h2>
|
|
413
|
+
|
|
414
|
+
<div class="method_details first">
|
|
415
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
416
|
+
|
|
417
|
+
#<strong>initialize</strong>(nombrePlato, conjuntoAlimentos, conjuntoCantidades) ⇒ <tt><span class='object_link'><a href="" title="Plato (class)">Plato</a></span></tt>
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
</h3><div class="docstring">
|
|
424
|
+
<div class="discussion">
|
|
425
|
+
|
|
426
|
+
<p>Returns a new instance of Plato</p>
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
</div>
|
|
430
|
+
</div>
|
|
431
|
+
<div class="tags">
|
|
432
|
+
<p class="tag_title">Parameters:</p>
|
|
433
|
+
<ul class="param">
|
|
434
|
+
|
|
435
|
+
<li>
|
|
436
|
+
|
|
437
|
+
<span class='name'>conjuntoAlimentos</span>
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
<span class='type'>(<tt><span class='object_link'><a href="List.html" title="List (class)">List</a></span></tt>)</span>
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
—
|
|
445
|
+
<div class='inline'>
|
|
446
|
+
<p>Lista de alimentos que forman el plato.</p>
|
|
447
|
+
</div>
|
|
448
|
+
|
|
449
|
+
</li>
|
|
450
|
+
|
|
451
|
+
<li>
|
|
452
|
+
|
|
453
|
+
<span class='name'>conjuntoCantidades</span>
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
<span class='type'>(<tt><span class='object_link'><a href="List.html" title="List (class)">List</a></span></tt>)</span>
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
—
|
|
461
|
+
<div class='inline'>
|
|
462
|
+
<p>Lista de cantidades de cada alimento que forma el plato.</p>
|
|
463
|
+
</div>
|
|
464
|
+
|
|
465
|
+
</li>
|
|
466
|
+
|
|
467
|
+
</ul>
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
</div><table class="source_code">
|
|
471
|
+
<tr>
|
|
472
|
+
<td>
|
|
473
|
+
<pre class="lines">
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
17
|
|
477
|
+
18
|
|
478
|
+
19
|
|
479
|
+
20
|
|
480
|
+
21</pre>
|
|
481
|
+
</td>
|
|
482
|
+
<td>
|
|
483
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 17</span>
|
|
484
|
+
|
|
485
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_nombrePlato'>nombrePlato</span><span class='comma'>,</span> <span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='comma'>,</span> <span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='rparen'>)</span>
|
|
486
|
+
<span class='ivar'>@nombrePlato</span><span class='op'>=</span> <span class='id identifier rubyid_nombrePlato'>nombrePlato</span>
|
|
487
|
+
<span class='ivar'>@conjuntoAlimentos</span><span class='op'>=</span> <span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span>
|
|
488
|
+
<span class='ivar'>@conjuntoCantidades</span><span class='op'>=</span> <span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span>
|
|
489
|
+
<span class='kw'>end</span></pre>
|
|
490
|
+
</td>
|
|
491
|
+
</tr>
|
|
492
|
+
</table>
|
|
493
|
+
</div>
|
|
494
|
+
|
|
495
|
+
</div>
|
|
496
|
+
|
|
497
|
+
<div id="instance_attr_details" class="attr_details">
|
|
498
|
+
<h2>Instance Attribute Details</h2>
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
<span id="conjuntoAlimentos=-instance_method"></span>
|
|
502
|
+
<div class="method_details first">
|
|
503
|
+
<h3 class="signature first" id="conjuntoAlimentos-instance_method">
|
|
504
|
+
|
|
505
|
+
#<strong>conjuntoAlimentos</strong> ⇒ <tt>Object</tt>
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
</h3><div class="docstring">
|
|
512
|
+
<div class="discussion">
|
|
513
|
+
|
|
514
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
<div class="tags">
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
</div><table class="source_code">
|
|
523
|
+
<tr>
|
|
524
|
+
<td>
|
|
525
|
+
<pre class="lines">
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
8
|
|
529
|
+
9
|
|
530
|
+
10</pre>
|
|
531
|
+
</td>
|
|
532
|
+
<td>
|
|
533
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 8</span>
|
|
534
|
+
|
|
535
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span>
|
|
536
|
+
<span class='ivar'>@conjuntoAlimentos</span>
|
|
537
|
+
<span class='kw'>end</span></pre>
|
|
538
|
+
</td>
|
|
539
|
+
</tr>
|
|
540
|
+
</table>
|
|
541
|
+
</div>
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
<span id="conjuntoCantidades=-instance_method"></span>
|
|
545
|
+
<div class="method_details ">
|
|
546
|
+
<h3 class="signature " id="conjuntoCantidades-instance_method">
|
|
547
|
+
|
|
548
|
+
#<strong>conjuntoCantidades</strong> ⇒ <tt>Object</tt>
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
</h3><div class="docstring">
|
|
555
|
+
<div class="discussion">
|
|
556
|
+
|
|
557
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
<div class="tags">
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
</div><table class="source_code">
|
|
566
|
+
<tr>
|
|
567
|
+
<td>
|
|
568
|
+
<pre class="lines">
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
8
|
|
572
|
+
9
|
|
573
|
+
10</pre>
|
|
574
|
+
</td>
|
|
575
|
+
<td>
|
|
576
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 8</span>
|
|
577
|
+
|
|
578
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span>
|
|
579
|
+
<span class='ivar'>@conjuntoCantidades</span>
|
|
580
|
+
<span class='kw'>end</span></pre>
|
|
581
|
+
</td>
|
|
582
|
+
</tr>
|
|
583
|
+
</table>
|
|
584
|
+
</div>
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
<span id="nombrePlato=-instance_method"></span>
|
|
588
|
+
<div class="method_details ">
|
|
589
|
+
<h3 class="signature " id="nombrePlato-instance_method">
|
|
590
|
+
|
|
591
|
+
#<strong>nombrePlato</strong> ⇒ <tt>Object</tt>
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
</h3><div class="docstring">
|
|
598
|
+
<div class="discussion">
|
|
599
|
+
|
|
600
|
+
<p>Los atributos son de lectura y escritura.</p>
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
</div>
|
|
604
|
+
</div>
|
|
605
|
+
<div class="tags">
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
</div><table class="source_code">
|
|
609
|
+
<tr>
|
|
610
|
+
<td>
|
|
611
|
+
<pre class="lines">
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
8
|
|
615
|
+
9
|
|
616
|
+
10</pre>
|
|
617
|
+
</td>
|
|
618
|
+
<td>
|
|
619
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 8</span>
|
|
620
|
+
|
|
621
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_nombrePlato'>nombrePlato</span>
|
|
622
|
+
<span class='ivar'>@nombrePlato</span>
|
|
623
|
+
<span class='kw'>end</span></pre>
|
|
624
|
+
</td>
|
|
625
|
+
</tr>
|
|
626
|
+
</table>
|
|
627
|
+
</div>
|
|
628
|
+
|
|
629
|
+
</div>
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
<div id="instance_method_details" class="method_details_list">
|
|
633
|
+
<h2>Instance Method Details</h2>
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
<div class="method_details first">
|
|
637
|
+
<h3 class="signature first" id="<=>-instance_method">
|
|
638
|
+
|
|
639
|
+
#<strong><=></strong>(another) ⇒ <tt>Object</tt>
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
</h3><div class="docstring">
|
|
646
|
+
<div class="discussion">
|
|
647
|
+
|
|
648
|
+
<p>Sobreescritura de la funcion <=> de la clase Comparable para comparar
|
|
649
|
+
dos elementos</p>
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
<div class="tags">
|
|
655
|
+
<p class="tag_title">Parameters:</p>
|
|
656
|
+
<ul class="param">
|
|
657
|
+
|
|
658
|
+
<li>
|
|
659
|
+
|
|
660
|
+
<span class='name'>another</span>
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
<span class='type'>(<tt><span class='object_link'><a href="Comida.html" title="Comida (class)">Comida</a></span></tt>)</span>
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
—
|
|
668
|
+
<div class='inline'>
|
|
669
|
+
<p>Plato con el que se pretende comparar este Plato (el plato con mayor
|
|
670
|
+
#porProteinas será mayor).</p>
|
|
671
|
+
</div>
|
|
672
|
+
|
|
673
|
+
</li>
|
|
674
|
+
|
|
675
|
+
</ul>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
</div><table class="source_code">
|
|
679
|
+
<tr>
|
|
680
|
+
<td>
|
|
681
|
+
<pre class="lines">
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
108
|
|
685
|
+
109
|
|
686
|
+
110
|
|
687
|
+
111
|
|
688
|
+
112
|
|
689
|
+
113
|
|
690
|
+
114</pre>
|
|
691
|
+
</td>
|
|
692
|
+
<td>
|
|
693
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 108</span>
|
|
694
|
+
|
|
695
|
+
<span class='kw'>def</span> <span class='op'><=></span><span class='lparen'>(</span><span class='id identifier rubyid_another'>another</span><span class='rparen'>)</span>
|
|
696
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_another'>another</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_ancestors'>ancestors</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='const'>Plato</span>
|
|
697
|
+
<span class='id identifier rubyid_aux1'>aux1</span><span class='op'>=</span> <span class='id identifier rubyid_porProteinas'>porProteinas</span>
|
|
698
|
+
<span class='id identifier rubyid_aux2'>aux2</span><span class='op'>=</span> <span class='id identifier rubyid_another'>another</span><span class='period'>.</span><span class='id identifier rubyid_porProteinas'>porProteinas</span>
|
|
699
|
+
<span class='id identifier rubyid_aux1'>aux1</span> <span class='op'><=></span> <span class='id identifier rubyid_aux2'>aux2</span>
|
|
700
|
+
<span class='kw'>end</span>
|
|
701
|
+
<span class='kw'>end</span></pre>
|
|
702
|
+
</td>
|
|
703
|
+
</tr>
|
|
704
|
+
</table>
|
|
705
|
+
</div>
|
|
706
|
+
|
|
707
|
+
<div class="method_details ">
|
|
708
|
+
<h3 class="signature " id="conjuntoPorcentaje-instance_method">
|
|
709
|
+
|
|
710
|
+
#<strong>conjuntoPorcentaje</strong> ⇒ <tt>Double</tt>
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
</h3><div class="docstring">
|
|
717
|
+
<div class="discussion">
|
|
718
|
+
|
|
719
|
+
<p>Funcion auxiliar de #porProteinas, #porLipidos y #porCarbohidratos.</p>
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
</div>
|
|
723
|
+
</div>
|
|
724
|
+
<div class="tags">
|
|
725
|
+
|
|
726
|
+
<p class="tag_title">Returns:</p>
|
|
727
|
+
<ul class="return">
|
|
728
|
+
|
|
729
|
+
<li>
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
<span class='type'>(<tt>Double</tt>)</span>
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
—
|
|
737
|
+
<div class='inline'>
|
|
738
|
+
<p>Sumatorio de glucidos, lipidos y Proteinas.</p>
|
|
739
|
+
</div>
|
|
740
|
+
|
|
741
|
+
</li>
|
|
742
|
+
|
|
743
|
+
</ul>
|
|
744
|
+
|
|
745
|
+
</div><table class="source_code">
|
|
746
|
+
<tr>
|
|
747
|
+
<td>
|
|
748
|
+
<pre class="lines">
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
28
|
|
752
|
+
29
|
|
753
|
+
30
|
|
754
|
+
31
|
|
755
|
+
32
|
|
756
|
+
33
|
|
757
|
+
34
|
|
758
|
+
35
|
|
759
|
+
36</pre>
|
|
760
|
+
</td>
|
|
761
|
+
<td>
|
|
762
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 28</span>
|
|
763
|
+
|
|
764
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_conjuntoPorcentaje'>conjuntoPorcentaje</span>
|
|
765
|
+
<span class='id identifier rubyid_aux'>aux</span><span class='op'>=</span> <span class='float'>0.0</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span>
|
|
766
|
+
<span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
767
|
+
<span class='id identifier rubyid_aux'>aux</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_proteinas'>proteinas</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='rparen'>)</span><span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='op'>/</span><span class='float'>1000.0</span><span class='rparen'>)</span>
|
|
768
|
+
<span class='id identifier rubyid_aux'>aux</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_carbohidratos'>carbohidratos</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='rparen'>)</span><span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='op'>/</span><span class='float'>1000.0</span><span class='rparen'>)</span>
|
|
769
|
+
<span class='id identifier rubyid_aux'>aux</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_lipidos'>lipidos</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='rparen'>)</span><span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='op'>/</span><span class='float'>1000.0</span><span class='rparen'>)</span>
|
|
770
|
+
<span class='kw'>end</span>
|
|
771
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_aux'>aux</span>
|
|
772
|
+
<span class='kw'>end</span></pre>
|
|
773
|
+
</td>
|
|
774
|
+
</tr>
|
|
775
|
+
</table>
|
|
776
|
+
</div>
|
|
777
|
+
|
|
778
|
+
<div class="method_details ">
|
|
779
|
+
<h3 class="signature " id="porCarbohidratos-instance_method">
|
|
780
|
+
|
|
781
|
+
#<strong>porCarbohidratos</strong> ⇒ <tt>Double</tt>
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
</h3><div class="docstring">
|
|
788
|
+
<div class="discussion">
|
|
789
|
+
|
|
790
|
+
<p>% de carbohidratos del plato respecto a otros componentes.</p>
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
</div>
|
|
794
|
+
</div>
|
|
795
|
+
<div class="tags">
|
|
796
|
+
|
|
797
|
+
<p class="tag_title">Returns:</p>
|
|
798
|
+
<ul class="return">
|
|
799
|
+
|
|
800
|
+
<li>
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
<span class='type'>(<tt>Double</tt>)</span>
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
—
|
|
808
|
+
<div class='inline'>
|
|
809
|
+
<p>% de carbohidratos del plato.</p>
|
|
810
|
+
</div>
|
|
811
|
+
|
|
812
|
+
</li>
|
|
813
|
+
|
|
814
|
+
</ul>
|
|
815
|
+
|
|
816
|
+
</div><table class="source_code">
|
|
817
|
+
<tr>
|
|
818
|
+
<td>
|
|
819
|
+
<pre class="lines">
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
69
|
|
823
|
+
70
|
|
824
|
+
71
|
|
825
|
+
72
|
|
826
|
+
73
|
|
827
|
+
74
|
|
828
|
+
75</pre>
|
|
829
|
+
</td>
|
|
830
|
+
<td>
|
|
831
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 69</span>
|
|
832
|
+
|
|
833
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_porCarbohidratos'>porCarbohidratos</span>
|
|
834
|
+
<span class='id identifier rubyid_auxCarbohidratos'>auxCarbohidratos</span><span class='op'>=</span> <span class='float'>0.0</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span>
|
|
835
|
+
<span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
836
|
+
<span class='id identifier rubyid_auxCarbohidratos'>auxCarbohidratos</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_carbohidratos'>carbohidratos</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='rparen'>)</span><span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='op'>/</span><span class='float'>1000.0</span><span class='rparen'>)</span>
|
|
837
|
+
<span class='kw'>end</span>
|
|
838
|
+
<span class='kw'>return</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_auxCarbohidratos'>auxCarbohidratos</span><span class='op'>/</span> <span class='id identifier rubyid_conjuntoPorcentaje'>conjuntoPorcentaje</span><span class='rparen'>)</span><span class='op'>*</span> <span class='int'>100</span><span class='rparen'>)</span>
|
|
839
|
+
<span class='kw'>end</span></pre>
|
|
840
|
+
</td>
|
|
841
|
+
</tr>
|
|
842
|
+
</table>
|
|
843
|
+
</div>
|
|
844
|
+
|
|
845
|
+
<div class="method_details ">
|
|
846
|
+
<h3 class="signature " id="porLipidos-instance_method">
|
|
847
|
+
|
|
848
|
+
#<strong>porLipidos</strong> ⇒ <tt>Double</tt>
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
</h3><div class="docstring">
|
|
855
|
+
<div class="discussion">
|
|
856
|
+
|
|
857
|
+
<p>% de lipidos del plato respecto a otros componentes.</p>
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
</div>
|
|
861
|
+
</div>
|
|
862
|
+
<div class="tags">
|
|
863
|
+
|
|
864
|
+
<p class="tag_title">Returns:</p>
|
|
865
|
+
<ul class="return">
|
|
866
|
+
|
|
867
|
+
<li>
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
<span class='type'>(<tt>Double</tt>)</span>
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
—
|
|
875
|
+
<div class='inline'>
|
|
876
|
+
<p>% de lipidos del plato.</p>
|
|
877
|
+
</div>
|
|
878
|
+
|
|
879
|
+
</li>
|
|
880
|
+
|
|
881
|
+
</ul>
|
|
882
|
+
|
|
883
|
+
</div><table class="source_code">
|
|
884
|
+
<tr>
|
|
885
|
+
<td>
|
|
886
|
+
<pre class="lines">
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
56
|
|
890
|
+
57
|
|
891
|
+
58
|
|
892
|
+
59
|
|
893
|
+
60
|
|
894
|
+
61
|
|
895
|
+
62</pre>
|
|
896
|
+
</td>
|
|
897
|
+
<td>
|
|
898
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 56</span>
|
|
899
|
+
|
|
900
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_porLipidos'>porLipidos</span>
|
|
901
|
+
<span class='id identifier rubyid_auxLipidos'>auxLipidos</span><span class='op'>=</span> <span class='float'>0.0</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span>
|
|
902
|
+
<span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
903
|
+
<span class='id identifier rubyid_auxLipidos'>auxLipidos</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_lipidos'>lipidos</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='rparen'>)</span><span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='op'>/</span><span class='float'>1000.0</span><span class='rparen'>)</span>
|
|
904
|
+
<span class='kw'>end</span>
|
|
905
|
+
<span class='kw'>return</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_auxLipidos'>auxLipidos</span><span class='op'>/</span> <span class='id identifier rubyid_conjuntoPorcentaje'>conjuntoPorcentaje</span><span class='rparen'>)</span><span class='op'>*</span> <span class='int'>100</span><span class='rparen'>)</span>
|
|
906
|
+
<span class='kw'>end</span></pre>
|
|
907
|
+
</td>
|
|
908
|
+
</tr>
|
|
909
|
+
</table>
|
|
910
|
+
</div>
|
|
911
|
+
|
|
912
|
+
<div class="method_details ">
|
|
913
|
+
<h3 class="signature " id="porProteinas-instance_method">
|
|
914
|
+
|
|
915
|
+
#<strong>porProteinas</strong> ⇒ <tt>Double</tt>
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
</h3><div class="docstring">
|
|
922
|
+
<div class="discussion">
|
|
923
|
+
|
|
924
|
+
<p>% de proteinas del plato respecto a otros componentes.</p>
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
</div>
|
|
928
|
+
</div>
|
|
929
|
+
<div class="tags">
|
|
930
|
+
|
|
931
|
+
<p class="tag_title">Returns:</p>
|
|
932
|
+
<ul class="return">
|
|
933
|
+
|
|
934
|
+
<li>
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
<span class='type'>(<tt>Double</tt>)</span>
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
—
|
|
942
|
+
<div class='inline'>
|
|
943
|
+
<p>% de proteinas del plato.</p>
|
|
944
|
+
</div>
|
|
945
|
+
|
|
946
|
+
</li>
|
|
947
|
+
|
|
948
|
+
</ul>
|
|
949
|
+
|
|
950
|
+
</div><table class="source_code">
|
|
951
|
+
<tr>
|
|
952
|
+
<td>
|
|
953
|
+
<pre class="lines">
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
43
|
|
957
|
+
44
|
|
958
|
+
45
|
|
959
|
+
46
|
|
960
|
+
47
|
|
961
|
+
48
|
|
962
|
+
49</pre>
|
|
963
|
+
</td>
|
|
964
|
+
<td>
|
|
965
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 43</span>
|
|
966
|
+
|
|
967
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_porProteinas'>porProteinas</span>
|
|
968
|
+
<span class='id identifier rubyid_auxProteinas'>auxProteinas</span><span class='op'>=</span> <span class='float'>0.0</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span>
|
|
969
|
+
<span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
970
|
+
<span class='id identifier rubyid_auxProteinas'>auxProteinas</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_proteinas'>proteinas</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='rparen'>)</span><span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='op'>/</span><span class='float'>1000.0</span><span class='rparen'>)</span>
|
|
971
|
+
<span class='kw'>end</span>
|
|
972
|
+
<span class='kw'>return</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_auxProteinas'>auxProteinas</span><span class='op'>/</span> <span class='id identifier rubyid_conjuntoPorcentaje'>conjuntoPorcentaje</span><span class='rparen'>)</span><span class='op'>*</span> <span class='int'>100</span><span class='rparen'>)</span>
|
|
973
|
+
<span class='kw'>end</span></pre>
|
|
974
|
+
</td>
|
|
975
|
+
</tr>
|
|
976
|
+
</table>
|
|
977
|
+
</div>
|
|
978
|
+
|
|
979
|
+
<div class="method_details ">
|
|
980
|
+
<h3 class="signature " id="to_s-instance_method">
|
|
981
|
+
|
|
982
|
+
#<strong>to_s</strong> ⇒ <tt>String</tt>
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
</h3><div class="docstring">
|
|
989
|
+
<div class="discussion">
|
|
990
|
+
|
|
991
|
+
<p>Foramte el plato a una cadena de texto legible.</p>
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
</div>
|
|
995
|
+
</div>
|
|
996
|
+
<div class="tags">
|
|
997
|
+
|
|
998
|
+
<p class="tag_title">Returns:</p>
|
|
999
|
+
<ul class="return">
|
|
1000
|
+
|
|
1001
|
+
<li>
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
—
|
|
1009
|
+
<div class='inline'>
|
|
1010
|
+
<p>Cadena de texto resumen del plato.</p>
|
|
1011
|
+
</div>
|
|
1012
|
+
|
|
1013
|
+
</li>
|
|
1014
|
+
|
|
1015
|
+
</ul>
|
|
1016
|
+
|
|
1017
|
+
</div><table class="source_code">
|
|
1018
|
+
<tr>
|
|
1019
|
+
<td>
|
|
1020
|
+
<pre class="lines">
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
95
|
|
1024
|
+
96
|
|
1025
|
+
97
|
|
1026
|
+
98
|
|
1027
|
+
99
|
|
1028
|
+
100
|
|
1029
|
+
101</pre>
|
|
1030
|
+
</td>
|
|
1031
|
+
<td>
|
|
1032
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 95</span>
|
|
1033
|
+
|
|
1034
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
|
1035
|
+
<span class='id identifier rubyid_string'>string</span><span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@nombrePlato</span><span class='embexpr_end'>}</span><span class='tstring_content'>:\n</span><span class='tstring_end'>"</span></span>
|
|
1036
|
+
<span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
1037
|
+
<span class='id identifier rubyid_string'>string</span><span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nombre'>nombre</span><span class='embexpr_end'>}</span><span class='tstring_content'>, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>;\n</span><span class='tstring_end'>"</span></span>
|
|
1038
|
+
<span class='kw'>end</span>
|
|
1039
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_string'>string</span>
|
|
1040
|
+
<span class='kw'>end</span></pre>
|
|
1041
|
+
</td>
|
|
1042
|
+
</tr>
|
|
1043
|
+
</table>
|
|
1044
|
+
</div>
|
|
1045
|
+
|
|
1046
|
+
<div class="method_details ">
|
|
1047
|
+
<h3 class="signature " id="valorCaloricoTotal-instance_method">
|
|
1048
|
+
|
|
1049
|
+
#<strong>valorCaloricoTotal</strong> ⇒ <tt>Double</tt>
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
</h3><div class="docstring">
|
|
1056
|
+
<div class="discussion">
|
|
1057
|
+
|
|
1058
|
+
<p>Calor calórico del plato.</p>
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
</div>
|
|
1062
|
+
</div>
|
|
1063
|
+
<div class="tags">
|
|
1064
|
+
|
|
1065
|
+
<p class="tag_title">Returns:</p>
|
|
1066
|
+
<ul class="return">
|
|
1067
|
+
|
|
1068
|
+
<li>
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
<span class='type'>(<tt>Double</tt>)</span>
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
—
|
|
1076
|
+
<div class='inline'>
|
|
1077
|
+
<p>Valor calórico del plato.</p>
|
|
1078
|
+
</div>
|
|
1079
|
+
|
|
1080
|
+
</li>
|
|
1081
|
+
|
|
1082
|
+
</ul>
|
|
1083
|
+
|
|
1084
|
+
</div><table class="source_code">
|
|
1085
|
+
<tr>
|
|
1086
|
+
<td>
|
|
1087
|
+
<pre class="lines">
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
82
|
|
1091
|
+
83
|
|
1092
|
+
84
|
|
1093
|
+
85
|
|
1094
|
+
86
|
|
1095
|
+
87
|
|
1096
|
+
88</pre>
|
|
1097
|
+
</td>
|
|
1098
|
+
<td>
|
|
1099
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/platos.rb', line 82</span>
|
|
1100
|
+
|
|
1101
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_valorCaloricoTotal'>valorCaloricoTotal</span>
|
|
1102
|
+
<span class='id identifier rubyid_auxVCT'>auxVCT</span><span class='op'>=</span> <span class='float'>0.0</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span>
|
|
1103
|
+
<span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
1104
|
+
<span class='id identifier rubyid_auxVCT'>auxVCT</span><span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoAlimentos'>conjuntoAlimentos</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_kilocalorias'>kilocalorias</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='rparen'>)</span><span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_conjuntoCantidades'>conjuntoCantidades</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='op'>/</span><span class='float'>1000.0</span><span class='rparen'>)</span>
|
|
1105
|
+
<span class='kw'>end</span>
|
|
1106
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_auxVCT'>auxVCT</span>
|
|
1107
|
+
<span class='kw'>end</span></pre>
|
|
1108
|
+
</td>
|
|
1109
|
+
</tr>
|
|
1110
|
+
</table>
|
|
1111
|
+
</div>
|
|
1112
|
+
|
|
1113
|
+
</div>
|
|
1114
|
+
|
|
1115
|
+
</div>
|
|
1116
|
+
|
|
1117
|
+
<div id="footer">
|
|
1118
|
+
Generated on Tue Dec 17 19:32:04 2019 by
|
|
1119
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1120
|
+
0.9.20 (ruby-2.5.1).
|
|
1121
|
+
</div>
|
|
1122
|
+
|
|
1123
|
+
</div>
|
|
1124
|
+
</body>
|
|
1125
|
+
</html>
|