alu0100905885 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.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.travis.yml +12 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +8 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +43 -0
  8. data/Rakefile +6 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/doc/Alimentos.html +513 -0
  12. data/doc/CODE_OF_CONDUCT_md.html +192 -0
  13. data/doc/Gemfile.html +98 -0
  14. data/doc/LICENSE_txt.html +114 -0
  15. data/doc/Listas.html +512 -0
  16. data/doc/Object.html +126 -0
  17. data/doc/Plato_.html +409 -0
  18. data/doc/Platos.html +389 -0
  19. data/doc/Prct6.html +108 -0
  20. data/doc/Prct6/Error.html +101 -0
  21. data/doc/README_md.html +169 -0
  22. data/doc/Rakefile.html +98 -0
  23. data/doc/bin/setup.html +98 -0
  24. data/doc/created.rid +16 -0
  25. data/doc/css/fonts.css +167 -0
  26. data/doc/css/rdoc.css +590 -0
  27. data/doc/fonts/Lato-Light.ttf +0 -0
  28. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  29. data/doc/fonts/Lato-Regular.ttf +0 -0
  30. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  31. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  32. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  33. data/doc/images/add.png +0 -0
  34. data/doc/images/arrow_up.png +0 -0
  35. data/doc/images/brick.png +0 -0
  36. data/doc/images/brick_link.png +0 -0
  37. data/doc/images/bug.png +0 -0
  38. data/doc/images/bullet_black.png +0 -0
  39. data/doc/images/bullet_toggle_minus.png +0 -0
  40. data/doc/images/bullet_toggle_plus.png +0 -0
  41. data/doc/images/date.png +0 -0
  42. data/doc/images/delete.png +0 -0
  43. data/doc/images/find.png +0 -0
  44. data/doc/images/loadingAnimation.gif +0 -0
  45. data/doc/images/macFFBgHack.png +0 -0
  46. data/doc/images/package.png +0 -0
  47. data/doc/images/page_green.png +0 -0
  48. data/doc/images/page_white_text.png +0 -0
  49. data/doc/images/page_white_width.png +0 -0
  50. data/doc/images/plugin.png +0 -0
  51. data/doc/images/ruby.png +0 -0
  52. data/doc/images/tag_blue.png +0 -0
  53. data/doc/images/tag_green.png +0 -0
  54. data/doc/images/transparent.png +0 -0
  55. data/doc/images/wrench.png +0 -0
  56. data/doc/images/wrench_orange.png +0 -0
  57. data/doc/images/zoom.png +0 -0
  58. data/doc/index.html +114 -0
  59. data/doc/js/darkfish.js +161 -0
  60. data/doc/js/jquery.js +5 -0
  61. data/doc/js/navigation.js +142 -0
  62. data/doc/js/navigation.js.gz +0 -0
  63. data/doc/js/search.js +109 -0
  64. data/doc/js/search_index.js +1 -0
  65. data/doc/js/search_index.js.gz +0 -0
  66. data/doc/js/searcher.js +229 -0
  67. data/doc/js/searcher.js.gz +0 -0
  68. data/doc/prct6_gemspec.html +129 -0
  69. data/doc/table_of_contents.html +238 -0
  70. data/lib/prct6.rb +11 -0
  71. data/lib/prct6/listas.rb +68 -0
  72. data/lib/prct6/menu_dsl.rb +33 -0
  73. data/lib/prct6/plato_dsl.rb +29 -0
  74. data/lib/prct6/platos.rb +154 -0
  75. data/lib/prct6/prct6.rb +62 -0
  76. data/lib/prct6/version.rb +3 -0
  77. data/pkg/alu0100905885-0.1.0.gem +0 -0
  78. data/pkg/prct6-0.1.0.gem +0 -0
  79. data/prct6.gemspec +34 -0
  80. metadata +208 -0
@@ -0,0 +1,389 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Platos - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="class">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+ <div id="parent-class-section" class="nav-section">
59
+ <h3>Parent</h3>
60
+
61
+
62
+ <p class="link"><a href="Object.html">Object</a>
63
+
64
+ </div>
65
+
66
+ <div id="includes-section" class="nav-section">
67
+ <h3>Included Modules</h3>
68
+
69
+ <ul class="link-list">
70
+
71
+
72
+ <li><span class="include">Comparable</span>
73
+
74
+
75
+ </ul>
76
+ </div>
77
+
78
+
79
+ <!-- Method Quickref -->
80
+ <div id="method-list-section" class="nav-section">
81
+ <h3>Methods</h3>
82
+
83
+ <ul class="link-list" role="directory">
84
+
85
+ <li ><a href="#method-c-new">::new</a>
86
+
87
+ <li ><a href="#method-i-cal_plato">#cal_plato</a>
88
+
89
+ <li ><a href="#method-i-porcentaje">#porcentaje</a>
90
+
91
+ <li ><a href="#method-i-to_s">#to_s</a>
92
+
93
+ </ul>
94
+ </div>
95
+
96
+ </div>
97
+ </nav>
98
+
99
+ <main role="main" aria-labelledby="class-Platos">
100
+ <h1 id="class-Platos" class="class">
101
+ class Platos
102
+ </h1>
103
+
104
+ <section class="description">
105
+
106
+ <p>Clase platos que utiliza alimentos</p>
107
+
108
+ </section>
109
+
110
+
111
+ <section id="5Buntitled-5D" class="documentation-section">
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ <section class="attribute-method-details" class="method-section">
120
+ <header>
121
+ <h3>Attributes</h3>
122
+ </header>
123
+
124
+
125
+ <div id="attribute-i-alimentos" class="method-detail">
126
+ <div class="method-heading attribute-method-heading">
127
+ <span class="method-name">alimentos</span><span
128
+ class="attribute-access-type">[RW]</span>
129
+ </div>
130
+
131
+ <div class="method-description">
132
+
133
+
134
+
135
+ </div>
136
+ </div>
137
+
138
+ <div id="attribute-i-cal_array" class="method-detail">
139
+ <div class="method-heading attribute-method-heading">
140
+ <span class="method-name">cal_array</span><span
141
+ class="attribute-access-type">[RW]</span>
142
+ </div>
143
+
144
+ <div class="method-description">
145
+
146
+
147
+
148
+ </div>
149
+ </div>
150
+
151
+ <div id="attribute-i-emisiones_array" class="method-detail">
152
+ <div class="method-heading attribute-method-heading">
153
+ <span class="method-name">emisiones_array</span><span
154
+ class="attribute-access-type">[RW]</span>
155
+ </div>
156
+
157
+ <div class="method-description">
158
+
159
+
160
+
161
+ </div>
162
+ </div>
163
+
164
+ <div id="attribute-i-nombre" class="method-detail">
165
+ <div class="method-heading attribute-method-heading">
166
+ <span class="method-name">nombre</span><span
167
+ class="attribute-access-type">[RW]</span>
168
+ </div>
169
+
170
+ <div class="method-description">
171
+
172
+
173
+
174
+ </div>
175
+ </div>
176
+
177
+ <div id="attribute-i-peso" class="method-detail">
178
+ <div class="method-heading attribute-method-heading">
179
+ <span class="method-name">peso</span><span
180
+ class="attribute-access-type">[RW]</span>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+
185
+
186
+
187
+ </div>
188
+ </div>
189
+
190
+ <div id="attribute-i-peso_total" class="method-detail">
191
+ <div class="method-heading attribute-method-heading">
192
+ <span class="method-name">peso_total</span><span
193
+ class="attribute-access-type">[RW]</span>
194
+ </div>
195
+
196
+ <div class="method-description">
197
+
198
+
199
+
200
+ </div>
201
+ </div>
202
+
203
+ </section>
204
+
205
+
206
+
207
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
208
+ <header>
209
+ <h3>Public Class Methods</h3>
210
+ </header>
211
+
212
+
213
+ <div id="method-c-new" class="method-detail ">
214
+
215
+ <div class="method-heading">
216
+ <span class="method-name">new</span><span
217
+ class="method-args">(nombre, alimentos, peso, peso_total, cal_array, emisiones_array)</span>
218
+
219
+ <span class="method-click-advice">click to toggle source</span>
220
+
221
+ </div>
222
+
223
+
224
+ <div class="method-description">
225
+
226
+ <p>Método initialize Inicializa los diferentes atributos de la clase</p>
227
+
228
+
229
+
230
+
231
+ <div class="method-source-code" id="new-source">
232
+ <pre><span class="ruby-comment"># File lib/prct6/platos.rb, line 13</span>
233
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">nombre</span>, <span class="ruby-identifier">alimentos</span>, <span class="ruby-identifier">peso</span>, <span class="ruby-identifier">peso_total</span>, <span class="ruby-identifier">cal_array</span>, <span class="ruby-identifier">emisiones_array</span>)
234
+ <span class="ruby-ivar">@nombre</span> = <span class="ruby-identifier">nombre</span>
235
+ <span class="ruby-ivar">@alimentos</span> = <span class="ruby-identifier">alimentos</span>
236
+ <span class="ruby-ivar">@peso</span> = <span class="ruby-identifier">peso</span>
237
+ <span class="ruby-ivar">@peso_total</span> = <span class="ruby-identifier">peso_total</span>
238
+ <span class="ruby-ivar">@cal_array</span> = <span class="ruby-identifier">cal_array</span>
239
+ <span class="ruby-ivar">@emisiones_array</span> = <span class="ruby-identifier">emisiones_array</span>
240
+ <span class="ruby-keyword">end</span></pre>
241
+ </div>
242
+
243
+ </div>
244
+
245
+
246
+
247
+
248
+ </div>
249
+
250
+
251
+ </section>
252
+
253
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
254
+ <header>
255
+ <h3>Public Instance Methods</h3>
256
+ </header>
257
+
258
+
259
+ <div id="method-i-cal_plato" class="method-detail ">
260
+
261
+ <div class="method-heading">
262
+ <span class="method-name">cal_plato</span><span
263
+ class="method-args">()</span>
264
+
265
+ <span class="method-click-advice">click to toggle source</span>
266
+
267
+ </div>
268
+
269
+
270
+ <div class="method-description">
271
+
272
+ <p>Método <a href="Platos.html#method-i-cal_plato">#cal_plato</a> Método para
273
+ hallar las calorias que posee un plato @return: Devuelve las calorias del
274
+ plato</p>
275
+
276
+
277
+
278
+
279
+ <div class="method-source-code" id="cal_plato-source">
280
+ <pre><span class="ruby-comment"># File lib/prct6/platos.rb, line 41</span>
281
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cal_plato</span>
282
+ <span class="ruby-identifier">cal_plato</span>=<span class="ruby-value">0</span>
283
+ <span class="ruby-identifier">i</span>=<span class="ruby-value">0</span>
284
+
285
+ <span class="ruby-keyword">while</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">cal_array</span>.<span class="ruby-identifier">length</span> <span class="ruby-keyword">do</span>
286
+ <span class="ruby-identifier">cal_plato</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">cal_array</span>[<span class="ruby-identifier">i</span>]
287
+ <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
288
+ <span class="ruby-keyword">end</span>
289
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">cal_plato</span>
290
+ <span class="ruby-keyword">end</span></pre>
291
+ </div>
292
+
293
+ </div>
294
+
295
+
296
+
297
+
298
+ </div>
299
+
300
+
301
+ <div id="method-i-porcentaje" class="method-detail ">
302
+
303
+ <div class="method-heading">
304
+ <span class="method-name">porcentaje</span><span
305
+ class="method-args">(alimentos, peso, peso_total)</span>
306
+
307
+ <span class="method-click-advice">click to toggle source</span>
308
+
309
+ </div>
310
+
311
+
312
+ <div class="method-description">
313
+
314
+ <p>Método porcentaje Calcula, segun los atributos dados, el porcentaje de
315
+ proteinas, lipidos o carbohidratos @return: devuelve el porcentaje
316
+ requerido</p>
317
+
318
+
319
+
320
+
321
+ <div class="method-source-code" id="porcentaje-source">
322
+ <pre><span class="ruby-comment"># File lib/prct6/platos.rb, line 26</span>
323
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">porcentaje</span>(<span class="ruby-identifier">alimentos</span>, <span class="ruby-identifier">peso</span>, <span class="ruby-identifier">peso_total</span>)
324
+ <span class="ruby-identifier">total</span>=<span class="ruby-value">0</span>
325
+ <span class="ruby-identifier">i</span>=<span class="ruby-value">0</span>
326
+ <span class="ruby-keyword">while</span> <span class="ruby-identifier">i</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">alimentos</span>.<span class="ruby-identifier">length</span> <span class="ruby-keyword">do</span>
327
+ <span class="ruby-identifier">aux</span> = <span class="ruby-identifier">alimentos</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">*</span> <span class="ruby-identifier">peso</span>[<span class="ruby-identifier">i</span>]
328
+ <span class="ruby-identifier">total</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">aux</span>
329
+ <span class="ruby-identifier">i</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
330
+ <span class="ruby-keyword">end</span>
331
+
332
+ <span class="ruby-keyword">return</span> ((<span class="ruby-identifier">total</span><span class="ruby-operator">/</span><span class="ruby-identifier">peso_total</span>)<span class="ruby-operator">*</span><span class="ruby-value">100</span>).<span class="ruby-identifier">round</span>(<span class="ruby-value">1</span>)
333
+ <span class="ruby-keyword">end</span></pre>
334
+ </div>
335
+
336
+ </div>
337
+
338
+
339
+
340
+
341
+ </div>
342
+
343
+
344
+ <div id="method-i-to_s" class="method-detail ">
345
+
346
+ <div class="method-heading">
347
+ <span class="method-name">to_s</span><span
348
+ class="method-args">()</span>
349
+
350
+ <span class="method-click-advice">click to toggle source</span>
351
+
352
+ </div>
353
+
354
+
355
+ <div class="method-description">
356
+
357
+ <p>Método <a href="Platos.html#method-i-to_s">#to_s</a> Método para sacar
358
+ informacion formateada @return: Devuelve los datos formateados</p>
359
+
360
+
361
+
362
+
363
+ <div class="method-source-code" id="to_s-source">
364
+ <pre><span class="ruby-comment"># File lib/prct6/platos.rb, line 55</span>
365
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>
366
+ <span class="ruby-keyword">return</span> <span class="ruby-node">&quot;Plato: #{nombre}, Partes: #{alimentos}, Peso total: #{peso_total}&quot;</span>
367
+ <span class="ruby-keyword">end</span></pre>
368
+ </div>
369
+
370
+ </div>
371
+
372
+
373
+
374
+
375
+ </div>
376
+
377
+
378
+ </section>
379
+
380
+ </section>
381
+ </main>
382
+
383
+
384
+ <footer id="validator-badges" role="contentinfo">
385
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
386
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1.
387
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
388
+ </footer>
389
+
@@ -0,0 +1,108 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Prct6 - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+ </nav>
64
+
65
+ <main role="main" aria-labelledby="module-Prct6">
66
+ <h1 id="module-Prct6" class="module">
67
+ module Prct6
68
+ </h1>
69
+
70
+ <section class="description">
71
+
72
+ </section>
73
+
74
+
75
+ <section id="5Buntitled-5D" class="documentation-section">
76
+
77
+
78
+
79
+
80
+
81
+ <section class="constants-list">
82
+ <header>
83
+ <h3>Constants</h3>
84
+ </header>
85
+ <dl>
86
+
87
+ <dt id="VERSION">VERSION
88
+
89
+ <dd>
90
+
91
+
92
+ </dl>
93
+ </section>
94
+
95
+
96
+
97
+
98
+
99
+ </section>
100
+ </main>
101
+
102
+
103
+ <footer id="validator-badges" role="contentinfo">
104
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
105
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1.
106
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
107
+ </footer>
108
+