pract07 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/Gemfile +7 -0
- data/Gemfile.lock +91 -0
- data/Guardfile +82 -0
- data/README.md +11 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/Dieta.html +1491 -0
- data/doc/Edad.html +336 -0
- data/doc/Food.html +342 -0
- data/doc/List.html +768 -0
- data/doc/Pract07.html +130 -0
- data/doc/_index.html +161 -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 +481 -0
- data/doc/file.README.html +83 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +83 -0
- data/doc/js/app.js +243 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +291 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/pract07.rb +13 -0
- data/lib/pract07/Dieta.rb +193 -0
- data/lib/pract07/List.rb +61 -0
- data/lib/pract07/version.rb +3 -0
- data/pract07.gemspec +42 -0
- metadata +187 -0
data/doc/Edad.html
ADDED
@@ -0,0 +1,336 @@
|
|
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: Edad
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.5
|
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 = "Edad";
|
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"></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
|
+
|
41
|
+
|
42
|
+
<span class="title">Edad</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
|
+
<iframe id="search_frame" src="class_list.html"></iframe>
|
63
|
+
|
64
|
+
<div id="content"><h1>Class: Edad
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
</h1>
|
69
|
+
<div class="box_info">
|
70
|
+
|
71
|
+
<dl>
|
72
|
+
<dt>Inherits:</dt>
|
73
|
+
<dd>
|
74
|
+
<span class="inheritName"><span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></span>
|
75
|
+
|
76
|
+
<ul class="fullTree">
|
77
|
+
<li>Object</li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></li>
|
80
|
+
|
81
|
+
<li class="next">Edad</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>lib/pract07/Dieta.rb</dd>
|
102
|
+
</dl>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
107
|
+
<div class="discussion">
|
108
|
+
|
109
|
+
<p>Clase hija de dieta, añade edad recomendada</p>
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
<div class="tags">
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>Instance Attribute Summary</h2>
|
124
|
+
|
125
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></h3>
|
126
|
+
<p class="inherited"><span class='object_link'><a href="Dieta.html#cantidad-instance_method" title="Dieta#cantidad (method)">#cantidad</a></span>, <span class='object_link'><a href="Dieta.html#descripcion-instance_method" title="Dieta#descripcion (method)">#descripcion</a></span>, <span class='object_link'><a href="Dieta.html#ingesta-instance_method" title="Dieta#ingesta (method)">#ingesta</a></span>, <span class='object_link'><a href="Dieta.html#kcal-instance_method" title="Dieta#kcal (method)">#kcal</a></span>, <span class='object_link'><a href="Dieta.html#percent-instance_method" title="Dieta#percent (method)">#percent</a></span>, <span class='object_link'><a href="Dieta.html#racion-instance_method" title="Dieta#racion (method)">#racion</a></span>, <span class='object_link'><a href="Dieta.html#tipo_dieta-instance_method" title="Dieta#tipo_dieta (method)">#tipo_dieta</a></span></p>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
<h2>
|
131
|
+
Instance Method Summary
|
132
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
133
|
+
</h2>
|
134
|
+
|
135
|
+
<ul class="summary">
|
136
|
+
|
137
|
+
<li class="public ">
|
138
|
+
<span class="summary_signature">
|
139
|
+
|
140
|
+
<a href="#tip-instance_method" title="#tip (instance method)">#<strong>tip</strong>(a8, a13, a18) ⇒ Object </a>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
</span>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<span class="summary_desc"><div class='inline'>
|
155
|
+
<p>añade el rango de edades adecuado para el menú.</p>
|
156
|
+
</div></span>
|
157
|
+
|
158
|
+
</li>
|
159
|
+
|
160
|
+
|
161
|
+
<li class="public ">
|
162
|
+
<span class="summary_signature">
|
163
|
+
|
164
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ Object </a>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
</span>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<span class="summary_desc"><div class='inline'>
|
179
|
+
<p>devuelve la salida con todos los datos.</p>
|
180
|
+
</div></span>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
</ul>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></h3>
|
198
|
+
<p class="inherited"><span class='object_link'><a href="Dieta.html#%3C%3D%3E-instance_method" title="Dieta#<=> (method)">#<=></a></span>, <span class='object_link'><a href="Dieta.html#%3D%3D-instance_method" title="Dieta#== (method)">#==</a></span>, <span class='object_link'><a href="Dieta.html#get_descripcion-instance_method" title="Dieta#get_descripcion (method)">#get_descripcion</a></span>, <span class='object_link'><a href="Dieta.html#get_gras-instance_method" title="Dieta#get_gras (method)">#get_gras</a></span>, <span class='object_link'><a href="Dieta.html#get_hidr-instance_method" title="Dieta#get_hidr (method)">#get_hidr</a></span>, <span class='object_link'><a href="Dieta.html#get_platos-instance_method" title="Dieta#get_platos (method)">#get_platos</a></span>, <span class='object_link'><a href="Dieta.html#get_prot-instance_method" title="Dieta#get_prot (method)">#get_prot</a></span>, <span class='object_link'><a href="Dieta.html#get_titulo-instance_method" title="Dieta#get_titulo (method)">#get_titulo</a></span>, <span class='object_link'><a href="Dieta.html#get_to_-instance_method" title="Dieta#get_to_ (method)">#get_to_</a></span>, <span class='object_link'><a href="Dieta.html#initialize-instance_method" title="Dieta#initialize (method)">#initialize</a></span></p>
|
199
|
+
|
200
|
+
<div id="constructor_details" class="method_details_list">
|
201
|
+
<h2>Constructor Details</h2>
|
202
|
+
|
203
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Dieta.html#initialize-instance_method" title="Dieta#initialize (method)">Dieta</a></span></p>
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
|
208
|
+
<div id="instance_method_details" class="method_details_list">
|
209
|
+
<h2>Instance Method Details</h2>
|
210
|
+
|
211
|
+
|
212
|
+
<div class="method_details first">
|
213
|
+
<h3 class="signature first" id="tip-instance_method">
|
214
|
+
|
215
|
+
#<strong>tip</strong>(a8, a13, a18) ⇒ <tt>Object</tt>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
</h3><div class="docstring">
|
222
|
+
<div class="discussion">
|
223
|
+
|
224
|
+
<p>añade el rango de edades adecuado para el menú</p>
|
225
|
+
|
226
|
+
|
227
|
+
</div>
|
228
|
+
</div>
|
229
|
+
<div class="tags">
|
230
|
+
|
231
|
+
|
232
|
+
</div><table class="source_code">
|
233
|
+
<tr>
|
234
|
+
<td>
|
235
|
+
<pre class="lines">
|
236
|
+
|
237
|
+
|
238
|
+
144
|
239
|
+
145
|
240
|
+
146
|
241
|
+
147
|
242
|
+
148</pre>
|
243
|
+
</td>
|
244
|
+
<td>
|
245
|
+
<pre class="code"><span class="info file"># File 'lib/pract07/Dieta.rb', line 144</span>
|
246
|
+
|
247
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tip'>tip</span><span class='lparen'>(</span><span class='id identifier rubyid_a8'>a8</span><span class='comma'>,</span> <span class='id identifier rubyid_a13'>a13</span><span class='comma'>,</span> <span class='id identifier rubyid_a18'>a18</span><span class='rparen'>)</span> <span class='comment'>#añade el rango de edades adecuado para el menú
|
248
|
+
</span> <span class='ivar'>@a8</span> <span class='op'>=</span> <span class='id identifier rubyid_a8'>a8</span> <span class='comment'>#de 4 a 8 años
|
249
|
+
</span> <span class='ivar'>@a13</span> <span class='op'>=</span> <span class='id identifier rubyid_a13'>a13</span> <span class='comment'>#de 9 a 13 años
|
250
|
+
</span> <span class='ivar'>@a18</span> <span class='op'>=</span> <span class='id identifier rubyid_a18'>a18</span> <span class='comment'>#de 14 a 18 años
|
251
|
+
</span><span class='kw'>end</span></pre>
|
252
|
+
</td>
|
253
|
+
</tr>
|
254
|
+
</table>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
<div class="method_details ">
|
258
|
+
<h3 class="signature " id="to_s-instance_method">
|
259
|
+
|
260
|
+
#<strong>to_s</strong> ⇒ <tt>Object</tt>
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
</h3><div class="docstring">
|
267
|
+
<div class="discussion">
|
268
|
+
|
269
|
+
<p>devuelve la salida con todos los datos</p>
|
270
|
+
|
271
|
+
|
272
|
+
</div>
|
273
|
+
</div>
|
274
|
+
<div class="tags">
|
275
|
+
|
276
|
+
|
277
|
+
</div><table class="source_code">
|
278
|
+
<tr>
|
279
|
+
<td>
|
280
|
+
<pre class="lines">
|
281
|
+
|
282
|
+
|
283
|
+
150
|
284
|
+
151
|
285
|
+
152
|
286
|
+
153
|
287
|
+
154
|
288
|
+
155
|
289
|
+
156
|
290
|
+
157
|
291
|
+
158
|
292
|
+
159
|
293
|
+
160
|
294
|
+
161
|
295
|
+
162
|
296
|
+
163
|
297
|
+
164
|
298
|
+
165</pre>
|
299
|
+
</td>
|
300
|
+
<td>
|
301
|
+
<pre class="code"><span class="info file"># File 'lib/pract07/Dieta.rb', line 150</span>
|
302
|
+
|
303
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span> <span class='comment'>#devuelve la salida con todos los datos
|
304
|
+
</span> <span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='kw'>super</span>
|
305
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
306
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Dirigido a personas de: </span><span class='tstring_end'>"</span></span>
|
307
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='ivar'>@a8</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='ivar'>@a8</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
|
308
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>4 a 8, </span><span class='tstring_end'>"</span></span>
|
309
|
+
<span class='kw'>end</span>
|
310
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='ivar'>@a13</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='ivar'>@a13</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
|
311
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>9 a 13, </span><span class='tstring_end'>"</span></span>
|
312
|
+
<span class='kw'>end</span>
|
313
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='ivar'>@a18</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='ivar'>@a18</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
|
314
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>14 a 18 </span><span class='tstring_end'>"</span></span>
|
315
|
+
<span class='kw'>end</span>
|
316
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>años.</span><span class='tstring_end'>"</span></span>
|
317
|
+
<span class='id identifier rubyid_s'>s</span>
|
318
|
+
<span class='kw'>end</span></pre>
|
319
|
+
</td>
|
320
|
+
</tr>
|
321
|
+
</table>
|
322
|
+
</div>
|
323
|
+
|
324
|
+
</div>
|
325
|
+
|
326
|
+
</div>
|
327
|
+
|
328
|
+
<div id="footer">
|
329
|
+
Generated on Wed Nov 23 12:53:02 2016 by
|
330
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
331
|
+
0.9.5 (ruby-2.3.0).
|
332
|
+
</div>
|
333
|
+
|
334
|
+
</div>
|
335
|
+
</body>
|
336
|
+
</html>
|
data/doc/Food.html
ADDED
@@ -0,0 +1,342 @@
|
|
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: Food
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.5
|
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 = "Food";
|
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"></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 (F)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Food</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
|
+
<iframe id="search_frame" src="class_list.html"></iframe>
|
63
|
+
|
64
|
+
<div id="content"><h1>Class: Food
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
</h1>
|
69
|
+
<div class="box_info">
|
70
|
+
|
71
|
+
<dl>
|
72
|
+
<dt>Inherits:</dt>
|
73
|
+
<dd>
|
74
|
+
<span class="inheritName"><span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></span>
|
75
|
+
|
76
|
+
<ul class="fullTree">
|
77
|
+
<li>Object</li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></li>
|
80
|
+
|
81
|
+
<li class="next">Food</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>lib/pract07/Dieta.rb</dd>
|
102
|
+
</dl>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
107
|
+
<div class="discussion">
|
108
|
+
|
109
|
+
<p>Clase hija de dieta, añade tipo de comida</p>
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
<div class="tags">
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>Instance Attribute Summary</h2>
|
124
|
+
|
125
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></h3>
|
126
|
+
<p class="inherited"><span class='object_link'><a href="Dieta.html#cantidad-instance_method" title="Dieta#cantidad (method)">#cantidad</a></span>, <span class='object_link'><a href="Dieta.html#descripcion-instance_method" title="Dieta#descripcion (method)">#descripcion</a></span>, <span class='object_link'><a href="Dieta.html#ingesta-instance_method" title="Dieta#ingesta (method)">#ingesta</a></span>, <span class='object_link'><a href="Dieta.html#kcal-instance_method" title="Dieta#kcal (method)">#kcal</a></span>, <span class='object_link'><a href="Dieta.html#percent-instance_method" title="Dieta#percent (method)">#percent</a></span>, <span class='object_link'><a href="Dieta.html#racion-instance_method" title="Dieta#racion (method)">#racion</a></span>, <span class='object_link'><a href="Dieta.html#tipo_dieta-instance_method" title="Dieta#tipo_dieta (method)">#tipo_dieta</a></span></p>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
<h2>
|
131
|
+
Instance Method Summary
|
132
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
133
|
+
</h2>
|
134
|
+
|
135
|
+
<ul class="summary">
|
136
|
+
|
137
|
+
<li class="public ">
|
138
|
+
<span class="summary_signature">
|
139
|
+
|
140
|
+
<a href="#tip-instance_method" title="#tip (instance method)">#<strong>tip</strong>(verduras, leche, cereales, frutas) ⇒ Object </a>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
</span>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<span class="summary_desc"><div class='inline'>
|
155
|
+
<p>añade el tipo que comida que se encuentra en el menú.</p>
|
156
|
+
</div></span>
|
157
|
+
|
158
|
+
</li>
|
159
|
+
|
160
|
+
|
161
|
+
<li class="public ">
|
162
|
+
<span class="summary_signature">
|
163
|
+
|
164
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ Object </a>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
</span>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<span class="summary_desc"><div class='inline'>
|
179
|
+
<p>devuelve la salida con todos los datos.</p>
|
180
|
+
</div></span>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
</ul>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Dieta.html" title="Dieta (class)">Dieta</a></span></h3>
|
198
|
+
<p class="inherited"><span class='object_link'><a href="Dieta.html#%3C%3D%3E-instance_method" title="Dieta#<=> (method)">#<=></a></span>, <span class='object_link'><a href="Dieta.html#%3D%3D-instance_method" title="Dieta#== (method)">#==</a></span>, <span class='object_link'><a href="Dieta.html#get_descripcion-instance_method" title="Dieta#get_descripcion (method)">#get_descripcion</a></span>, <span class='object_link'><a href="Dieta.html#get_gras-instance_method" title="Dieta#get_gras (method)">#get_gras</a></span>, <span class='object_link'><a href="Dieta.html#get_hidr-instance_method" title="Dieta#get_hidr (method)">#get_hidr</a></span>, <span class='object_link'><a href="Dieta.html#get_platos-instance_method" title="Dieta#get_platos (method)">#get_platos</a></span>, <span class='object_link'><a href="Dieta.html#get_prot-instance_method" title="Dieta#get_prot (method)">#get_prot</a></span>, <span class='object_link'><a href="Dieta.html#get_titulo-instance_method" title="Dieta#get_titulo (method)">#get_titulo</a></span>, <span class='object_link'><a href="Dieta.html#get_to_-instance_method" title="Dieta#get_to_ (method)">#get_to_</a></span>, <span class='object_link'><a href="Dieta.html#initialize-instance_method" title="Dieta#initialize (method)">#initialize</a></span></p>
|
199
|
+
|
200
|
+
<div id="constructor_details" class="method_details_list">
|
201
|
+
<h2>Constructor Details</h2>
|
202
|
+
|
203
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Dieta.html#initialize-instance_method" title="Dieta#initialize (method)">Dieta</a></span></p>
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
|
208
|
+
<div id="instance_method_details" class="method_details_list">
|
209
|
+
<h2>Instance Method Details</h2>
|
210
|
+
|
211
|
+
|
212
|
+
<div class="method_details first">
|
213
|
+
<h3 class="signature first" id="tip-instance_method">
|
214
|
+
|
215
|
+
#<strong>tip</strong>(verduras, leche, cereales, frutas) ⇒ <tt>Object</tt>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
</h3><div class="docstring">
|
222
|
+
<div class="discussion">
|
223
|
+
|
224
|
+
<p>añade el tipo que comida que se encuentra en el menú</p>
|
225
|
+
|
226
|
+
|
227
|
+
</div>
|
228
|
+
</div>
|
229
|
+
<div class="tags">
|
230
|
+
|
231
|
+
|
232
|
+
</div><table class="source_code">
|
233
|
+
<tr>
|
234
|
+
<td>
|
235
|
+
<pre class="lines">
|
236
|
+
|
237
|
+
|
238
|
+
115
|
239
|
+
116
|
240
|
+
117
|
241
|
+
118
|
242
|
+
119
|
243
|
+
120</pre>
|
244
|
+
</td>
|
245
|
+
<td>
|
246
|
+
<pre class="code"><span class="info file"># File 'lib/pract07/Dieta.rb', line 115</span>
|
247
|
+
|
248
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tip'>tip</span><span class='lparen'>(</span><span class='id identifier rubyid_verduras'>verduras</span><span class='comma'>,</span> <span class='id identifier rubyid_leche'>leche</span><span class='comma'>,</span> <span class='id identifier rubyid_cereales'>cereales</span><span class='comma'>,</span> <span class='id identifier rubyid_frutas'>frutas</span><span class='rparen'>)</span> <span class='comment'>#añade el tipo que comida que se encuentra en el menú
|
249
|
+
</span> <span class='ivar'>@verduras</span> <span class='op'>=</span> <span class='id identifier rubyid_verduras'>verduras</span> <span class='comment'>#muestra si el plato contiene verduras y hortalizas
|
250
|
+
</span> <span class='ivar'>@leche</span> <span class='op'>=</span> <span class='id identifier rubyid_leche'>leche</span> <span class='comment'>#muestra si el plato contiene leche, huevos, pescado, carne y frutos secos
|
251
|
+
</span> <span class='ivar'>@cereales</span> <span class='op'>=</span> <span class='id identifier rubyid_cereales'>cereales</span> <span class='comment'>#muestra si el plato contiene cereales,legumbres y féculas
|
252
|
+
</span> <span class='ivar'>@frutas</span> <span class='op'>=</span> <span class='id identifier rubyid_frutas'>frutas</span> <span class='comment'>#muestra si el plato contiene frutas
|
253
|
+
</span><span class='kw'>end</span></pre>
|
254
|
+
</td>
|
255
|
+
</tr>
|
256
|
+
</table>
|
257
|
+
</div>
|
258
|
+
|
259
|
+
<div class="method_details ">
|
260
|
+
<h3 class="signature " id="to_s-instance_method">
|
261
|
+
|
262
|
+
#<strong>to_s</strong> ⇒ <tt>Object</tt>
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</h3><div class="docstring">
|
269
|
+
<div class="discussion">
|
270
|
+
|
271
|
+
<p>devuelve la salida con todos los datos</p>
|
272
|
+
|
273
|
+
|
274
|
+
</div>
|
275
|
+
</div>
|
276
|
+
<div class="tags">
|
277
|
+
|
278
|
+
|
279
|
+
</div><table class="source_code">
|
280
|
+
<tr>
|
281
|
+
<td>
|
282
|
+
<pre class="lines">
|
283
|
+
|
284
|
+
|
285
|
+
122
|
286
|
+
123
|
287
|
+
124
|
288
|
+
125
|
289
|
+
126
|
290
|
+
127
|
291
|
+
128
|
292
|
+
129
|
293
|
+
130
|
294
|
+
131
|
295
|
+
132
|
296
|
+
133
|
297
|
+
134
|
298
|
+
135
|
299
|
+
136
|
300
|
+
137
|
301
|
+
138
|
302
|
+
139</pre>
|
303
|
+
</td>
|
304
|
+
<td>
|
305
|
+
<pre class="code"><span class="info file"># File 'lib/pract07/Dieta.rb', line 122</span>
|
306
|
+
|
307
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span> <span class='comment'>#devuelve la salida con todos los datos
|
308
|
+
</span> <span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='kw'>super</span>
|
309
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
310
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Contiene: </span><span class='tstring_end'>"</span></span>
|
311
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='ivar'>@verduras</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='ivar'>@verduras</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
|
312
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Verduras, </span><span class='tstring_end'>"</span></span>
|
313
|
+
<span class='kw'>end</span>
|
314
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='ivar'>@leche</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='ivar'>@leche</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
|
315
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Leche, </span><span class='tstring_end'>"</span></span>
|
316
|
+
<span class='kw'>end</span>
|
317
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='ivar'>@cereales</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='ivar'>@cereales</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
|
318
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Cereales, </span><span class='tstring_end'>"</span></span>
|
319
|
+
<span class='kw'>end</span>
|
320
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='ivar'>@frutas</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='ivar'>@frutas</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
|
321
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Frutas.</span><span class='tstring_end'>"</span></span>
|
322
|
+
<span class='kw'>end</span>
|
323
|
+
<span class='id identifier rubyid_s'>s</span>
|
324
|
+
<span class='kw'>end</span></pre>
|
325
|
+
</td>
|
326
|
+
</tr>
|
327
|
+
</table>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
</div>
|
331
|
+
|
332
|
+
</div>
|
333
|
+
|
334
|
+
<div id="footer">
|
335
|
+
Generated on Wed Nov 23 12:53:02 2016 by
|
336
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
337
|
+
0.9.5 (ruby-2.3.0).
|
338
|
+
</div>
|
339
|
+
|
340
|
+
</div>
|
341
|
+
</body>
|
342
|
+
</html>
|