P06 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.
@@ -0,0 +1,459 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Alimento_concreto
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Alimento_concreto";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (A)</a> &raquo;
40
+
41
+
42
+ <span class="title">Alimento_concreto</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Alimento_concreto
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Alimento.html" title="Alimento (class)">Alimento</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Alimento.html" title="Alimento (class)">Alimento</a></span></li>
78
+
79
+ <li class="next">Alimento_concreto</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+ <dl>
93
+ <dt>Includes:</dt>
94
+ <dd>Comparable</dd>
95
+ </dl>
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <dl>
103
+ <dt>Defined in:</dt>
104
+ <dd>lib/P06/alimento_concreto.rb</dd>
105
+ </dl>
106
+
107
+ </div>
108
+
109
+ <h2>Overview</h2><div class="docstring">
110
+ <div class="discussion">
111
+
112
+ <p>Esta clase es una clase heredada de alimento que contiene también el grupo
113
+ del alimento. Se ha incluido el módulo Comparable</p>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+
123
+
124
+
125
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#grupo-instance_method" title="#grupo (instance method)">#<strong>grupo</strong> &#x21d2; Object </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'>
149
+ <p>Returns the value of attribute grupo.</p>
150
+ </div></span>
151
+
152
+ </li>
153
+
154
+
155
+ </ul>
156
+
157
+
158
+
159
+
160
+
161
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Alimento.html" title="Alimento (class)">Alimento</a></span></h3>
162
+ <p class="inherited"><span class='object_link'><a href="Alimento.html#glucidos-instance_method" title="Alimento#glucidos (method)">#glucidos</a></span>, <span class='object_link'><a href="Alimento.html#grasas-instance_method" title="Alimento#grasas (method)">#grasas</a></span>, <span class='object_link'><a href="Alimento.html#nombre-instance_method" title="Alimento#nombre (method)">#nombre</a></span>, <span class='object_link'><a href="Alimento.html#proteinas-instance_method" title="Alimento#proteinas (method)">#proteinas</a></span></p>
163
+
164
+
165
+
166
+ <h2>
167
+ Instance Method Summary
168
+ <small><a href="#" class="summary_toggle">collapse</a></small>
169
+ </h2>
170
+
171
+ <ul class="summary">
172
+
173
+ <li class="public ">
174
+ <span class="summary_signature">
175
+
176
+ <a href="#<=>-instance_method" title="#&lt;=&gt; (instance method)">#<strong>&lt;=&gt;</strong>(another) &#x21d2; Object </a>
177
+
178
+
179
+
180
+ </span>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+ <span class="summary_desc"><div class='inline'>
191
+ <p>Este metodo se encarga de realizar las comparaciones.</p>
192
+ </div></span>
193
+
194
+ </li>
195
+
196
+
197
+ <li class="public ">
198
+ <span class="summary_signature">
199
+
200
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(grupo, nombre, proteinas, glucidos, grasas) &#x21d2; Alimento_concreto </a>
201
+
202
+
203
+
204
+ </span>
205
+
206
+
207
+ <span class="note title constructor">constructor</span>
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'>
217
+ <p>Se asigna el grupo del alimento y los otros datos del alimento se le pasa
218
+ al initialize de Alimento.</p>
219
+ </div></span>
220
+
221
+ </li>
222
+
223
+
224
+ <li class="public ">
225
+ <span class="summary_signature">
226
+
227
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
228
+
229
+
230
+
231
+ </span>
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+ <span class="summary_desc"><div class='inline'>
242
+ <p>Este metodo se encarga de mostrar al alimento por pantalla.</p>
243
+ </div></span>
244
+
245
+ </li>
246
+
247
+
248
+ </ul>
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Alimento.html" title="Alimento (class)">Alimento</a></span></h3>
262
+ <p class="inherited"><span class='object_link'><a href="Alimento.html#AIBC-instance_method" title="Alimento#AIBC (method)">#AIBC</a></span>, <span class='object_link'><a href="Alimento.html#calorias-instance_method" title="Alimento#calorias (method)">#calorias</a></span>, <span class='object_link'><a href="Alimento.html#formateado-instance_method" title="Alimento#formateado (method)">#formateado</a></span>, <span class='object_link'><a href="Alimento.html#neg-instance_method" title="Alimento#neg (method)">#neg</a></span></p>
263
+ <div id="constructor_details" class="method_details_list">
264
+ <h2>Constructor Details</h2>
265
+
266
+ <div class="method_details first">
267
+ <h3 class="signature first" id="initialize-instance_method">
268
+
269
+ #<strong>initialize</strong>(grupo, nombre, proteinas, glucidos, grasas) &#x21d2; <tt><span class='object_link'><a href="" title="Alimento_concreto (class)">Alimento_concreto</a></span></tt>
270
+
271
+
272
+
273
+
274
+
275
+ </h3><div class="docstring">
276
+ <div class="discussion">
277
+
278
+ <p>Se asigna el grupo del alimento y los otros datos del alimento se le pasa
279
+ al initialize de Alimento</p>
280
+
281
+
282
+ </div>
283
+ </div>
284
+ <div class="tags">
285
+
286
+
287
+ </div><table class="source_code">
288
+ <tr>
289
+ <td>
290
+ <pre class="lines">
291
+
292
+
293
+ 13
294
+ 14
295
+ 15
296
+ 16</pre>
297
+ </td>
298
+ <td>
299
+ <pre class="code"><span class="info file"># File 'lib/P06/alimento_concreto.rb', line 13</span>
300
+
301
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='lparen'>(</span><span class='id identifier rubyid_grupo'>grupo</span><span class='comma'>,</span><span class='id identifier rubyid_nombre'>nombre</span><span class='comma'>,</span><span class='id identifier rubyid_proteinas'>proteinas</span><span class='comma'>,</span><span class='id identifier rubyid_glucidos'>glucidos</span><span class='comma'>,</span><span class='id identifier rubyid_grasas'>grasas</span><span class='rparen'>)</span>
302
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_nombre'>nombre</span><span class='comma'>,</span><span class='id identifier rubyid_proteinas'>proteinas</span><span class='comma'>,</span><span class='id identifier rubyid_glucidos'>glucidos</span><span class='comma'>,</span><span class='id identifier rubyid_grasas'>grasas</span><span class='comma'>,</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
303
+ <span class='ivar'>@grupo</span> <span class='op'>=</span> <span class='id identifier rubyid_grupo'>grupo</span>
304
+ <span class='kw'>end</span></pre>
305
+ </td>
306
+ </tr>
307
+ </table>
308
+ </div>
309
+
310
+ </div>
311
+
312
+ <div id="instance_attr_details" class="attr_details">
313
+ <h2>Instance Attribute Details</h2>
314
+
315
+
316
+ <span id="grupo=-instance_method"></span>
317
+ <div class="method_details first">
318
+ <h3 class="signature first" id="grupo-instance_method">
319
+
320
+ #<strong>grupo</strong> &#x21d2; <tt>Object</tt>
321
+
322
+
323
+
324
+
325
+
326
+ </h3><div class="docstring">
327
+ <div class="discussion">
328
+
329
+ <p>Returns the value of attribute grupo</p>
330
+
331
+
332
+ </div>
333
+ </div>
334
+ <div class="tags">
335
+
336
+
337
+ </div><table class="source_code">
338
+ <tr>
339
+ <td>
340
+ <pre class="lines">
341
+
342
+
343
+ 9
344
+ 10
345
+ 11</pre>
346
+ </td>
347
+ <td>
348
+ <pre class="code"><span class="info file"># File 'lib/P06/alimento_concreto.rb', line 9</span>
349
+
350
+ <span class='kw'>def</span> <span class='id identifier rubyid_grupo'>grupo</span>
351
+ <span class='ivar'>@grupo</span>
352
+ <span class='kw'>end</span></pre>
353
+ </td>
354
+ </tr>
355
+ </table>
356
+ </div>
357
+
358
+ </div>
359
+
360
+
361
+ <div id="instance_method_details" class="method_details_list">
362
+ <h2>Instance Method Details</h2>
363
+
364
+
365
+ <div class="method_details first">
366
+ <h3 class="signature first" id="<=>-instance_method">
367
+
368
+ #<strong>&lt;=&gt;</strong>(another) &#x21d2; <tt>Object</tt>
369
+
370
+
371
+
372
+
373
+
374
+ </h3><div class="docstring">
375
+ <div class="discussion">
376
+
377
+ <p>Este metodo se encarga de realizar las comparaciones.</p>
378
+
379
+
380
+ </div>
381
+ </div>
382
+ <div class="tags">
383
+
384
+
385
+ </div><table class="source_code">
386
+ <tr>
387
+ <td>
388
+ <pre class="lines">
389
+
390
+
391
+ 20
392
+ 21
393
+ 22</pre>
394
+ </td>
395
+ <td>
396
+ <pre class="code"><span class="info file"># File 'lib/P06/alimento_concreto.rb', line 20</span>
397
+
398
+ <span class='kw'>def</span> <span class='op'>&lt;=&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_another'>another</span><span class='rparen'>)</span>
399
+ <span class='id identifier rubyid_calorias'>calorias</span> <span class='op'>&lt;=&gt;</span> <span class='id identifier rubyid_another'>another</span><span class='period'>.</span><span class='id identifier rubyid_calorias'>calorias</span>
400
+ <span class='kw'>end</span></pre>
401
+ </td>
402
+ </tr>
403
+ </table>
404
+ </div>
405
+
406
+ <div class="method_details ">
407
+ <h3 class="signature " id="to_s-instance_method">
408
+
409
+ #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
410
+
411
+
412
+
413
+
414
+
415
+ </h3><div class="docstring">
416
+ <div class="discussion">
417
+
418
+ <p>Este metodo se encarga de mostrar al alimento por pantalla.</p>
419
+
420
+
421
+ </div>
422
+ </div>
423
+ <div class="tags">
424
+
425
+
426
+ </div><table class="source_code">
427
+ <tr>
428
+ <td>
429
+ <pre class="lines">
430
+
431
+
432
+ 26
433
+ 27
434
+ 28</pre>
435
+ </td>
436
+ <td>
437
+ <pre class="code"><span class="info file"># File 'lib/P06/alimento_concreto.rb', line 26</span>
438
+
439
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
440
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Grupo: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@grupo</span><span class='embexpr_end'>}</span><span class='tstring_content'>\t</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Nombre: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@nombre</span><span class='embexpr_end'>}</span><span class='tstring_content'>\t</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Proteínas: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@proteinas</span><span class='embexpr_end'>}</span><span class='tstring_content'>\t</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Glúcidos: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@glucidos</span><span class='embexpr_end'>}</span><span class='tstring_content'>\t</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Grasas: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@grasas</span><span class='embexpr_end'>}</span><span class='tstring_content'>\t</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Calorias: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_calorias'>calorias</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
441
+ <span class='kw'>end</span></pre>
442
+ </td>
443
+ </tr>
444
+ </table>
445
+ </div>
446
+
447
+ </div>
448
+
449
+ </div>
450
+
451
+ <div id="footer">
452
+ Generated on Tue Nov 28 18:13:07 2017 by
453
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
454
+ 0.9.9 (ruby-2.3.0).
455
+ </div>
456
+
457
+ </div>
458
+ </body>
459
+ </html>