Menu_dietetico 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 +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/CODE_OF_CONDUCT_md.html +196 -0
- data/doc/Dieta.html +417 -0
- data/doc/Dieta_edades.html +234 -0
- data/doc/Dieta_grupos.html +233 -0
- data/doc/Gemfile.html +101 -0
- data/doc/Gemfile_lock.html +183 -0
- data/doc/Guardfile.html +181 -0
- data/doc/LICENSE_txt.html +118 -0
- data/doc/ListaEnlazada.html +396 -0
- data/doc/Object.html +117 -0
- data/doc/Prct06.html +110 -0
- data/doc/README_md.html +165 -0
- data/doc/Rakefile.html +102 -0
- data/doc/bin/setup.html +102 -0
- data/doc/created.rid +18 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +116 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +229 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/prct06_gemspec.html +136 -0
- data/doc/table_of_contents.html +175 -0
- data/lib/prct06.rb +5 -0
- data/lib/prct06/Dieta.rb +137 -0
- data/lib/prct06/ListaEnlazada.rb +67 -0
- data/lib/prct06/version.rb +3 -0
- data/prct06.gemspec +39 -0
- metadata +207 -0
data/doc/Dieta.html
ADDED
@@ -0,0 +1,417 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Dieta - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="class">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="./index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
<div id="parent-class-section" class="nav-section">
|
59
|
+
<h3>Parent</h3>
|
60
|
+
|
61
|
+
|
62
|
+
<p class="link"><a href="Object.html">Object</a>
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div id="includes-section" class="nav-section">
|
67
|
+
<h3>Included Modules</h3>
|
68
|
+
|
69
|
+
<ul class="link-list">
|
70
|
+
|
71
|
+
|
72
|
+
<li><span class="include">Comparable</span>
|
73
|
+
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- Method Quickref -->
|
80
|
+
<div id="method-list-section" class="nav-section">
|
81
|
+
<h3>Methods</h3>
|
82
|
+
|
83
|
+
<ul class="link-list" role="directory">
|
84
|
+
|
85
|
+
<li ><a href="#method-c-new">::new</a>
|
86
|
+
|
87
|
+
<li ><a href="#method-i-3C-3D-3E">#<=></a>
|
88
|
+
|
89
|
+
<li ><a href="#method-i-plato">#plato</a>
|
90
|
+
|
91
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
92
|
+
|
93
|
+
</ul>
|
94
|
+
</div>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
</nav>
|
98
|
+
|
99
|
+
<main role="main" aria-labelledby="class-Dieta">
|
100
|
+
<h1 id="class-Dieta" class="class">
|
101
|
+
class Dieta
|
102
|
+
</h1>
|
103
|
+
|
104
|
+
<section class="description">
|
105
|
+
|
106
|
+
<p>Clase dieta base. Almacena un menú, indicando aspectos, tales como,
|
107
|
+
porcentaje de ingesta, <a href="Dieta.html#attribute-i-VCT">#VCT</a>,
|
108
|
+
proteínas, grasas, hidratos y los platos</p>
|
109
|
+
|
110
|
+
</section>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<section class="attribute-method-details" class="method-section">
|
124
|
+
<header>
|
125
|
+
<h3>Attributes</h3>
|
126
|
+
</header>
|
127
|
+
|
128
|
+
|
129
|
+
<div id="attribute-i-VCT" class="method-detail">
|
130
|
+
<div class="method-heading attribute-method-heading">
|
131
|
+
<span class="method-name">VCT</span><span
|
132
|
+
class="attribute-access-type">[R]</span>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div class="method-description">
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
<div id="attribute-i-grasas" class="method-detail">
|
143
|
+
<div class="method-heading attribute-method-heading">
|
144
|
+
<span class="method-name">grasas</span><span
|
145
|
+
class="attribute-access-type">[R]</span>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div class="method-description">
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div id="attribute-i-hidratos" class="method-detail">
|
156
|
+
<div class="method-heading attribute-method-heading">
|
157
|
+
<span class="method-name">hidratos</span><span
|
158
|
+
class="attribute-access-type">[R]</span>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div class="method-description">
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div id="attribute-i-nplatos" class="method-detail">
|
169
|
+
<div class="method-heading attribute-method-heading">
|
170
|
+
<span class="method-name">nplatos</span><span
|
171
|
+
class="attribute-access-type">[R]</span>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="method-description">
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
<div id="attribute-i-platos" class="method-detail">
|
182
|
+
<div class="method-heading attribute-method-heading">
|
183
|
+
<span class="method-name">platos</span><span
|
184
|
+
class="attribute-access-type">[R]</span>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div class="method-description">
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</div>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<div id="attribute-i-porcentaje_ingesta" class="method-detail">
|
195
|
+
<div class="method-heading attribute-method-heading">
|
196
|
+
<span class="method-name">porcentaje_ingesta</span><span
|
197
|
+
class="attribute-access-type">[R]</span>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<div class="method-description">
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div id="attribute-i-proteinas" class="method-detail">
|
208
|
+
<div class="method-heading attribute-method-heading">
|
209
|
+
<span class="method-name">proteinas</span><span
|
210
|
+
class="attribute-access-type">[R]</span>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
<div class="method-description">
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</div>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div id="attribute-i-titulo" class="method-detail">
|
221
|
+
<div class="method-heading attribute-method-heading">
|
222
|
+
<span class="method-name">titulo</span><span
|
223
|
+
class="attribute-access-type">[R]</span>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
<div class="method-description">
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
</section>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
238
|
+
<header>
|
239
|
+
<h3>Public Class Methods</h3>
|
240
|
+
</header>
|
241
|
+
|
242
|
+
|
243
|
+
<div id="method-c-new" class="method-detail ">
|
244
|
+
|
245
|
+
<div class="method-heading">
|
246
|
+
<span class="method-name">new</span><span
|
247
|
+
class="method-args">(titulo, porcentaje_ingesta, nplatos, vct, proteinas, grasas, hidratos, *des_platos)</span>
|
248
|
+
|
249
|
+
<span class="method-click-advice">click to toggle source</span>
|
250
|
+
|
251
|
+
</div>
|
252
|
+
|
253
|
+
|
254
|
+
<div class="method-description">
|
255
|
+
|
256
|
+
<p>constructor</p>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<div class="method-source-code" id="new-source">
|
262
|
+
<pre><span class="ruby-comment"># File lib/prct06/Dieta.rb, line 9</span>
|
263
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">titulo</span>, <span class="ruby-identifier">porcentaje_ingesta</span>, <span class="ruby-identifier">nplatos</span>, <span class="ruby-identifier">vct</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">grasas</span>, <span class="ruby-identifier">hidratos</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">des_platos</span>)
|
264
|
+
<span class="ruby-ivar">@titulo</span> = <span class="ruby-identifier">titulo</span>
|
265
|
+
<span class="ruby-ivar">@porcentaje_ingesta</span> = <span class="ruby-identifier">porcentaje_ingesta</span>
|
266
|
+
<span class="ruby-ivar">@nplatos</span> = <span class="ruby-identifier">nplatos</span>
|
267
|
+
|
268
|
+
<span class="ruby-ivar">@platos</span> = []
|
269
|
+
<span class="ruby-keyword">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword">in</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">nplatos</span><span class="ruby-operator">-</span><span class="ruby-value">1</span> <span class="ruby-keyword">do</span>
|
270
|
+
<span class="ruby-identifier">aux</span> = [<span class="ruby-identifier">des_platos</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">0</span>], <span class="ruby-identifier">des_platos</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">1</span>], <span class="ruby-identifier">des_platos</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">2</span>]]
|
271
|
+
<span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">aux</span>)
|
272
|
+
<span class="ruby-keyword">end</span>
|
273
|
+
|
274
|
+
<span class="ruby-ivar">@VCT</span> = <span class="ruby-identifier">vct</span>
|
275
|
+
<span class="ruby-ivar">@proteinas</span> = <span class="ruby-identifier">proteinas</span>
|
276
|
+
<span class="ruby-ivar">@grasas</span> = <span class="ruby-identifier">grasas</span>
|
277
|
+
<span class="ruby-ivar">@hidratos</span> = <span class="ruby-identifier">hidratos</span>
|
278
|
+
<span class="ruby-keyword">end</span></pre>
|
279
|
+
</div>
|
280
|
+
|
281
|
+
</div>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
</div>
|
287
|
+
|
288
|
+
|
289
|
+
</section>
|
290
|
+
|
291
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
292
|
+
<header>
|
293
|
+
<h3>Public Instance Methods</h3>
|
294
|
+
</header>
|
295
|
+
|
296
|
+
|
297
|
+
<div id="method-i-3C-3D-3E" class="method-detail ">
|
298
|
+
|
299
|
+
<div class="method-heading">
|
300
|
+
<span class="method-name"><=></span><span
|
301
|
+
class="method-args">(other)</span>
|
302
|
+
|
303
|
+
<span class="method-click-advice">click to toggle source</span>
|
304
|
+
|
305
|
+
</div>
|
306
|
+
|
307
|
+
|
308
|
+
<div class="method-description">
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<div class="method-source-code" id="3C-3D-3E-source">
|
316
|
+
<pre><span class="ruby-comment"># File lib/prct06/Dieta.rb, line 26</span>
|
317
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator"><=></span> (<span class="ruby-identifier">other</span>)
|
318
|
+
<span class="ruby-ivar">@VCT</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>.<span class="ruby-constant">VCT</span>
|
319
|
+
<span class="ruby-keyword">end</span></pre>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
</div>
|
328
|
+
|
329
|
+
|
330
|
+
<div id="method-i-plato" class="method-detail ">
|
331
|
+
|
332
|
+
<div class="method-heading">
|
333
|
+
<span class="method-name">plato</span><span
|
334
|
+
class="method-args">(n)</span>
|
335
|
+
|
336
|
+
<span class="method-click-advice">click to toggle source</span>
|
337
|
+
|
338
|
+
</div>
|
339
|
+
|
340
|
+
|
341
|
+
<div class="method-description">
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
<div class="method-source-code" id="plato-source">
|
349
|
+
<pre><span class="ruby-comment"># File lib/prct06/Dieta.rb, line 30</span>
|
350
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">plato</span> (<span class="ruby-identifier">n</span>)
|
351
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@nplatos</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">n</span> <span class="ruby-operator"><</span> <span class="ruby-value">1</span> <span class="ruby-keyword">then</span>
|
352
|
+
<span class="ruby-keyword">return</span> <span class="ruby-string">""</span>
|
353
|
+
<span class="ruby-keyword">end</span>
|
354
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@platos</span>[<span class="ruby-identifier">n</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>]
|
355
|
+
<span class="ruby-keyword">end</span></pre>
|
356
|
+
</div>
|
357
|
+
|
358
|
+
</div>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
</div>
|
364
|
+
|
365
|
+
|
366
|
+
<div id="method-i-to_s" class="method-detail ">
|
367
|
+
|
368
|
+
<div class="method-heading">
|
369
|
+
<span class="method-name">to_s</span><span
|
370
|
+
class="method-args">()</span>
|
371
|
+
|
372
|
+
<span class="method-click-advice">click to toggle source</span>
|
373
|
+
|
374
|
+
</div>
|
375
|
+
|
376
|
+
|
377
|
+
<div class="method-description">
|
378
|
+
|
379
|
+
<p>Muestra el menú correctamente formateado</p>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
<div class="method-source-code" id="to_s-source">
|
385
|
+
<pre><span class="ruby-comment"># File lib/prct06/Dieta.rb, line 38</span>
|
386
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
387
|
+
<span class="ruby-identifier">x</span> = <span class="ruby-string">""</span>
|
388
|
+
<span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@titulo} (#{@porcentaje_ingesta}%)\n"</span>
|
389
|
+
|
390
|
+
<span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
391
|
+
<span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"- #{i[0]}, #{i[1]}, #{i[2]}g\n"</span>
|
392
|
+
<span class="ruby-keyword">end</span>
|
393
|
+
|
394
|
+
<span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"V.C.T | % #{@VCT} kcal | #{@proteinas} #{@grasas} #{@hidratos}"</span>
|
395
|
+
<span class="ruby-keyword">end</span></pre>
|
396
|
+
</div>
|
397
|
+
|
398
|
+
</div>
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
</div>
|
404
|
+
|
405
|
+
|
406
|
+
</section>
|
407
|
+
|
408
|
+
</section>
|
409
|
+
</main>
|
410
|
+
|
411
|
+
|
412
|
+
<footer id="validator-badges" role="contentinfo">
|
413
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
414
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
415
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
416
|
+
</footer>
|
417
|
+
|
@@ -0,0 +1,234 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Dieta_edades - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="class">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="./index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
<div id="parent-class-section" class="nav-section">
|
59
|
+
<h3>Parent</h3>
|
60
|
+
|
61
|
+
|
62
|
+
<p class="link"><a href="Dieta.html">Dieta</a>
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<!-- Method Quickref -->
|
69
|
+
<div id="method-list-section" class="nav-section">
|
70
|
+
<h3>Methods</h3>
|
71
|
+
|
72
|
+
<ul class="link-list" role="directory">
|
73
|
+
|
74
|
+
<li class="calls-super" ><a href="#method-c-new">::new</a>
|
75
|
+
|
76
|
+
<li class="calls-super" ><a href="#method-i-to_s">#to_s</a>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
</nav>
|
83
|
+
|
84
|
+
<main role="main" aria-labelledby="class-Dieta_edades">
|
85
|
+
<h1 id="class-Dieta_edades" class="class">
|
86
|
+
class Dieta_edades
|
87
|
+
</h1>
|
88
|
+
|
89
|
+
<section class="description">
|
90
|
+
|
91
|
+
<p>Clase hija que hereda de <a href="Dieta.html">Dieta</a> y añade al menú un
|
92
|
+
campo en el que se indica el grupo de edad para el cual está destinado el
|
93
|
+
plato.</p>
|
94
|
+
|
95
|
+
</section>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<section class="attribute-method-details" class="method-section">
|
109
|
+
<header>
|
110
|
+
<h3>Attributes</h3>
|
111
|
+
</header>
|
112
|
+
|
113
|
+
|
114
|
+
<div id="attribute-i-grupo_edades" class="method-detail">
|
115
|
+
<div class="method-heading attribute-method-heading">
|
116
|
+
<span class="method-name">grupo_edades</span><span
|
117
|
+
class="attribute-access-type">[R]</span>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div class="method-description">
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
</section>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
132
|
+
<header>
|
133
|
+
<h3>Public Class Methods</h3>
|
134
|
+
</header>
|
135
|
+
|
136
|
+
|
137
|
+
<div id="method-c-new" class="method-detail ">
|
138
|
+
|
139
|
+
<div class="method-heading">
|
140
|
+
<span class="method-name">new</span><span
|
141
|
+
class="method-args">(titulo, porcentaje_ingesta, nplatos, vct, proteinas, grasas, hidratos, *des_platos, grupo_edades)</span>
|
142
|
+
|
143
|
+
<span class="method-click-advice">click to toggle source</span>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
|
148
|
+
<div class="method-description">
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<div class="method-calls-super">
|
154
|
+
Calls superclass method
|
155
|
+
<a href="Dieta.html#method-c-new">Dieta.new</a>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<div class="method-source-code" id="new-source">
|
161
|
+
<pre><span class="ruby-comment"># File lib/prct06/Dieta.rb, line 68</span>
|
162
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">titulo</span>, <span class="ruby-identifier">porcentaje_ingesta</span>, <span class="ruby-identifier">nplatos</span>, <span class="ruby-identifier">vct</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">grasas</span>, <span class="ruby-identifier">hidratos</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">des_platos</span>, <span class="ruby-identifier">grupo_edades</span>)
|
163
|
+
<span class="ruby-ivar">@grupo_edades</span> = <span class="ruby-identifier">grupo_edades</span>
|
164
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">titulo</span>, <span class="ruby-identifier">porcentaje_ingesta</span>, <span class="ruby-identifier">nplatos</span>, <span class="ruby-identifier">vct</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">grasas</span>, <span class="ruby-identifier">hidratos</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">des_platos</span>)
|
165
|
+
<span class="ruby-keyword">end</span></pre>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
</div>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
</div>
|
174
|
+
|
175
|
+
|
176
|
+
</section>
|
177
|
+
|
178
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
179
|
+
<header>
|
180
|
+
<h3>Public Instance Methods</h3>
|
181
|
+
</header>
|
182
|
+
|
183
|
+
|
184
|
+
<div id="method-i-to_s" class="method-detail ">
|
185
|
+
|
186
|
+
<div class="method-heading">
|
187
|
+
<span class="method-name">to_s</span><span
|
188
|
+
class="method-args">()</span>
|
189
|
+
|
190
|
+
<span class="method-click-advice">click to toggle source</span>
|
191
|
+
|
192
|
+
</div>
|
193
|
+
|
194
|
+
|
195
|
+
<div class="method-description">
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<div class="method-calls-super">
|
201
|
+
Calls superclass method
|
202
|
+
<a href="Dieta.html#method-i-to_s">Dieta#to_s</a>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
<div class="method-source-code" id="to_s-source">
|
208
|
+
<pre><span class="ruby-comment"># File lib/prct06/Dieta.rb, line 72</span>
|
209
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
210
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-keyword">super</span>
|
211
|
+
<span class="ruby-identifier">output</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"\nGrupo: #{@grupo_edades}"</span>
|
212
|
+
<span class="ruby-keyword">end</span></pre>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
</div>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</div>
|
221
|
+
|
222
|
+
|
223
|
+
</section>
|
224
|
+
|
225
|
+
</section>
|
226
|
+
</main>
|
227
|
+
|
228
|
+
|
229
|
+
<footer id="validator-badges" role="contentinfo">
|
230
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
231
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
232
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
233
|
+
</footer>
|
234
|
+
|