alimento-0100895001 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +12 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Guardfile +82 -0
- data/README.md +50 -0
- data/Rakefile +6 -0
- data/alimento.gemspec +40 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/Alimento.html +110 -0
- data/docs/Alimento_.html +406 -0
- data/docs/Gemfile.html +100 -0
- data/docs/Gemfile_lock.html +213 -0
- data/docs/Grupo_alimento.html +232 -0
- data/docs/Guardfile.html +177 -0
- data/docs/List.html +511 -0
- data/docs/Object.html +129 -0
- data/docs/README_md.html +169 -0
- data/docs/Rakefile.html +98 -0
- data/docs/alimento_gemspec.html +133 -0
- data/docs/bin/setup.html +98 -0
- data/docs/created.rid +17 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +590 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +110 -0
- data/docs/js/darkfish.js +161 -0
- data/docs/js/jquery.js +4 -0
- data/docs/js/navigation.js +142 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +109 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/table_of_contents.html +165 -0
- data/lib/alimento.rb +8 -0
- data/lib/alimento/alimento_.rb +73 -0
- data/lib/alimento/list.rb +108 -0
- data/lib/alimento/plato.rb +169 -0
- data/lib/alimento/version.rb +3 -0
- metadata +227 -0
data/docs/Object.html
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Object - 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">BasicObject
|
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">Benchmark</span>
|
73
|
+
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
<main role="main" aria-labelledby="class-Object">
|
84
|
+
<h1 id="class-Object" class="class">
|
85
|
+
class Object
|
86
|
+
</h1>
|
87
|
+
|
88
|
+
<section class="description">
|
89
|
+
|
90
|
+
</section>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<section class="constants-list">
|
102
|
+
<header>
|
103
|
+
<h3>Constants</h3>
|
104
|
+
</header>
|
105
|
+
<dl>
|
106
|
+
|
107
|
+
<dt id="Node">Node
|
108
|
+
|
109
|
+
<dd><p>Clase nodo utilizada para implementar posteriormente la lista create a
|
110
|
+
Struct with :value, :next and :prev</p>
|
111
|
+
|
112
|
+
|
113
|
+
</dl>
|
114
|
+
</section>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
</section>
|
121
|
+
</main>
|
122
|
+
|
123
|
+
|
124
|
+
<footer id="validator-badges" role="contentinfo">
|
125
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
126
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
127
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
128
|
+
</footer>
|
129
|
+
|
data/docs/README_md.html
ADDED
@@ -0,0 +1,169 @@
|
|
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
|
+
<body id="top" role="document" class="file">
|
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
|
+
<div class="nav-section">
|
56
|
+
<h3>Table of Contents</h3>
|
57
|
+
|
58
|
+
<ul class="link-list" role="directory">
|
59
|
+
<li><a href="#label-Pr-C3-A1ctica+10.+Programaci-C3-B3n+Funcional">Práctica 10. Programación Funcional</a>
|
60
|
+
<li><a href="#label-Carla+Ramos+Alonso">Carla Ramos Alonso</a>
|
61
|
+
<li><a href="#label-Interpretaci-C3-B3n">Interpretación</a>
|
62
|
+
<li><a href="#label-Resultado">Resultado</a>
|
63
|
+
<li><a href="#label-Documentaci-C3-B3n">Documentación</a>
|
64
|
+
</ul>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
<div id="project-metadata">
|
69
|
+
<div id="fileindex-section" class="nav-section">
|
70
|
+
<h3>Pages</h3>
|
71
|
+
|
72
|
+
<ul class="link-list">
|
73
|
+
|
74
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
75
|
+
|
76
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
77
|
+
|
78
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
79
|
+
|
80
|
+
<li><a href="./README_md.html">README</a>
|
81
|
+
|
82
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
83
|
+
|
84
|
+
<li><a href="./alimento_gemspec.html">alimento.gemspec</a>
|
85
|
+
|
86
|
+
<li><a href="./bin/setup.html">setup</a>
|
87
|
+
|
88
|
+
</ul>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
</nav>
|
93
|
+
|
94
|
+
<main role="main" aria-label="Page README.md">
|
95
|
+
|
96
|
+
<h1 id="label-Pr-C3-A1ctica+10.+Programaci-C3-B3n+Funcional">Práctica 10. Programación Funcional<span><a href="#label-Pr-C3-A1ctica+10.+Programaci-C3-B3n+Funcional">¶</a> <a href="#top">↑</a></span></h1>
|
97
|
+
|
98
|
+
<h2 id="label-Carla+Ramos+Alonso">Carla Ramos Alonso<span><a href="#label-Carla+Ramos+Alonso">¶</a> <a href="#top">↑</a></span></h2>
|
99
|
+
|
100
|
+
<p>Práctica 10 de la asignatura de Lenguajes y paradigmas de la programación.
|
101
|
+
En dicha práctica haremos uso de las prácticas anteriores, y utilizaremos
|
102
|
+
la clase <a href="Alimento_.html">Alimento_</a> y <a
|
103
|
+
href="List.html">List</a> que en nuestro caso definen una lista doblemente
|
104
|
+
enlazada de alimentos, que a su vez pertenecen a un grupo, ya que hemos
|
105
|
+
hecho uso de la herencia. Hemos hecho uso de los mixin de Ruby
|
106
|
+
<strong>Enumerable</strong> y <strong>Comparable</strong>. Además, en esta
|
107
|
+
práctica hacemos uso del paradigma de programación funcional y hemos
|
108
|
+
calculado el <strong>aibc</strong> y el <strong>ig</strong> de los
|
109
|
+
alimentos y de los distintos individuos. La nueva funcionalidad añadida es
|
110
|
+
la ordenación de una determinada lista de alimentos mediante tres métodos
|
111
|
+
diferentes: <strong>for</strong>, <strong>each</strong> y
|
112
|
+
<strong>sort</strong>.</p>
|
113
|
+
|
114
|
+
<p>Las herramientas que hemos usado para el desarrollo de la misma son las
|
115
|
+
siguientes:</p>
|
116
|
+
|
117
|
+
<p><strong>Bundler:</strong> Manejo de gemas<br> <strong>Rspec:</strong>
|
118
|
+
Desarrollo dirigido por pruebas<br> <strong>Guard:</strong> Comprobación
|
119
|
+
continua<br> <strong>Travis:</strong> Ejecución de los resultados<br>
|
120
|
+
<strong>Benchmark:</strong> Informe de tiempo (banco de pruebas)<br>
|
121
|
+
<strong>Coveralls:</strong> Devuelve el cubrimiento y las estadísticas del
|
122
|
+
código Ruby desarrollado</p>
|
123
|
+
|
124
|
+
<p>Usaremos la metodología del <strong>desarrollo dirigido por
|
125
|
+
pruebas</strong>, que consiste en la definición de las pruebas, con el
|
126
|
+
resultado que esperamos, y luego la implementación del mínimo código
|
127
|
+
necesario para el éxito de la misma.</p>
|
128
|
+
|
129
|
+
<h2 id="label-Interpretaci-C3-B3n">Interpretación<span><a href="#label-Interpretaci-C3-B3n">¶</a> <a href="#top">↑</a></span></h2>
|
130
|
+
|
131
|
+
<p>Para la interpretación del programa tendremos tan solo que modificar los
|
132
|
+
ficheros de pruebas o clicar enter en la consola con la ejecución de guard,
|
133
|
+
ya que este nos permite ver la ejecución de las pruebas cada vez que estas
|
134
|
+
se modifiquen. Para ello ejecutaremos:<br> <code>bundle exec guard</code></p>
|
135
|
+
|
136
|
+
<h2 id="label-Resultado">Resultado<span><a href="#label-Resultado">¶</a> <a href="#top">↑</a></span></h2>
|
137
|
+
|
138
|
+
<p>Se podrán insertar alimentos a la lista, y además extraer el primero o el
|
139
|
+
último.<br> El programa también hace uso de <strong>herencia</strong> con
|
140
|
+
Ruby, de manera que los alimentos están clasificados por grupos de
|
141
|
+
alimentos, que es una clase heredada de la clase alimento creada en las
|
142
|
+
prácticas anteriores. A su vez, gracias a los <strong>mixin</strong>
|
143
|
+
implementados, podremos obtener el maximo valor en la lista, el menor,
|
144
|
+
desordenarla, definir un bloque para que se cumpla en los elementos de la
|
145
|
+
lista, etc. Tenemos también el resultado del AIBC y además los IG de los
|
146
|
+
alimentos (yogurt, chocolate y compota de manzana) y de los dos individuos
|
147
|
+
instanciados. Tras la ordenación de la lista obtendremos una lista ordenada
|
148
|
+
utilizando los valores energéticos de cada alimento.</p>
|
149
|
+
|
150
|
+
<h2 id="label-Documentaci-C3-B3n">Documentación<span><a href="#label-Documentaci-C3-B3n">¶</a> <a href="#top">↑</a></span></h2>
|
151
|
+
|
152
|
+
<p>Para generar la documentación en Ruby he hecho uso de la herramienta
|
153
|
+
<strong>rdoc</strong> la cual he instalado mediante: <code>gem install
|
154
|
+
rdoc</code> Y tras haber comentado el código fuente he generado la
|
155
|
+
documentación con: <code>rdoc</code> Se ha generado un directorio
|
156
|
+
<strong>docs</strong> en mi directorio de trabajo en el que se incluye el
|
157
|
+
fichero donde se puede encontrar toda la documentación:</p>
|
158
|
+
|
159
|
+
<p><strong>docs/index.html</strong></p>
|
160
|
+
</main>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<footer id="validator-badges" role="contentinfo">
|
165
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
166
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
167
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
168
|
+
</footer>
|
169
|
+
|
data/docs/Rakefile.html
ADDED
@@ -0,0 +1,98 @@
|
|
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
|
+
<body id="top" role="document" class="file">
|
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="project-metadata">
|
57
|
+
<div id="fileindex-section" class="nav-section">
|
58
|
+
<h3>Pages</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
63
|
+
|
64
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
65
|
+
|
66
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
67
|
+
|
68
|
+
<li><a href="./README_md.html">README</a>
|
69
|
+
|
70
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
71
|
+
|
72
|
+
<li><a href="./alimento_gemspec.html">alimento.gemspec</a>
|
73
|
+
|
74
|
+
<li><a href="./bin/setup.html">setup</a>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
</nav>
|
81
|
+
|
82
|
+
<main role="main" aria-label="Page Rakefile">
|
83
|
+
|
84
|
+
<p>require “bundler/gem_tasks” require “rspec/core/rake_task”</p>
|
85
|
+
|
86
|
+
<p>RSpec::Core::RakeTask.new(:spec)</p>
|
87
|
+
|
88
|
+
<p>task :default => :spec</p>
|
89
|
+
</main>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<footer id="validator-badges" role="contentinfo">
|
94
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
95
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
96
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
97
|
+
</footer>
|
98
|
+
|
@@ -0,0 +1,133 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>alimento.gemspec - 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="file">
|
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="project-metadata">
|
57
|
+
<div id="fileindex-section" class="nav-section">
|
58
|
+
<h3>Pages</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
63
|
+
|
64
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
65
|
+
|
66
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
67
|
+
|
68
|
+
<li><a href="./README_md.html">README</a>
|
69
|
+
|
70
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
71
|
+
|
72
|
+
<li><a href="./alimento_gemspec.html">alimento.gemspec</a>
|
73
|
+
|
74
|
+
<li><a href="./bin/setup.html">setup</a>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
</nav>
|
81
|
+
|
82
|
+
<main role="main" aria-label="Page alimento.gemspec">
|
83
|
+
|
84
|
+
<p>lib = File.expand_path(“../lib”, __FILE__) $LOAD_PATH.unshift(lib) unless
|
85
|
+
$LOAD_PATH.include?(lib) require “alimento/version”</p>
|
86
|
+
|
87
|
+
<p>Gem::Specification.new do |spec|</p>
|
88
|
+
|
89
|
+
<pre class="ruby"><span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"alimento"</span>
|
90
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> = <span class="ruby-constant">Alimento</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
|
91
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">authors</span> = [<span class="ruby-string">"carlarxmos"</span>]
|
92
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">email</span> = [<span class="ruby-string">"carlaramosalonso@gmail.com"</span>]
|
93
|
+
|
94
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">summary</span> = <span class="ruby-string">%q{Gema que describe un alimento.}</span>
|
95
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">description</span> = <span class="ruby-string">%q{}</span>
|
96
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">homepage</span> = <span class="ruby-string">"https://github.com/ULL-ESIT-LPP-1718/tdd-carlaramos.git"</span>
|
97
|
+
|
98
|
+
<span class="ruby-comment"># Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'</span>
|
99
|
+
<span class="ruby-comment"># to allow pushing to a single host or delete this section to allow pushing to any host.</span>
|
100
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">respond_to?</span>(:<span class="ruby-identifier">metadata</span>)
|
101
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">metadata</span>[<span class="ruby-string">"allowed_push_host"</span>] = <span class="ruby-string">"https://github.com/ULL-ESIT-LPP-1718/tdd-carlaramos.git"</span>
|
102
|
+
<span class="ruby-keyword">else</span>
|
103
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">"RubyGems 2.0 or newer is required to protect against "</span> <span class="ruby-string">"public gem pushes."</span>
|
104
|
+
<span class="ruby-keyword">end</span>
|
105
|
+
|
106
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span> = <span class="ruby-value">%x`git ls-files -z`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\x0"</span>).<span class="ruby-identifier">reject</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
107
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r{^(test|spec|features)/}</span>)
|
108
|
+
<span class="ruby-keyword">end</span>
|
109
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">bindir</span> = <span class="ruby-string">"exe"</span>
|
110
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">executables</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">grep</span>(<span class="ruby-regexp">%r{^exe/}</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">f</span>) }
|
111
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">require_paths</span> = [<span class="ruby-string">"lib"</span>]
|
112
|
+
|
113
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"bundler"</span>, <span class="ruby-string">"~> 1.15"</span>
|
114
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"rake"</span>, <span class="ruby-string">"~> 10.0"</span>
|
115
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"rspec"</span>, <span class="ruby-string">"~> 3.0"</span>
|
116
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"guard"</span>
|
117
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"guard-rspec"</span>
|
118
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"guard-bundler"</span>
|
119
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"guard-rdoc"</span>
|
120
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"coveralls"</span>
|
121
|
+
</pre>
|
122
|
+
|
123
|
+
<p>end</p>
|
124
|
+
</main>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<footer id="validator-badges" role="contentinfo">
|
129
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
130
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
131
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
132
|
+
</footer>
|
133
|
+
|