tddAlimentos 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 (81) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +13 -0
  4. data/.rspec +3 -0
  5. data/.travis.yml +7 -0
  6. data/Gemfile +5 -0
  7. data/Gemfile.lock +101 -0
  8. data/Guardfile +83 -0
  9. data/README.md +46 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docs/Alimento.html +428 -0
  14. data/docs/Gemfile.html +98 -0
  15. data/docs/Gemfile_lock.html +183 -0
  16. data/docs/Guardfile.html +166 -0
  17. data/docs/List.html +682 -0
  18. data/docs/Object.html +128 -0
  19. data/docs/Plato.html +607 -0
  20. data/docs/PlatoAmbiental.html +492 -0
  21. data/docs/README_md.html +126 -0
  22. data/docs/Rakefile.html +100 -0
  23. data/docs/TddAlimentos.html +110 -0
  24. data/docs/TddAlimentos/Error.html +103 -0
  25. data/docs/bin/setup.html +100 -0
  26. data/docs/created.rid +17 -0
  27. data/docs/css/fonts.css +167 -0
  28. data/docs/css/rdoc.css +590 -0
  29. data/docs/fonts/Lato-Light.ttf +0 -0
  30. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  31. data/docs/fonts/Lato-Regular.ttf +0 -0
  32. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  33. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  34. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  35. data/docs/images/add.png +0 -0
  36. data/docs/images/arrow_up.png +0 -0
  37. data/docs/images/brick.png +0 -0
  38. data/docs/images/brick_link.png +0 -0
  39. data/docs/images/bug.png +0 -0
  40. data/docs/images/bullet_black.png +0 -0
  41. data/docs/images/bullet_toggle_minus.png +0 -0
  42. data/docs/images/bullet_toggle_plus.png +0 -0
  43. data/docs/images/date.png +0 -0
  44. data/docs/images/delete.png +0 -0
  45. data/docs/images/find.png +0 -0
  46. data/docs/images/loadingAnimation.gif +0 -0
  47. data/docs/images/macFFBgHack.png +0 -0
  48. data/docs/images/package.png +0 -0
  49. data/docs/images/page_green.png +0 -0
  50. data/docs/images/page_white_text.png +0 -0
  51. data/docs/images/page_white_width.png +0 -0
  52. data/docs/images/plugin.png +0 -0
  53. data/docs/images/ruby.png +0 -0
  54. data/docs/images/tag_blue.png +0 -0
  55. data/docs/images/tag_green.png +0 -0
  56. data/docs/images/transparent.png +0 -0
  57. data/docs/images/wrench.png +0 -0
  58. data/docs/images/wrench_orange.png +0 -0
  59. data/docs/images/zoom.png +0 -0
  60. data/docs/index.html +117 -0
  61. data/docs/js/darkfish.js +161 -0
  62. data/docs/js/jquery.js +4 -0
  63. data/docs/js/navigation.js +141 -0
  64. data/docs/js/navigation.js.gz +0 -0
  65. data/docs/js/search.js +109 -0
  66. data/docs/js/search_index.js +1 -0
  67. data/docs/js/search_index.js.gz +0 -0
  68. data/docs/js/searcher.js +229 -0
  69. data/docs/js/searcher.js.gz +0 -0
  70. data/docs/table_of_contents.html +307 -0
  71. data/docs/tddAlimentos_gemspec.html +133 -0
  72. data/lib/tddAlimentos.rb +12 -0
  73. data/lib/tddAlimentos/alimento.rb +56 -0
  74. data/lib/tddAlimentos/lista.rb +172 -0
  75. data/lib/tddAlimentos/menu.rb +51 -0
  76. data/lib/tddAlimentos/plato.rb +125 -0
  77. data/lib/tddAlimentos/platoAmbiental.rb +108 -0
  78. data/lib/tddAlimentos/platoDSL.rb +94 -0
  79. data/lib/tddAlimentos/version.rb +3 -0
  80. data/tddAlimentos.gemspec +39 -0
  81. metadata +249 -0
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>README - 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
+
23
+ <body id="top" role="document" class="file">
24
+ <nav role="navigation">
25
+ <div id="project-navigation">
26
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
27
+ <h2>
28
+ <a href="./index.html" rel="home">Home</a>
29
+ </h2>
30
+
31
+ <div id="table-of-contents-navigation">
32
+ <a href="./table_of_contents.html#pages">Pages</a>
33
+ <a href="./table_of_contents.html#classes">Classes</a>
34
+ <a href="./table_of_contents.html#methods">Methods</a>
35
+ </div>
36
+ </div>
37
+
38
+ <div id="search-section" role="search" class="project-section initially-hidden">
39
+ <form action="#" method="get" accept-charset="utf-8">
40
+ <div id="search-field-wrapper">
41
+ <input id="search-field" role="combobox" aria-label="Search"
42
+ aria-autocomplete="list" aria-controls="search-results"
43
+ type="text" name="search" placeholder="Search" spellcheck="false"
44
+ title="Type to search, Up and Down to navigate, Enter to load">
45
+ </div>
46
+
47
+ <ul id="search-results" aria-label="Search Results"
48
+ aria-busy="false" aria-expanded="false"
49
+ aria-atomic="false" class="initially-hidden"></ul>
50
+ </form>
51
+ </div>
52
+
53
+ </div>
54
+
55
+
56
+ <div class="nav-section">
57
+ <h3>Table of Contents</h3>
58
+
59
+ <ul class="link-list" role="directory">
60
+ <li><a href="#label-Pr-C3-A1ctica+9-3A+POO-3A+Programaci-C3-B3n+Funcional.+Funciones+de+orden+superior.">Práctica 9: POO: Programación Funcional. Funciones de orden superior.</a>
61
+ <li><a href="#label-Metodolog-C3-ADa">Metodología</a>
62
+ <li><a href="#label-Datos+del+creador">Datos del creador</a>
63
+ </ul>
64
+ </div>
65
+
66
+
67
+ <div id="project-metadata">
68
+ <div id="fileindex-section" class="nav-section">
69
+ <h3>Pages</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="./Gemfile.html">Gemfile</a>
74
+
75
+ <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
76
+
77
+ <li><a href="./Guardfile.html">Guardfile</a>
78
+
79
+ <li><a href="./README_md.html">README</a>
80
+
81
+ <li><a href="./Rakefile.html">Rakefile</a>
82
+
83
+ <li><a href="./bin/setup.html">setup</a>
84
+
85
+ <li><a href="./tddAlimentos_gemspec.html">tddAlimentos.gemspec</a>
86
+
87
+ </ul>
88
+ </div>
89
+
90
+ </div>
91
+ </nav>
92
+
93
+ <main role="main" aria-label="Page README.md">
94
+
95
+ <h1 id="label-Pr-C3-A1ctica+9-3A+POO-3A+Programaci-C3-B3n+Funcional.+Funciones+de+orden+superior.">Práctica 9: POO: Programación Funcional. Funciones de orden superior.<span><a href="#label-Pr-C3-A1ctica+9-3A+POO-3A+Programaci-C3-B3n+Funcional.+Funciones+de+orden+superior.">&para;</a> <a href="#top">&uarr;</a></span></h1>
96
+
97
+ <p>En esta práctica vamos a desarrollar un menú dietético que tenga en cuenta la huella nutricional de los platos y el coste de cada plato, e incremente dicho coste en proporción al plato con máxima huella nutricional. Además, documentaremos la gema utilizando RDOC.</p>
98
+
99
+ <h2 id="label-Metodolog-C3-ADa">Metodología<span><a href="#label-Metodolog-C3-ADa">&para;</a> <a href="#top">&uarr;</a></span></h2>
100
+
101
+ <p>Para esta práctica haremos uso del paradigma POO y la metodología de Desarrollo Dirigido por Pruebas (TDD). Se utilizará git y GitHub para almacenar los archivos de la gema, además de la herramienta RDOC para generar la documentación.</p>
102
+
103
+ <h2 id="label-Datos+del+creador">Datos del creador<span><a href="#label-Datos+del+creador">&para;</a> <a href="#top">&uarr;</a></span></h2>
104
+ <ul><li>
105
+ <p><strong>Autor:</strong> Himar Manuel Barquín Carrasco.</p>
106
+ </li><li>
107
+ <p><strong>Fecha de creación:</strong> 09/12/2019.</p>
108
+ </li><li>
109
+ <p><strong>Fecha de entrega:</strong> 11/12/2019.</p>
110
+ </li></ul>
111
+ <hr>
112
+
113
+ <p><em>Lenguajes y Paradigmas de Programación, Ingeniería Informática</em>.</p>
114
+
115
+ <p><em>Escuela Superior de Ingeniería y Tecnología, Universidad de La Laguna</em>.</p>
116
+
117
+ </main>
118
+
119
+
120
+
121
+ <footer id="validator-badges" role="contentinfo">
122
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
123
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.0.
124
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
125
+ </footer>
126
+
@@ -0,0 +1,100 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>Rakefile - 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
+
23
+ <body id="top" role="document" class="file">
24
+ <nav role="navigation">
25
+ <div id="project-navigation">
26
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
27
+ <h2>
28
+ <a href="./index.html" rel="home">Home</a>
29
+ </h2>
30
+
31
+ <div id="table-of-contents-navigation">
32
+ <a href="./table_of_contents.html#pages">Pages</a>
33
+ <a href="./table_of_contents.html#classes">Classes</a>
34
+ <a href="./table_of_contents.html#methods">Methods</a>
35
+ </div>
36
+ </div>
37
+
38
+ <div id="search-section" role="search" class="project-section initially-hidden">
39
+ <form action="#" method="get" accept-charset="utf-8">
40
+ <div id="search-field-wrapper">
41
+ <input id="search-field" role="combobox" aria-label="Search"
42
+ aria-autocomplete="list" aria-controls="search-results"
43
+ type="text" name="search" placeholder="Search" spellcheck="false"
44
+ title="Type to search, Up and Down to navigate, Enter to load">
45
+ </div>
46
+
47
+ <ul id="search-results" aria-label="Search Results"
48
+ aria-busy="false" aria-expanded="false"
49
+ aria-atomic="false" class="initially-hidden"></ul>
50
+ </form>
51
+ </div>
52
+
53
+ </div>
54
+
55
+
56
+
57
+ <div id="project-metadata">
58
+ <div id="fileindex-section" class="nav-section">
59
+ <h3>Pages</h3>
60
+
61
+ <ul class="link-list">
62
+
63
+ <li><a href="./Gemfile.html">Gemfile</a>
64
+
65
+ <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
66
+
67
+ <li><a href="./Guardfile.html">Guardfile</a>
68
+
69
+ <li><a href="./README_md.html">README</a>
70
+
71
+ <li><a href="./Rakefile.html">Rakefile</a>
72
+
73
+ <li><a href="./bin/setup.html">setup</a>
74
+
75
+ <li><a href="./tddAlimentos_gemspec.html">tddAlimentos.gemspec</a>
76
+
77
+ </ul>
78
+ </div>
79
+
80
+ </div>
81
+ </nav>
82
+
83
+ <main role="main" aria-label="Page Rakefile">
84
+
85
+ <p>require “bundler/gem_tasks” require “rspec/core/rake_task”</p>
86
+
87
+ <p>RSpec::Core::RakeTask.new(:spec)</p>
88
+
89
+ <p>task :default =&gt; :spec</p>
90
+
91
+ </main>
92
+
93
+
94
+
95
+ <footer id="validator-badges" role="contentinfo">
96
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
97
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.0.
98
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
99
+ </footer>
100
+
@@ -0,0 +1,110 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module TddAlimentos - 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
+
23
+ <body id="top" role="document" class="module">
24
+ <nav role="navigation">
25
+ <div id="project-navigation">
26
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
27
+ <h2>
28
+ <a href="./index.html" rel="home">Home</a>
29
+ </h2>
30
+
31
+ <div id="table-of-contents-navigation">
32
+ <a href="./table_of_contents.html#pages">Pages</a>
33
+ <a href="./table_of_contents.html#classes">Classes</a>
34
+ <a href="./table_of_contents.html#methods">Methods</a>
35
+ </div>
36
+ </div>
37
+
38
+ <div id="search-section" role="search" class="project-section initially-hidden">
39
+ <form action="#" method="get" accept-charset="utf-8">
40
+ <div id="search-field-wrapper">
41
+ <input id="search-field" role="combobox" aria-label="Search"
42
+ aria-autocomplete="list" aria-controls="search-results"
43
+ type="text" name="search" placeholder="Search" spellcheck="false"
44
+ title="Type to search, Up and Down to navigate, Enter to load">
45
+ </div>
46
+
47
+ <ul id="search-results" aria-label="Search Results"
48
+ aria-busy="false" aria-expanded="false"
49
+ aria-atomic="false" class="initially-hidden"></ul>
50
+ </form>
51
+ </div>
52
+
53
+ </div>
54
+
55
+
56
+
57
+ <div id="class-metadata">
58
+
59
+
60
+
61
+
62
+
63
+ </div>
64
+ </nav>
65
+
66
+ <main role="main" aria-labelledby="module-TddAlimentos">
67
+ <h1 id="module-TddAlimentos" class="module">
68
+ module TddAlimentos
69
+ </h1>
70
+
71
+ <section class="description">
72
+
73
+ </section>
74
+
75
+
76
+ <section id="5Buntitled-5D" class="documentation-section">
77
+
78
+
79
+
80
+
81
+
82
+ <section class="constants-list">
83
+ <header>
84
+ <h3>Constants</h3>
85
+ </header>
86
+ <dl>
87
+
88
+ <dt id="VERSION">VERSION
89
+
90
+ <dd>
91
+
92
+
93
+ </dl>
94
+ </section>
95
+
96
+
97
+
98
+
99
+
100
+ </section>
101
+
102
+ </main>
103
+
104
+
105
+ <footer id="validator-badges" role="contentinfo">
106
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
107
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.0.
108
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
109
+ </footer>
110
+
@@ -0,0 +1,103 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class TddAlimentos::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/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
+
23
+ <body id="top" role="document" class="class">
24
+ <nav role="navigation">
25
+ <div id="project-navigation">
26
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
27
+ <h2>
28
+ <a href="../index.html" rel="home">Home</a>
29
+ </h2>
30
+
31
+ <div id="table-of-contents-navigation">
32
+ <a href="../table_of_contents.html#pages">Pages</a>
33
+ <a href="../table_of_contents.html#classes">Classes</a>
34
+ <a href="../table_of_contents.html#methods">Methods</a>
35
+ </div>
36
+ </div>
37
+
38
+ <div id="search-section" role="search" class="project-section initially-hidden">
39
+ <form action="#" method="get" accept-charset="utf-8">
40
+ <div id="search-field-wrapper">
41
+ <input id="search-field" role="combobox" aria-label="Search"
42
+ aria-autocomplete="list" aria-controls="search-results"
43
+ type="text" name="search" placeholder="Search" spellcheck="false"
44
+ title="Type to search, Up and Down to navigate, Enter to load">
45
+ </div>
46
+
47
+ <ul id="search-results" aria-label="Search Results"
48
+ aria-busy="false" aria-expanded="false"
49
+ aria-atomic="false" class="initially-hidden"></ul>
50
+ </form>
51
+ </div>
52
+
53
+ </div>
54
+
55
+
56
+
57
+ <div id="class-metadata">
58
+
59
+ <div id="parent-class-section" class="nav-section">
60
+ <h3>Parent</h3>
61
+
62
+
63
+ <p class="link">StandardError
64
+
65
+ </div>
66
+
67
+
68
+
69
+
70
+ </div>
71
+ </nav>
72
+
73
+ <main role="main" aria-labelledby="class-TddAlimentos::Error">
74
+ <h1 id="class-TddAlimentos::Error" class="class">
75
+ class TddAlimentos::Error
76
+ </h1>
77
+
78
+ <section class="description">
79
+
80
+ </section>
81
+
82
+
83
+ <section id="5Buntitled-5D" class="documentation-section">
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+ </section>
94
+
95
+ </main>
96
+
97
+
98
+ <footer id="validator-badges" role="contentinfo">
99
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
100
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.0.
101
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
102
+ </footer>
103
+
@@ -0,0 +1,100 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>setup - 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
+
23
+ <body id="top" role="document" class="file">
24
+ <nav role="navigation">
25
+ <div id="project-navigation">
26
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
27
+ <h2>
28
+ <a href="../index.html" rel="home">Home</a>
29
+ </h2>
30
+
31
+ <div id="table-of-contents-navigation">
32
+ <a href="../table_of_contents.html#pages">Pages</a>
33
+ <a href="../table_of_contents.html#classes">Classes</a>
34
+ <a href="../table_of_contents.html#methods">Methods</a>
35
+ </div>
36
+ </div>
37
+
38
+ <div id="search-section" role="search" class="project-section initially-hidden">
39
+ <form action="#" method="get" accept-charset="utf-8">
40
+ <div id="search-field-wrapper">
41
+ <input id="search-field" role="combobox" aria-label="Search"
42
+ aria-autocomplete="list" aria-controls="search-results"
43
+ type="text" name="search" placeholder="Search" spellcheck="false"
44
+ title="Type to search, Up and Down to navigate, Enter to load">
45
+ </div>
46
+
47
+ <ul id="search-results" aria-label="Search Results"
48
+ aria-busy="false" aria-expanded="false"
49
+ aria-atomic="false" class="initially-hidden"></ul>
50
+ </form>
51
+ </div>
52
+
53
+ </div>
54
+
55
+
56
+
57
+ <div id="project-metadata">
58
+ <div id="fileindex-section" class="nav-section">
59
+ <h3>Pages</h3>
60
+
61
+ <ul class="link-list">
62
+
63
+ <li><a href="../Gemfile.html">Gemfile</a>
64
+
65
+ <li><a href="../Gemfile_lock.html">Gemfile.lock</a>
66
+
67
+ <li><a href="../Guardfile.html">Guardfile</a>
68
+
69
+ <li><a href="../README_md.html">README</a>
70
+
71
+ <li><a href="../Rakefile.html">Rakefile</a>
72
+
73
+ <li><a href="../bin/setup.html">setup</a>
74
+
75
+ <li><a href="../tddAlimentos_gemspec.html">tddAlimentos.gemspec</a>
76
+
77
+ </ul>
78
+ </div>
79
+
80
+ </div>
81
+ </nav>
82
+
83
+ <main role="main" aria-label="Page bin/setup">
84
+
85
+ <p>#!/usr/bin/env bash set -euo pipefail IFS=$&#39;nt&#39; set -vx</p>
86
+
87
+ <p>bundle install</p>
88
+
89
+ <p># Do any other automated setup that you need to do here</p>
90
+
91
+ </main>
92
+
93
+
94
+
95
+ <footer id="validator-badges" role="contentinfo">
96
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
97
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.0.
98
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
99
+ </footer>
100
+