P06axz 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 +1 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/P06.gemspec +44 -0
- data/README.md +7 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/Alimento.html +825 -0
- data/doc/Alimento_concreto.html +396 -0
- data/doc/List.html +858 -0
- data/doc/Node.html +423 -0
- data/doc/P06.html +117 -0
- data/doc/_index.html +151 -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 +492 -0
- data/doc/file.README.html +78 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +78 -0
- data/doc/js/app.js +248 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +243 -0
- data/doc/top-level-namespace.html +112 -0
- data/docs/Alimento.html +682 -0
- data/docs/Alimento_concreto.html +389 -0
- data/docs/List.html +858 -0
- data/docs/Node.html +423 -0
- data/docs/P06.html +117 -0
- data/docs/_index.html +151 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +492 -0
- data/docs/file.README.html +79 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +79 -0
- data/docs/js/app.js +248 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +227 -0
- data/docs/top-level-namespace.html +112 -0
- data/lib/P06.rb +11 -0
- data/lib/P06/alimento.rb +37 -0
- data/lib/P06/version.rb +3 -0
- data/lib/P07/alimento_concreto.rb +10 -0
- data/lib/P07/list.rb +80 -0
- data/lib/P08/alimento_concreto.rb +25 -0
- data/lib/P08/list.rb +108 -0
- data/lib/P10/modified_array.rb +29 -0
- data/lib/P11/alimento.rb +29 -0
- data/lib/P11/plato.rb +108 -0
- data/lib/P11/porciones.rb +31 -0
- metadata +233 -0
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
Top Level Namespace
|
|
8
|
+
|
|
9
|
+
— 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 = "";
|
|
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> »
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<span class="title">Top Level Namespace</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>Top Level Namespace
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<h2>Defined Under Namespace</h2>
|
|
82
|
+
<p class="children">
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="P06.html" title="P06 (module)">P06</a></span>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Alimento.html" title="Alimento (class)">Alimento</a></span>, <span class='object_link'><a href="Alimento_concreto.html" title="Alimento_concreto (class)">Alimento_concreto</a></span>, <span class='object_link'><a href="List.html" title="List (class)">List</a></span>, <span class='object_link'><a href="Node.html" title="Node (class)">Node</a></span>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div id="footer">
|
|
105
|
+
Generated on Wed Nov 22 11:59:57 2017 by
|
|
106
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
107
|
+
0.9.9 (ruby-2.3.0).
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
</div>
|
|
111
|
+
</body>
|
|
112
|
+
</html>
|
data/docs/Alimento.html
ADDED
|
@@ -0,0 +1,682 @@
|
|
|
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
|
|
8
|
+
|
|
9
|
+
— 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";
|
|
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> »
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<span class="title">Alimento</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
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName">Object</span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">Alimento</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/P06/alimento.rb</dd>
|
|
98
|
+
</dl>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
|
103
|
+
<div class="discussion">
|
|
104
|
+
|
|
105
|
+
<p>Esta clase permite representar la información básica de un alimento dado,
|
|
106
|
+
sus proteinas, glúcidos y lípidos además, calcula el índice calórico del
|
|
107
|
+
mismo.</p>
|
|
108
|
+
<dl class="rdoc-list note-list"><dt>Author
|
|
109
|
+
<dd>
|
|
110
|
+
<p>Alberto González (<a
|
|
111
|
+
href="mailto:alu0100949568@ull.edu.es">alu0100949568@ull.edu.es</a>)</p>
|
|
112
|
+
</dd><dt>Copyright
|
|
113
|
+
<dd>
|
|
114
|
+
<p>Cretive Commons</p>
|
|
115
|
+
</dd><dt>License
|
|
116
|
+
<dd>
|
|
117
|
+
<p>Distributes under the same terms as Ruby</p>
|
|
118
|
+
</dd></dl>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="tags">
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
</div><div id="subclasses">
|
|
127
|
+
<h2>Direct Known Subclasses</h2>
|
|
128
|
+
<p class="children"><span class='object_link'><a href="Alimento_concreto.html" title="Alimento_concreto (class)">Alimento_concreto</a></span></p>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
135
|
+
<ul class="summary">
|
|
136
|
+
|
|
137
|
+
<li class="public ">
|
|
138
|
+
<span class="summary_signature">
|
|
139
|
+
|
|
140
|
+
<a href="#cal_index-instance_method" title="#cal_index (instance method)">#<strong>cal_index</strong> ⇒ Object </a>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
</span>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<span class="note title readonly">readonly</span>
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<span class="summary_desc"><div class='inline'>
|
|
160
|
+
<p>Returns the value of attribute cal_index.</p>
|
|
161
|
+
</div></span>
|
|
162
|
+
|
|
163
|
+
</li>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
<li class="public ">
|
|
167
|
+
<span class="summary_signature">
|
|
168
|
+
|
|
169
|
+
<a href="#gluc-instance_method" title="#gluc (instance method)">#<strong>gluc</strong> ⇒ Object </a>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
</span>
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<span class="note title readonly">readonly</span>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
<span class="summary_desc"><div class='inline'>
|
|
189
|
+
<p>Returns the value of attribute gluc.</p>
|
|
190
|
+
</div></span>
|
|
191
|
+
|
|
192
|
+
</li>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<li class="public ">
|
|
196
|
+
<span class="summary_signature">
|
|
197
|
+
|
|
198
|
+
<a href="#lip-instance_method" title="#lip (instance method)">#<strong>lip</strong> ⇒ Object </a>
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
</span>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
<span class="note title readonly">readonly</span>
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
<span class="summary_desc"><div class='inline'>
|
|
218
|
+
<p>Returns the value of attribute lip.</p>
|
|
219
|
+
</div></span>
|
|
220
|
+
|
|
221
|
+
</li>
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
<li class="public ">
|
|
225
|
+
<span class="summary_signature">
|
|
226
|
+
|
|
227
|
+
<a href="#nom-instance_method" title="#nom (instance method)">#<strong>nom</strong> ⇒ Object </a>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
</span>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
<span class="note title readonly">readonly</span>
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<span class="summary_desc"><div class='inline'>
|
|
247
|
+
<p>Returns the value of attribute nom.</p>
|
|
248
|
+
</div></span>
|
|
249
|
+
|
|
250
|
+
</li>
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
<li class="public ">
|
|
254
|
+
<span class="summary_signature">
|
|
255
|
+
|
|
256
|
+
<a href="#prot-instance_method" title="#prot (instance method)">#<strong>prot</strong> ⇒ Object </a>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
</span>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<span class="note title readonly">readonly</span>
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
<span class="summary_desc"><div class='inline'>
|
|
276
|
+
<p>Returns the value of attribute prot.</p>
|
|
277
|
+
</div></span>
|
|
278
|
+
|
|
279
|
+
</li>
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
</ul>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
<h2>
|
|
289
|
+
Instance Method Summary
|
|
290
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
291
|
+
</h2>
|
|
292
|
+
|
|
293
|
+
<ul class="summary">
|
|
294
|
+
|
|
295
|
+
<li class="public ">
|
|
296
|
+
<span class="summary_signature">
|
|
297
|
+
|
|
298
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(nom, prot, gluc, lip) ⇒ Alimento </a>
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
</span>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
<span class="note title constructor">constructor</span>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
<span class="summary_desc"><div class='inline'>
|
|
315
|
+
<p>Se asigna el nombre y la información nutricional del alimento.</p>
|
|
316
|
+
</div></span>
|
|
317
|
+
|
|
318
|
+
</li>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
<li class="public ">
|
|
322
|
+
<span class="summary_signature">
|
|
323
|
+
|
|
324
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ Object </a>
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
</span>
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
<span class="summary_desc"><div class='inline'>
|
|
339
|
+
<p>Muestra la información de un alimento en concreto.</p>
|
|
340
|
+
</div></span>
|
|
341
|
+
|
|
342
|
+
</li>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
</ul>
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
<div id="constructor_details" class="method_details_list">
|
|
349
|
+
<h2>Constructor Details</h2>
|
|
350
|
+
|
|
351
|
+
<div class="method_details first">
|
|
352
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
353
|
+
|
|
354
|
+
#<strong>initialize</strong>(nom, prot, gluc, lip) ⇒ <tt><span class='object_link'><a href="" title="Alimento (class)">Alimento</a></span></tt>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
</h3><div class="docstring">
|
|
361
|
+
<div class="discussion">
|
|
362
|
+
|
|
363
|
+
<p>Se asigna el nombre y la información nutricional del alimento</p>
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
<div class="tags">
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
</div><table class="source_code">
|
|
372
|
+
<tr>
|
|
373
|
+
<td>
|
|
374
|
+
<pre class="lines">
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
12
|
|
378
|
+
13
|
|
379
|
+
14
|
|
380
|
+
15
|
|
381
|
+
16
|
|
382
|
+
17
|
|
383
|
+
18</pre>
|
|
384
|
+
</td>
|
|
385
|
+
<td>
|
|
386
|
+
<pre class="code"><span class="info file"># File 'lib/P06/alimento.rb', line 12</span>
|
|
387
|
+
|
|
388
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_nom'>nom</span><span class='comma'>,</span> <span class='id identifier rubyid_prot'>prot</span><span class='comma'>,</span> <span class='id identifier rubyid_gluc'>gluc</span><span class='comma'>,</span> <span class='id identifier rubyid_lip'>lip</span><span class='rparen'>)</span>
|
|
389
|
+
<span class='ivar'>@nom</span> <span class='op'>=</span> <span class='id identifier rubyid_nom'>nom</span>
|
|
390
|
+
<span class='ivar'>@prot</span> <span class='op'>=</span> <span class='id identifier rubyid_prot'>prot</span>
|
|
391
|
+
<span class='ivar'>@gluc</span> <span class='op'>=</span> <span class='id identifier rubyid_gluc'>gluc</span>
|
|
392
|
+
<span class='ivar'>@lip</span> <span class='op'>=</span> <span class='id identifier rubyid_lip'>lip</span>
|
|
393
|
+
<span class='ivar'>@cal_index</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='ivar'>@prot</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span><span class='op'>*</span><span class='int'>4</span> <span class='op'>+</span> <span class='ivar'>@gluc</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span><span class='op'>*</span><span class='int'>4</span> <span class='op'>+</span> <span class='ivar'>@lip</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span><span class='op'>*</span><span class='int'>9</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
|
|
394
|
+
<span class='kw'>end</span></pre>
|
|
395
|
+
</td>
|
|
396
|
+
</tr>
|
|
397
|
+
</table>
|
|
398
|
+
</div>
|
|
399
|
+
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<div id="instance_attr_details" class="attr_details">
|
|
403
|
+
<h2>Instance Attribute Details</h2>
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
<span id=""></span>
|
|
407
|
+
<div class="method_details first">
|
|
408
|
+
<h3 class="signature first" id="cal_index-instance_method">
|
|
409
|
+
|
|
410
|
+
#<strong>cal_index</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
</h3><div class="docstring">
|
|
417
|
+
<div class="discussion">
|
|
418
|
+
|
|
419
|
+
<p>Returns the value of attribute cal_index</p>
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
<div class="tags">
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
</div><table class="source_code">
|
|
428
|
+
<tr>
|
|
429
|
+
<td>
|
|
430
|
+
<pre class="lines">
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
9
|
|
434
|
+
10
|
|
435
|
+
11</pre>
|
|
436
|
+
</td>
|
|
437
|
+
<td>
|
|
438
|
+
<pre class="code"><span class="info file"># File 'lib/P06/alimento.rb', line 9</span>
|
|
439
|
+
|
|
440
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cal_index'>cal_index</span>
|
|
441
|
+
<span class='ivar'>@cal_index</span>
|
|
442
|
+
<span class='kw'>end</span></pre>
|
|
443
|
+
</td>
|
|
444
|
+
</tr>
|
|
445
|
+
</table>
|
|
446
|
+
</div>
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
<span id=""></span>
|
|
450
|
+
<div class="method_details ">
|
|
451
|
+
<h3 class="signature " id="gluc-instance_method">
|
|
452
|
+
|
|
453
|
+
#<strong>gluc</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
</h3><div class="docstring">
|
|
460
|
+
<div class="discussion">
|
|
461
|
+
|
|
462
|
+
<p>Returns the value of attribute gluc</p>
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
</div>
|
|
466
|
+
</div>
|
|
467
|
+
<div class="tags">
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
</div><table class="source_code">
|
|
471
|
+
<tr>
|
|
472
|
+
<td>
|
|
473
|
+
<pre class="lines">
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
9
|
|
477
|
+
10
|
|
478
|
+
11</pre>
|
|
479
|
+
</td>
|
|
480
|
+
<td>
|
|
481
|
+
<pre class="code"><span class="info file"># File 'lib/P06/alimento.rb', line 9</span>
|
|
482
|
+
|
|
483
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_gluc'>gluc</span>
|
|
484
|
+
<span class='ivar'>@gluc</span>
|
|
485
|
+
<span class='kw'>end</span></pre>
|
|
486
|
+
</td>
|
|
487
|
+
</tr>
|
|
488
|
+
</table>
|
|
489
|
+
</div>
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
<span id=""></span>
|
|
493
|
+
<div class="method_details ">
|
|
494
|
+
<h3 class="signature " id="lip-instance_method">
|
|
495
|
+
|
|
496
|
+
#<strong>lip</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
</h3><div class="docstring">
|
|
503
|
+
<div class="discussion">
|
|
504
|
+
|
|
505
|
+
<p>Returns the value of attribute lip</p>
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
<div class="tags">
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
</div><table class="source_code">
|
|
514
|
+
<tr>
|
|
515
|
+
<td>
|
|
516
|
+
<pre class="lines">
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
9
|
|
520
|
+
10
|
|
521
|
+
11</pre>
|
|
522
|
+
</td>
|
|
523
|
+
<td>
|
|
524
|
+
<pre class="code"><span class="info file"># File 'lib/P06/alimento.rb', line 9</span>
|
|
525
|
+
|
|
526
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_lip'>lip</span>
|
|
527
|
+
<span class='ivar'>@lip</span>
|
|
528
|
+
<span class='kw'>end</span></pre>
|
|
529
|
+
</td>
|
|
530
|
+
</tr>
|
|
531
|
+
</table>
|
|
532
|
+
</div>
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
<span id=""></span>
|
|
536
|
+
<div class="method_details ">
|
|
537
|
+
<h3 class="signature " id="nom-instance_method">
|
|
538
|
+
|
|
539
|
+
#<strong>nom</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
</h3><div class="docstring">
|
|
546
|
+
<div class="discussion">
|
|
547
|
+
|
|
548
|
+
<p>Returns the value of attribute nom</p>
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
<div class="tags">
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
</div><table class="source_code">
|
|
557
|
+
<tr>
|
|
558
|
+
<td>
|
|
559
|
+
<pre class="lines">
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
9
|
|
563
|
+
10
|
|
564
|
+
11</pre>
|
|
565
|
+
</td>
|
|
566
|
+
<td>
|
|
567
|
+
<pre class="code"><span class="info file"># File 'lib/P06/alimento.rb', line 9</span>
|
|
568
|
+
|
|
569
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_nom'>nom</span>
|
|
570
|
+
<span class='ivar'>@nom</span>
|
|
571
|
+
<span class='kw'>end</span></pre>
|
|
572
|
+
</td>
|
|
573
|
+
</tr>
|
|
574
|
+
</table>
|
|
575
|
+
</div>
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
<span id=""></span>
|
|
579
|
+
<div class="method_details ">
|
|
580
|
+
<h3 class="signature " id="prot-instance_method">
|
|
581
|
+
|
|
582
|
+
#<strong>prot</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
</h3><div class="docstring">
|
|
589
|
+
<div class="discussion">
|
|
590
|
+
|
|
591
|
+
<p>Returns the value of attribute prot</p>
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
</div>
|
|
595
|
+
</div>
|
|
596
|
+
<div class="tags">
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
</div><table class="source_code">
|
|
600
|
+
<tr>
|
|
601
|
+
<td>
|
|
602
|
+
<pre class="lines">
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
9
|
|
606
|
+
10
|
|
607
|
+
11</pre>
|
|
608
|
+
</td>
|
|
609
|
+
<td>
|
|
610
|
+
<pre class="code"><span class="info file"># File 'lib/P06/alimento.rb', line 9</span>
|
|
611
|
+
|
|
612
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prot'>prot</span>
|
|
613
|
+
<span class='ivar'>@prot</span>
|
|
614
|
+
<span class='kw'>end</span></pre>
|
|
615
|
+
</td>
|
|
616
|
+
</tr>
|
|
617
|
+
</table>
|
|
618
|
+
</div>
|
|
619
|
+
|
|
620
|
+
</div>
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
<div id="instance_method_details" class="method_details_list">
|
|
624
|
+
<h2>Instance Method Details</h2>
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
<div class="method_details first">
|
|
628
|
+
<h3 class="signature first" id="to_s-instance_method">
|
|
629
|
+
|
|
630
|
+
#<strong>to_s</strong> ⇒ <tt>Object</tt>
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
</h3><div class="docstring">
|
|
637
|
+
<div class="discussion">
|
|
638
|
+
|
|
639
|
+
<p>Muestra la información de un alimento en concreto</p>
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
</div>
|
|
643
|
+
</div>
|
|
644
|
+
<div class="tags">
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
</div><table class="source_code">
|
|
648
|
+
<tr>
|
|
649
|
+
<td>
|
|
650
|
+
<pre class="lines">
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
21
|
|
654
|
+
22
|
|
655
|
+
23
|
|
656
|
+
24</pre>
|
|
657
|
+
</td>
|
|
658
|
+
<td>
|
|
659
|
+
<pre class="code"><span class="info file"># File 'lib/P06/alimento.rb', line 21</span>
|
|
660
|
+
|
|
661
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
|
662
|
+
<span class='comment'>#El huevo frito tiene 14.1 proteinas, 0.0 glúcidos, 19.5 lípidos
|
|
663
|
+
</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='ivar'>@nom</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@prot</span><span class='embexpr_end'>}</span><span class='tstring_content'> proteinas, </span><span class='embexpr_beg'>#{</span><span class='ivar'>@gluc</span><span class='embexpr_end'>}</span><span class='tstring_content'> glúcidos, </span><span class='embexpr_beg'>#{</span><span class='ivar'>@lip</span><span class='embexpr_end'>}</span><span class='tstring_content'> lípidos, </span><span class='embexpr_beg'>#{</span><span class='ivar'>@cal_index</span><span class='embexpr_end'>}</span><span class='tstring_content'> calorías</span><span class='tstring_end'>"</span></span>
|
|
664
|
+
<span class='kw'>end</span></pre>
|
|
665
|
+
</td>
|
|
666
|
+
</tr>
|
|
667
|
+
</table>
|
|
668
|
+
</div>
|
|
669
|
+
|
|
670
|
+
</div>
|
|
671
|
+
|
|
672
|
+
</div>
|
|
673
|
+
|
|
674
|
+
<div id="footer">
|
|
675
|
+
Generated on Wed Nov 15 11:53:20 2017 by
|
|
676
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
677
|
+
0.9.9 (ruby-2.3.0).
|
|
678
|
+
</div>
|
|
679
|
+
|
|
680
|
+
</div>
|
|
681
|
+
</body>
|
|
682
|
+
</html>
|