alimentos_diego_algomas 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
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,376 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Alimentos::Alimentos - 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
+ <div id="includes-section" class="nav-section">
71
+ <h3>Included Modules</h3>
72
+
73
+ <ul class="link-list">
74
+
75
+
76
+ <li><span class="include">Comparable</span>
77
+
78
+
79
+ </ul>
80
+ </div>
81
+
82
+
83
+ <!-- Method Quickref -->
84
+ <div id="method-list-section" class="nav-section">
85
+ <h3>Methods</h3>
86
+
87
+ <ul class="link-list" role="directory">
88
+
89
+ <li ><a href="#method-c-new">::new</a>
90
+
91
+ <li ><a href="#method-i-3C-3D-3E">#&lt;=&gt;</a>
92
+
93
+ <li ><a href="#method-i-calorias">#calorias</a>
94
+
95
+ <li ><a href="#method-i-to_s">#to_s</a>
96
+
97
+ </ul>
98
+ </div>
99
+
100
+ </div>
101
+ </nav>
102
+
103
+ <main role="main" aria-labelledby="class-Alimentos::Alimentos">
104
+ <h1 id="class-Alimentos::Alimentos" class="class">
105
+ class Alimentos::Alimentos
106
+ </h1>
107
+
108
+ <section class="description">
109
+
110
+ <p>Clase alimentos donde se guardan las propiedades del mismo</p>
111
+
112
+ </section>
113
+
114
+
115
+ <section id="5Buntitled-5D" class="documentation-section">
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <section class="attribute-method-details" class="method-section">
124
+ <header>
125
+ <h3>Attributes</h3>
126
+ </header>
127
+
128
+
129
+ <div id="attribute-i-carbohidratos" class="method-detail">
130
+ <div class="method-heading attribute-method-heading">
131
+ <span class="method-name">carbohidratos</span><span
132
+ class="attribute-access-type">[R]</span>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+
137
+
138
+
139
+ </div>
140
+ </div>
141
+
142
+ <div id="attribute-i-emisiones" class="method-detail">
143
+ <div class="method-heading attribute-method-heading">
144
+ <span class="method-name">emisiones</span><span
145
+ class="attribute-access-type">[R]</span>
146
+ </div>
147
+
148
+ <div class="method-description">
149
+
150
+
151
+
152
+ </div>
153
+ </div>
154
+
155
+ <div id="attribute-i-lipidos" class="method-detail">
156
+ <div class="method-heading attribute-method-heading">
157
+ <span class="method-name">lipidos</span><span
158
+ class="attribute-access-type">[R]</span>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+
163
+
164
+
165
+ </div>
166
+ </div>
167
+
168
+ <div id="attribute-i-m2" class="method-detail">
169
+ <div class="method-heading attribute-method-heading">
170
+ <span class="method-name">m2</span><span
171
+ class="attribute-access-type">[R]</span>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+
176
+
177
+
178
+ </div>
179
+ </div>
180
+
181
+ <div id="attribute-i-nombre" class="method-detail">
182
+ <div class="method-heading attribute-method-heading">
183
+ <span class="method-name">nombre</span><span
184
+ class="attribute-access-type">[R]</span>
185
+ </div>
186
+
187
+ <div class="method-description">
188
+
189
+
190
+
191
+ </div>
192
+ </div>
193
+
194
+ <div id="attribute-i-proteinas" class="method-detail">
195
+ <div class="method-heading attribute-method-heading">
196
+ <span class="method-name">proteinas</span><span
197
+ class="attribute-access-type">[R]</span>
198
+ </div>
199
+
200
+ <div class="method-description">
201
+
202
+
203
+
204
+ </div>
205
+ </div>
206
+
207
+ </section>
208
+
209
+
210
+
211
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
212
+ <header>
213
+ <h3>Public Class Methods</h3>
214
+ </header>
215
+
216
+
217
+ <div id="method-c-new" class="method-detail ">
218
+
219
+ <div class="method-heading">
220
+ <span class="method-name">new</span><span
221
+ class="method-args">(nombre,proteinas,carbohidratos,lipidos,emisiones,m2)</span>
222
+
223
+ <span class="method-click-advice">click to toggle source</span>
224
+
225
+ </div>
226
+
227
+
228
+ <div class="method-description">
229
+
230
+
231
+
232
+
233
+
234
+
235
+ <div class="method-source-code" id="new-source">
236
+ <pre><span class="ruby-comment"># File lib/alimentos/alimentos.rb, line 10</span>
237
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span> (<span class="ruby-identifier">nombre</span>,<span class="ruby-identifier">proteinas</span>,<span class="ruby-identifier">carbohidratos</span>,<span class="ruby-identifier">lipidos</span>,<span class="ruby-identifier">emisiones</span>,<span class="ruby-identifier">m2</span>)
238
+ <span class="ruby-ivar">@nombre</span> = <span class="ruby-identifier">nombre</span>
239
+ <span class="ruby-ivar">@proteinas</span> = <span class="ruby-identifier">proteinas</span>
240
+ <span class="ruby-ivar">@carbohidratos</span> = <span class="ruby-identifier">carbohidratos</span>
241
+ <span class="ruby-ivar">@lipidos</span> = <span class="ruby-identifier">lipidos</span>
242
+ <span class="ruby-ivar">@emisiones</span> = <span class="ruby-identifier">emisiones</span>
243
+ <span class="ruby-ivar">@m2</span> = <span class="ruby-identifier">m2</span>
244
+
245
+ <span class="ruby-keyword">end</span></pre>
246
+ </div>
247
+
248
+ </div>
249
+
250
+
251
+
252
+
253
+ </div>
254
+
255
+
256
+ </section>
257
+
258
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
259
+ <header>
260
+ <h3>Public Instance Methods</h3>
261
+ </header>
262
+
263
+
264
+ <div id="method-i-3C-3D-3E" class="method-detail ">
265
+
266
+ <div class="method-heading">
267
+ <span class="method-name">&lt;=&gt;</span><span
268
+ class="method-args">(other)</span>
269
+
270
+ <span class="method-click-advice">click to toggle source</span>
271
+
272
+ </div>
273
+
274
+
275
+ <div class="method-description">
276
+
277
+ <p>Permite comparar entre alimentos</p>
278
+
279
+
280
+
281
+
282
+ <div class="method-source-code" id="3C-3D-3E-source">
283
+ <pre><span class="ruby-comment"># File lib/alimentos/alimentos.rb, line 32</span>
284
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
285
+ <span class="ruby-identifier">calorias</span>()<span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">calorias</span>()
286
+ <span class="ruby-keyword">end</span></pre>
287
+ </div>
288
+
289
+ </div>
290
+
291
+
292
+
293
+
294
+ </div>
295
+
296
+
297
+ <div id="method-i-calorias" class="method-detail ">
298
+
299
+ <div class="method-heading">
300
+ <span class="method-name">calorias</span><span
301
+ class="method-args">()</span>
302
+
303
+ <span class="method-click-advice">click to toggle source</span>
304
+
305
+ </div>
306
+
307
+
308
+ <div class="method-description">
309
+
310
+ <p>Metodo que calcula las kcal de un alimento</p>
311
+
312
+
313
+
314
+
315
+ <div class="method-source-code" id="calorias-source">
316
+ <pre><span class="ruby-comment"># File lib/alimentos/alimentos.rb, line 21</span>
317
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">calorias</span>()
318
+ <span class="ruby-identifier">kcal</span> = (<span class="ruby-ivar">@proteinas</span><span class="ruby-operator">*</span><span class="ruby-value">4</span>)<span class="ruby-operator">+</span>(<span class="ruby-ivar">@lipidos</span><span class="ruby-operator">*</span><span class="ruby-value">9</span>)<span class="ruby-operator">+</span>(<span class="ruby-ivar">@carbohidratos</span><span class="ruby-operator">*</span><span class="ruby-value">4</span>)
319
+ <span class="ruby-identifier">kcal</span>.<span class="ruby-identifier">round</span>(<span class="ruby-value">2</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-to_s" class="method-detail ">
332
+
333
+ <div class="method-heading">
334
+ <span class="method-name">to_s</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>Serializador de un alimento</p>
345
+
346
+
347
+
348
+
349
+ <div class="method-source-code" id="to_s-source">
350
+ <pre><span class="ruby-comment"># File lib/alimentos/alimentos.rb, line 27</span>
351
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>()
352
+ <span class="ruby-node">&quot;#{@nombre}:\nProteinas: #{@proteinas}\nCarbohidratos: #{@carbohidratos}\nLipidos: #{@lipidos}\nEmisiones: #{emisiones}\nMetros2: #{m2}&quot;</span>
353
+ <span class="ruby-keyword">end</span></pre>
354
+ </div>
355
+
356
+ </div>
357
+
358
+
359
+
360
+
361
+ </div>
362
+
363
+
364
+ </section>
365
+
366
+ </section>
367
+
368
+ </main>
369
+
370
+
371
+ <footer id="validator-badges" role="contentinfo">
372
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
373
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.0.
374
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
375
+ </footer>
376
+
@@ -0,0 +1,106 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Alimentos::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-Alimentos::Error">
77
+ <h1 id="class-Alimentos::Error" class="class">
78
+ class Alimentos::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
+