alimentos_diego_algomas 0.1.3

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.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +12 -0
  4. data/.rspec +3 -0
  5. data/.travis.yml +7 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +97 -0
  8. data/Guardfile +83 -0
  9. data/README.md +57 -0
  10. data/Rakefile +6 -0
  11. data/alimentos.gemspec +38 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/docs/Alimentos.html +115 -0
  15. data/docs/Alimentos/Alimentos.html +376 -0
  16. data/docs/Alimentos/Error.html +106 -0
  17. data/docs/Gemfile.html +99 -0
  18. data/docs/Gemfile_lock.html +180 -0
  19. data/docs/Guardfile.html +166 -0
  20. data/docs/List.html +120 -0
  21. data/docs/List/Error.html +106 -0
  22. data/docs/List/List.html +495 -0
  23. data/docs/Menu.html +115 -0
  24. data/docs/Menu/Error.html +106 -0
  25. data/docs/Menu/Menu.html +512 -0
  26. data/docs/Object.html +199 -0
  27. data/docs/Plato.html +115 -0
  28. data/docs/Plato/Error.html +106 -0
  29. data/docs/Plato/Plato.html +478 -0
  30. data/docs/Plato/PlatoAmbiental.html +374 -0
  31. data/docs/README_md.html +155 -0
  32. data/docs/Rakefile.html +101 -0
  33. data/docs/bin/setup.html +101 -0
  34. data/docs/created.rid +17 -0
  35. data/docs/css/fonts.css +167 -0
  36. data/docs/css/rdoc.css +619 -0
  37. data/docs/fonts/Lato-Light.ttf +0 -0
  38. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  39. data/docs/fonts/Lato-Regular.ttf +0 -0
  40. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  41. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  42. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  43. data/docs/images/add.png +0 -0
  44. data/docs/images/arrow_up.png +0 -0
  45. data/docs/images/brick.png +0 -0
  46. data/docs/images/brick_link.png +0 -0
  47. data/docs/images/bug.png +0 -0
  48. data/docs/images/bullet_black.png +0 -0
  49. data/docs/images/bullet_toggle_minus.png +0 -0
  50. data/docs/images/bullet_toggle_plus.png +0 -0
  51. data/docs/images/date.png +0 -0
  52. data/docs/images/delete.png +0 -0
  53. data/docs/images/find.png +0 -0
  54. data/docs/images/loadingAnimation.gif +0 -0
  55. data/docs/images/macFFBgHack.png +0 -0
  56. data/docs/images/package.png +0 -0
  57. data/docs/images/page_green.png +0 -0
  58. data/docs/images/page_white_text.png +0 -0
  59. data/docs/images/page_white_width.png +0 -0
  60. data/docs/images/plugin.png +0 -0
  61. data/docs/images/ruby.png +0 -0
  62. data/docs/images/tag_blue.png +0 -0
  63. data/docs/images/tag_green.png +0 -0
  64. data/docs/images/transparent.png +0 -0
  65. data/docs/images/wrench.png +0 -0
  66. data/docs/images/wrench_orange.png +0 -0
  67. data/docs/images/zoom.png +0 -0
  68. data/docs/index.html +132 -0
  69. data/docs/js/darkfish.js +84 -0
  70. data/docs/js/navigation.js +105 -0
  71. data/docs/js/navigation.js.gz +0 -0
  72. data/docs/js/search.js +110 -0
  73. data/docs/js/search_index.js +1 -0
  74. data/docs/js/search_index.js.gz +0 -0
  75. data/docs/js/searcher.js +229 -0
  76. data/docs/js/searcher.js.gz +0 -0
  77. data/docs/table_of_contents.html +345 -0
  78. data/lib/alimentos.rb +29 -0
  79. data/lib/alimentos/alimentos.rb +36 -0
  80. data/lib/alimentos/dsl.rb +123 -0
  81. data/lib/alimentos/dslmenu.rb +60 -0
  82. data/lib/alimentos/list.rb +104 -0
  83. data/lib/alimentos/menu.rb +62 -0
  84. data/lib/alimentos/plato.rb +93 -0
  85. data/lib/alimentos/platoAmbiental.rb +64 -0
  86. data/lib/alimentos/version.rb +15 -0
  87. metadata +243 -0
@@ -0,0 +1,115 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Menu - 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/navigation.js" defer></script>
15
+ <script src="./js/search.js" defer></script>
16
+ <script src="./js/search_index.js" defer></script>
17
+ <script src="./js/searcher.js" defer></script>
18
+ <script src="./js/darkfish.js" defer></script>
19
+
20
+ <link href="./css/fonts.css" rel="stylesheet">
21
+ <link href="./css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+
25
+
26
+ <body id="top" role="document" class="module">
27
+ <nav role="navigation">
28
+ <div id="project-navigation">
29
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
30
+ <h2>
31
+ <a href="./index.html" rel="home">Home</a>
32
+ </h2>
33
+
34
+ <div id="table-of-contents-navigation">
35
+ <a href="./table_of_contents.html#pages">Pages</a>
36
+ <a href="./table_of_contents.html#classes">Classes</a>
37
+ <a href="./table_of_contents.html#methods">Methods</a>
38
+ </div>
39
+ </div>
40
+
41
+ <div id="search-section" role="search" class="project-section initially-hidden">
42
+ <form action="#" method="get" accept-charset="utf-8">
43
+ <div id="search-field-wrapper">
44
+ <input id="search-field" role="combobox" aria-label="Search"
45
+ aria-autocomplete="list" aria-controls="search-results"
46
+ type="text" name="search" placeholder="Search" spellcheck="false"
47
+ title="Type to search, Up and Down to navigate, Enter to load">
48
+ </div>
49
+
50
+ <ul id="search-results" aria-label="Search Results"
51
+ aria-busy="false" aria-expanded="false"
52
+ aria-atomic="false" class="initially-hidden"></ul>
53
+ </form>
54
+ </div>
55
+
56
+ </div>
57
+
58
+
59
+
60
+ <div id="class-metadata">
61
+
62
+
63
+
64
+
65
+
66
+ </div>
67
+ </nav>
68
+
69
+ <main role="main" aria-labelledby="module-Menu">
70
+ <h1 id="module-Menu" class="module">
71
+ module Menu
72
+ </h1>
73
+
74
+ <section class="description">
75
+
76
+ <p>Modulo donde se encuentra la clase menú (practica 8) Actualemente en desuso</p>
77
+
78
+ </section>
79
+
80
+
81
+ <section id="5Buntitled-5D" class="documentation-section">
82
+
83
+
84
+
85
+
86
+
87
+ <section class="constants-list">
88
+ <header>
89
+ <h3>Constants</h3>
90
+ </header>
91
+ <dl>
92
+
93
+ <dt id="VERSION">VERSION
94
+
95
+ <dd>
96
+
97
+
98
+ </dl>
99
+ </section>
100
+
101
+
102
+
103
+
104
+
105
+ </section>
106
+
107
+ </main>
108
+
109
+
110
+ <footer id="validator-badges" role="contentinfo">
111
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
112
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.0.
113
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
114
+ </footer>
115
+
@@ -0,0 +1,106 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Menu::Error - 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/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+
25
+
26
+ <body id="top" role="document" class="class">
27
+ <nav role="navigation">
28
+ <div id="project-navigation">
29
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
30
+ <h2>
31
+ <a href="../index.html" rel="home">Home</a>
32
+ </h2>
33
+
34
+ <div id="table-of-contents-navigation">
35
+ <a href="../table_of_contents.html#pages">Pages</a>
36
+ <a href="../table_of_contents.html#classes">Classes</a>
37
+ <a href="../table_of_contents.html#methods">Methods</a>
38
+ </div>
39
+ </div>
40
+
41
+ <div id="search-section" role="search" class="project-section initially-hidden">
42
+ <form action="#" method="get" accept-charset="utf-8">
43
+ <div id="search-field-wrapper">
44
+ <input id="search-field" role="combobox" aria-label="Search"
45
+ aria-autocomplete="list" aria-controls="search-results"
46
+ type="text" name="search" placeholder="Search" spellcheck="false"
47
+ title="Type to search, Up and Down to navigate, Enter to load">
48
+ </div>
49
+
50
+ <ul id="search-results" aria-label="Search Results"
51
+ aria-busy="false" aria-expanded="false"
52
+ aria-atomic="false" class="initially-hidden"></ul>
53
+ </form>
54
+ </div>
55
+
56
+ </div>
57
+
58
+
59
+
60
+ <div id="class-metadata">
61
+
62
+ <div id="parent-class-section" class="nav-section">
63
+ <h3>Parent</h3>
64
+
65
+
66
+ <p class="link">StandardError
67
+
68
+ </div>
69
+
70
+
71
+
72
+
73
+ </div>
74
+ </nav>
75
+
76
+ <main role="main" aria-labelledby="class-Menu::Error">
77
+ <h1 id="class-Menu::Error" class="class">
78
+ class Menu::Error
79
+ </h1>
80
+
81
+ <section class="description">
82
+
83
+ </section>
84
+
85
+
86
+ <section id="5Buntitled-5D" class="documentation-section">
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ </section>
97
+
98
+ </main>
99
+
100
+
101
+ <footer id="validator-badges" role="contentinfo">
102
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
103
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.0.
104
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
105
+ </footer>
106
+
@@ -0,0 +1,512 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Menu::Menu - 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/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+
25
+
26
+ <body id="top" role="document" class="class">
27
+ <nav role="navigation">
28
+ <div id="project-navigation">
29
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
30
+ <h2>
31
+ <a href="../index.html" rel="home">Home</a>
32
+ </h2>
33
+
34
+ <div id="table-of-contents-navigation">
35
+ <a href="../table_of_contents.html#pages">Pages</a>
36
+ <a href="../table_of_contents.html#classes">Classes</a>
37
+ <a href="../table_of_contents.html#methods">Methods</a>
38
+ </div>
39
+ </div>
40
+
41
+ <div id="search-section" role="search" class="project-section initially-hidden">
42
+ <form action="#" method="get" accept-charset="utf-8">
43
+ <div id="search-field-wrapper">
44
+ <input id="search-field" role="combobox" aria-label="Search"
45
+ aria-autocomplete="list" aria-controls="search-results"
46
+ type="text" name="search" placeholder="Search" spellcheck="false"
47
+ title="Type to search, Up and Down to navigate, Enter to load">
48
+ </div>
49
+
50
+ <ul id="search-results" aria-label="Search Results"
51
+ aria-busy="false" aria-expanded="false"
52
+ aria-atomic="false" class="initially-hidden"></ul>
53
+ </form>
54
+ </div>
55
+
56
+ </div>
57
+
58
+
59
+
60
+ <div id="class-metadata">
61
+
62
+ <div id="parent-class-section" class="nav-section">
63
+ <h3>Parent</h3>
64
+
65
+
66
+ <p class="link"><a href="../Object.html">Object</a>
67
+
68
+ </div>
69
+
70
+
71
+
72
+ <!-- Method Quickref -->
73
+ <div id="method-list-section" class="nav-section">
74
+ <h3>Methods</h3>
75
+
76
+ <ul class="link-list" role="directory">
77
+
78
+ <li ><a href="#method-c-new">::new</a>
79
+
80
+ <li ><a href="#method-i-3C-3D-3E">#&lt;=&gt;</a>
81
+
82
+ <li ><a href="#method-i-each">#each</a>
83
+
84
+ <li ><a href="#method-i-getCarbohidratos">#getCarbohidratos</a>
85
+
86
+ <li ><a href="#method-i-getKcal">#getKcal</a>
87
+
88
+ <li ><a href="#method-i-getLipidos">#getLipidos</a>
89
+
90
+ <li ><a href="#method-i-getProteinas">#getProteinas</a>
91
+
92
+ <li ><a href="#method-i-to_s">#to_s</a>
93
+
94
+ </ul>
95
+ </div>
96
+
97
+ </div>
98
+ </nav>
99
+
100
+ <main role="main" aria-labelledby="class-Menu::Menu">
101
+ <h1 id="class-Menu::Menu" class="class">
102
+ class Menu::Menu
103
+ </h1>
104
+
105
+ <section class="description">
106
+
107
+ <p>Clase <a href="Menu.html"><code>Menu</code></a> donde se almacenaban una lista con los platos y la suma calórica de os mismos</p>
108
+
109
+ </section>
110
+
111
+
112
+ <section id="5Buntitled-5D" class="documentation-section">
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <section class="attribute-method-details" class="method-section">
121
+ <header>
122
+ <h3>Attributes</h3>
123
+ </header>
124
+
125
+
126
+ <div id="attribute-i-carbohidratos" class="method-detail">
127
+ <div class="method-heading attribute-method-heading">
128
+ <span class="method-name">carbohidratos</span><span
129
+ class="attribute-access-type">[R]</span>
130
+ </div>
131
+
132
+ <div class="method-description">
133
+
134
+
135
+
136
+ </div>
137
+ </div>
138
+
139
+ <div id="attribute-i-kcal" class="method-detail">
140
+ <div class="method-heading attribute-method-heading">
141
+ <span class="method-name">kcal</span><span
142
+ class="attribute-access-type">[R]</span>
143
+ </div>
144
+
145
+ <div class="method-description">
146
+
147
+
148
+
149
+ </div>
150
+ </div>
151
+
152
+ <div id="attribute-i-lipidos" class="method-detail">
153
+ <div class="method-heading attribute-method-heading">
154
+ <span class="method-name">lipidos</span><span
155
+ class="attribute-access-type">[R]</span>
156
+ </div>
157
+
158
+ <div class="method-description">
159
+
160
+
161
+
162
+ </div>
163
+ </div>
164
+
165
+ <div id="attribute-i-nombre" class="method-detail">
166
+ <div class="method-heading attribute-method-heading">
167
+ <span class="method-name">nombre</span><span
168
+ class="attribute-access-type">[R]</span>
169
+ </div>
170
+
171
+ <div class="method-description">
172
+
173
+
174
+
175
+ </div>
176
+ </div>
177
+
178
+ <div id="attribute-i-platos" class="method-detail">
179
+ <div class="method-heading attribute-method-heading">
180
+ <span class="method-name">platos</span><span
181
+ class="attribute-access-type">[R]</span>
182
+ </div>
183
+
184
+ <div class="method-description">
185
+
186
+
187
+
188
+ </div>
189
+ </div>
190
+
191
+ <div id="attribute-i-proteinas" class="method-detail">
192
+ <div class="method-heading attribute-method-heading">
193
+ <span class="method-name">proteinas</span><span
194
+ class="attribute-access-type">[R]</span>
195
+ </div>
196
+
197
+ <div class="method-description">
198
+
199
+
200
+
201
+ </div>
202
+ </div>
203
+
204
+ </section>
205
+
206
+
207
+
208
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
209
+ <header>
210
+ <h3>Public Class Methods</h3>
211
+ </header>
212
+
213
+
214
+ <div id="method-c-new" class="method-detail ">
215
+
216
+ <div class="method-heading">
217
+ <span class="method-name">new</span><span
218
+ class="method-args">(nombre,platos)</span>
219
+
220
+ <span class="method-click-advice">click to toggle source</span>
221
+
222
+ </div>
223
+
224
+
225
+ <div class="method-description">
226
+
227
+
228
+
229
+
230
+
231
+
232
+ <div class="method-source-code" id="new-source">
233
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 10</span>
234
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">nombre</span>,<span class="ruby-identifier">platos</span>)
235
+ <span class="ruby-ivar">@platos</span> = <span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">List</span>.<span class="ruby-identifier">new</span>()
236
+ <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">push_array</span>(<span class="ruby-identifier">platos</span>)
237
+ <span class="ruby-ivar">@nombre</span> = <span class="ruby-identifier">nombre</span>
238
+ <span class="ruby-ivar">@proteinas</span> = <span class="ruby-identifier">getProteinas</span>()
239
+ <span class="ruby-ivar">@lipidos</span> = <span class="ruby-identifier">getLipidos</span>()
240
+ <span class="ruby-ivar">@carbohidratos</span> = <span class="ruby-identifier">getCarbohidratos</span>()
241
+ <span class="ruby-ivar">@kcal</span> = <span class="ruby-identifier">getKcal</span>()
242
+ <span class="ruby-keyword">end</span></pre>
243
+ </div>
244
+
245
+ </div>
246
+
247
+
248
+
249
+
250
+ </div>
251
+
252
+
253
+ </section>
254
+
255
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
256
+ <header>
257
+ <h3>Public Instance Methods</h3>
258
+ </header>
259
+
260
+
261
+ <div id="method-i-3C-3D-3E" class="method-detail ">
262
+
263
+ <div class="method-heading">
264
+ <span class="method-name">&lt;=&gt;</span><span
265
+ class="method-args">(other)</span>
266
+
267
+ <span class="method-click-advice">click to toggle source</span>
268
+
269
+ </div>
270
+
271
+
272
+ <div class="method-description">
273
+
274
+ <p>Compara entre distintos menus por las kcal</p>
275
+
276
+
277
+
278
+
279
+ <div class="method-source-code" id="3C-3D-3E-source">
280
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 45</span>
281
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
282
+ <span class="ruby-identifier">kcal</span><span class="ruby-operator">&lt;=&gt;</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">kcal</span>
283
+ <span class="ruby-keyword">end</span></pre>
284
+ </div>
285
+
286
+ </div>
287
+
288
+
289
+
290
+
291
+ </div>
292
+
293
+
294
+ <div id="method-i-each" class="method-detail ">
295
+
296
+ <div class="method-heading">
297
+ <span class="method-name">each</span><span
298
+ class="method-args">() { |value| ... }</span>
299
+
300
+ <span class="method-click-advice">click to toggle source</span>
301
+
302
+ </div>
303
+
304
+
305
+ <div class="method-description">
306
+
307
+ <p>Implementa el enumerable del menu</p>
308
+
309
+
310
+
311
+
312
+ <div class="method-source-code" id="each-source">
313
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 54</span>
314
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">each</span>
315
+ <span class="ruby-identifier">aux</span> = <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">head</span>
316
+ <span class="ruby-keyword">while</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">aux</span>.<span class="ruby-identifier">nil?</span>)
317
+ <span class="ruby-keyword">yield</span> <span class="ruby-identifier">aux</span>.<span class="ruby-identifier">value</span>
318
+ <span class="ruby-identifier">aux</span> = <span class="ruby-identifier">aux</span>.<span class="ruby-identifier">next</span>
319
+ <span class="ruby-keyword">end</span>
320
+ <span class="ruby-keyword">end</span></pre>
321
+ </div>
322
+
323
+ </div>
324
+
325
+
326
+
327
+
328
+ </div>
329
+
330
+
331
+ <div id="method-i-getCarbohidratos" class="method-detail ">
332
+
333
+ <div class="method-heading">
334
+ <span class="method-name">getCarbohidratos</span><span
335
+ class="method-args">()</span>
336
+
337
+ <span class="method-click-advice">click to toggle source</span>
338
+
339
+ </div>
340
+
341
+
342
+ <div class="method-description">
343
+
344
+ <p>calcula la cantidad de carbohidratos</p>
345
+
346
+
347
+
348
+
349
+ <div class="method-source-code" id="getCarbohidratos-source">
350
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 39</span>
351
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">getCarbohidratos</span>()
352
+ <span class="ruby-identifier">carbs</span> = <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">porcarbohidratos</span>()}
353
+ (<span class="ruby-identifier">carbs</span>.<span class="ruby-identifier">sum</span><span class="ruby-operator">/</span><span class="ruby-identifier">carbs</span>.<span class="ruby-identifier">size</span>()).<span class="ruby-identifier">round</span>(<span class="ruby-value">2</span>)
354
+ <span class="ruby-keyword">end</span></pre>
355
+ </div>
356
+
357
+ </div>
358
+
359
+
360
+
361
+
362
+ </div>
363
+
364
+
365
+ <div id="method-i-getKcal" class="method-detail ">
366
+
367
+ <div class="method-heading">
368
+ <span class="method-name">getKcal</span><span
369
+ class="method-args">()</span>
370
+
371
+ <span class="method-click-advice">click to toggle source</span>
372
+
373
+ </div>
374
+
375
+
376
+ <div class="method-description">
377
+
378
+ <p>calcula las Kcal del menú</p>
379
+
380
+
381
+
382
+
383
+ <div class="method-source-code" id="getKcal-source">
384
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 21</span>
385
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">getKcal</span>()
386
+ <span class="ruby-identifier">kalorias</span> = <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">kcal</span>}
387
+ (<span class="ruby-identifier">kalorias</span>.<span class="ruby-identifier">sum</span>).<span class="ruby-identifier">round</span>(<span class="ruby-value">2</span>)
388
+ <span class="ruby-keyword">end</span></pre>
389
+ </div>
390
+
391
+ </div>
392
+
393
+
394
+
395
+
396
+ </div>
397
+
398
+
399
+ <div id="method-i-getLipidos" class="method-detail ">
400
+
401
+ <div class="method-heading">
402
+ <span class="method-name">getLipidos</span><span
403
+ class="method-args">()</span>
404
+
405
+ <span class="method-click-advice">click to toggle source</span>
406
+
407
+ </div>
408
+
409
+
410
+ <div class="method-description">
411
+
412
+ <p>Calcula la cantidad de lípidos</p>
413
+
414
+
415
+
416
+
417
+ <div class="method-source-code" id="getLipidos-source">
418
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 27</span>
419
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">getLipidos</span>()
420
+ <span class="ruby-identifier">lipids</span> = <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">porlipidos</span>()}
421
+ (<span class="ruby-identifier">lipids</span>.<span class="ruby-identifier">sum</span><span class="ruby-operator">/</span><span class="ruby-identifier">lipids</span>.<span class="ruby-identifier">size</span>()).<span class="ruby-identifier">round</span>(<span class="ruby-value">2</span>)
422
+ <span class="ruby-keyword">end</span></pre>
423
+ </div>
424
+
425
+ </div>
426
+
427
+
428
+
429
+
430
+ </div>
431
+
432
+
433
+ <div id="method-i-getProteinas" class="method-detail ">
434
+
435
+ <div class="method-heading">
436
+ <span class="method-name">getProteinas</span><span
437
+ class="method-args">()</span>
438
+
439
+ <span class="method-click-advice">click to toggle source</span>
440
+
441
+ </div>
442
+
443
+
444
+ <div class="method-description">
445
+
446
+ <p>calcula la cantidad de proteinas</p>
447
+
448
+
449
+
450
+
451
+ <div class="method-source-code" id="getProteinas-source">
452
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 33</span>
453
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">getProteinas</span>()
454
+ <span class="ruby-identifier">proteins</span> = <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">porproteinas</span>()}
455
+ (<span class="ruby-identifier">proteins</span>.<span class="ruby-identifier">sum</span><span class="ruby-operator">/</span><span class="ruby-identifier">proteins</span>.<span class="ruby-identifier">size</span>()).<span class="ruby-identifier">round</span>(<span class="ruby-value">2</span>)
456
+ <span class="ruby-keyword">end</span></pre>
457
+ </div>
458
+
459
+ </div>
460
+
461
+
462
+
463
+
464
+ </div>
465
+
466
+
467
+ <div id="method-i-to_s" class="method-detail ">
468
+
469
+ <div class="method-heading">
470
+ <span class="method-name">to_s</span><span
471
+ class="method-args">()</span>
472
+
473
+ <span class="method-click-advice">click to toggle source</span>
474
+
475
+ </div>
476
+
477
+
478
+ <div class="method-description">
479
+
480
+ <p>Transforma en un strig el menú</p>
481
+
482
+
483
+
484
+
485
+ <div class="method-source-code" id="to_s-source">
486
+ <pre><span class="ruby-comment"># File lib/alimentos/menu.rb, line 49</span>
487
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>
488
+ <span class="ruby-node">&quot;Menu: #{@nombre}\n Proteinas: #{@proteinas}%\nCarbohidratos:#{@carbohidratos}%\nLipidos:#{@lipidos}%\nKcal:#{@kcal}&quot;</span>
489
+ <span class="ruby-keyword">end</span></pre>
490
+ </div>
491
+
492
+ </div>
493
+
494
+
495
+
496
+
497
+ </div>
498
+
499
+
500
+ </section>
501
+
502
+ </section>
503
+
504
+ </main>
505
+
506
+
507
+ <footer id="validator-badges" role="contentinfo">
508
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
509
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.0.
510
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
511
+ </footer>
512
+