linkedlist_alu0100221879 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 (67) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +3 -0
  4. data/Gemfile +4 -0
  5. data/Guardfile +82 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +9 -0
  8. data/Rakefile +11 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +7 -0
  11. data/html/Linkedlist.html +112 -0
  12. data/html/Linkedlist/List.html +429 -0
  13. data/html/Linkedlist/Menu.html +611 -0
  14. data/html/Linkedlist/MenuEdades.html +267 -0
  15. data/html/Linkedlist/MenuGrupos.html +266 -0
  16. data/html/Linkedlist/Node.html +206 -0
  17. data/html/Linkedlist/Plato.html +317 -0
  18. data/html/created.rid +4 -0
  19. data/html/css/fonts.css +167 -0
  20. data/html/css/rdoc.css +590 -0
  21. data/html/fonts/Lato-Light.ttf +0 -0
  22. data/html/fonts/Lato-LightItalic.ttf +0 -0
  23. data/html/fonts/Lato-Regular.ttf +0 -0
  24. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  25. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  26. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  27. data/html/images/add.png +0 -0
  28. data/html/images/arrow_up.png +0 -0
  29. data/html/images/brick.png +0 -0
  30. data/html/images/brick_link.png +0 -0
  31. data/html/images/bug.png +0 -0
  32. data/html/images/bullet_black.png +0 -0
  33. data/html/images/bullet_toggle_minus.png +0 -0
  34. data/html/images/bullet_toggle_plus.png +0 -0
  35. data/html/images/date.png +0 -0
  36. data/html/images/delete.png +0 -0
  37. data/html/images/find.png +0 -0
  38. data/html/images/loadingAnimation.gif +0 -0
  39. data/html/images/macFFBgHack.png +0 -0
  40. data/html/images/package.png +0 -0
  41. data/html/images/page_green.png +0 -0
  42. data/html/images/page_white_text.png +0 -0
  43. data/html/images/page_white_width.png +0 -0
  44. data/html/images/plugin.png +0 -0
  45. data/html/images/ruby.png +0 -0
  46. data/html/images/tag_blue.png +0 -0
  47. data/html/images/tag_green.png +0 -0
  48. data/html/images/transparent.png +0 -0
  49. data/html/images/wrench.png +0 -0
  50. data/html/images/wrench_orange.png +0 -0
  51. data/html/images/zoom.png +0 -0
  52. data/html/index.html +93 -0
  53. data/html/js/darkfish.js +161 -0
  54. data/html/js/jquery.js +4 -0
  55. data/html/js/navigation.js +142 -0
  56. data/html/js/navigation.js.gz +0 -0
  57. data/html/js/search.js +109 -0
  58. data/html/js/search_index.js +1 -0
  59. data/html/js/search_index.js.gz +0 -0
  60. data/html/js/searcher.js +229 -0
  61. data/html/js/searcher.js.gz +0 -0
  62. data/html/table_of_contents.html +198 -0
  63. data/lib/linkedlist.rb +6 -0
  64. data/lib/linkedlist/linkedlist.rb +302 -0
  65. data/lib/linkedlist/version.rb +3 -0
  66. data/linkedlist.gemspec +29 -0
  67. metadata +207 -0
@@ -0,0 +1,206 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Linkedlist::Node - 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">Object
63
+
64
+ </div>
65
+
66
+
67
+
68
+ <!-- Method Quickref -->
69
+ <div id="method-list-section" class="nav-section">
70
+ <h3>Methods</h3>
71
+
72
+ <ul class="link-list" role="directory">
73
+
74
+ <li ><a href="#method-c-new">::new</a>
75
+
76
+ </ul>
77
+ </div>
78
+
79
+ </div>
80
+ </nav>
81
+
82
+ <main role="main" aria-labelledby="class-Linkedlist::Node">
83
+ <h1 id="class-Linkedlist::Node" class="class">
84
+ class Linkedlist::Node
85
+ </h1>
86
+
87
+ <section class="description">
88
+
89
+ <p>Nodo que contiene un menú dietético de cualquier tipo.</p>
90
+
91
+ </section>
92
+
93
+
94
+
95
+
96
+ <section id="5Buntitled-5D" class="documentation-section">
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ <section class="attribute-method-details" class="method-section">
105
+ <header>
106
+ <h3>Attributes</h3>
107
+ </header>
108
+
109
+
110
+ <div id="attribute-i-next_node" class="method-detail">
111
+ <div class="method-heading attribute-method-heading">
112
+ <span class="method-name">next_node</span><span
113
+ class="attribute-access-type">[RW]</span>
114
+ </div>
115
+
116
+ <div class="method-description">
117
+
118
+ <p>Enlace al siguiente nodo de la lista de menús dietéticos.</p>
119
+
120
+ </div>
121
+ </div>
122
+
123
+ <div id="attribute-i-prev_node" class="method-detail">
124
+ <div class="method-heading attribute-method-heading">
125
+ <span class="method-name">prev_node</span><span
126
+ class="attribute-access-type">[RW]</span>
127
+ </div>
128
+
129
+ <div class="method-description">
130
+
131
+ <p>Enlace al anterior nodo de la lista de menús dietéticos.</p>
132
+
133
+ </div>
134
+ </div>
135
+
136
+ <div id="attribute-i-value" class="method-detail">
137
+ <div class="method-heading attribute-method-heading">
138
+ <span class="method-name">value</span><span
139
+ class="attribute-access-type">[RW]</span>
140
+ </div>
141
+
142
+ <div class="method-description">
143
+
144
+ <p>Valor del nodo (menú dietético).</p>
145
+
146
+ </div>
147
+ </div>
148
+
149
+ </section>
150
+
151
+
152
+
153
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
154
+ <header>
155
+ <h3>Public Class Methods</h3>
156
+ </header>
157
+
158
+
159
+ <div id="method-c-new" class="method-detail ">
160
+
161
+ <div class="method-heading">
162
+ <span class="method-name">new</span><span
163
+ class="method-args">(value, next_node = nil, prev_node = nil)</span>
164
+
165
+ <span class="method-click-advice">click to toggle source</span>
166
+
167
+ </div>
168
+
169
+
170
+ <div class="method-description">
171
+
172
+ <p>Inicializa el nodo con el valor <em>value</em>. Si se especifican también
173
+ inicializa los enlaces al siguiente y anterior nodo de la lista.</p>
174
+
175
+
176
+
177
+
178
+ <div class="method-source-code" id="new-source">
179
+ <pre><span class="ruby-comment"># File lib/linkedlist/linkedlist.rb, line 201</span>
180
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">next_node</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">prev_node</span> = <span class="ruby-keyword">nil</span>)
181
+ <span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
182
+ <span class="ruby-ivar">@next_node</span> = <span class="ruby-identifier">next_node</span>
183
+ <span class="ruby-ivar">@prev_node</span> = <span class="ruby-identifier">prev_node</span>
184
+ <span class="ruby-keyword">end</span></pre>
185
+ </div>
186
+
187
+ </div>
188
+
189
+
190
+
191
+
192
+ </div>
193
+
194
+
195
+ </section>
196
+
197
+ </section>
198
+ </main>
199
+
200
+
201
+ <footer id="validator-badges" role="contentinfo">
202
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
203
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
204
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
205
+ </footer>
206
+
@@ -0,0 +1,317 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Linkedlist::Plato - 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">Object
63
+
64
+ </div>
65
+
66
+
67
+
68
+ <!-- Method Quickref -->
69
+ <div id="method-list-section" class="nav-section">
70
+ <h3>Methods</h3>
71
+
72
+ <ul class="link-list" role="directory">
73
+
74
+ <li ><a href="#method-c-new">::new</a>
75
+
76
+ <li ><a href="#method-i-3D-3D">#==</a>
77
+
78
+ <li ><a href="#method-i-eql-3F">#eql?</a>
79
+
80
+ <li ><a href="#method-i-to_s">#to_s</a>
81
+
82
+ </ul>
83
+ </div>
84
+
85
+ </div>
86
+ </nav>
87
+
88
+ <main role="main" aria-labelledby="class-Linkedlist::Plato">
89
+ <h1 id="class-Linkedlist::Plato" class="class">
90
+ class Linkedlist::Plato
91
+ </h1>
92
+
93
+ <section class="description">
94
+
95
+ <p><a href="Plato.html">Plato</a> de un menú.</p>
96
+
97
+ </section>
98
+
99
+
100
+
101
+
102
+ <section id="5Buntitled-5D" class="documentation-section">
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <section class="attribute-method-details" class="method-section">
111
+ <header>
112
+ <h3>Attributes</h3>
113
+ </header>
114
+
115
+
116
+ <div id="attribute-i-descr" class="method-detail">
117
+ <div class="method-heading attribute-method-heading">
118
+ <span class="method-name">descr</span><span
119
+ class="attribute-access-type">[R]</span>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+
124
+ <p>Descripción del plato.</p>
125
+
126
+ </div>
127
+ </div>
128
+
129
+ <div id="attribute-i-ingesta" class="method-detail">
130
+ <div class="method-heading attribute-method-heading">
131
+ <span class="method-name">ingesta</span><span
132
+ class="attribute-access-type">[R]</span>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+
137
+ <p>Ingesta en gramos.</p>
138
+
139
+ </div>
140
+ </div>
141
+
142
+ <div id="attribute-i-porcion" class="method-detail">
143
+ <div class="method-heading attribute-method-heading">
144
+ <span class="method-name">porcion</span><span
145
+ class="attribute-access-type">[R]</span>
146
+ </div>
147
+
148
+ <div class="method-description">
149
+
150
+ <p>Tamaño de la porción recomendada.</p>
151
+
152
+ </div>
153
+ </div>
154
+
155
+ </section>
156
+
157
+
158
+
159
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
160
+ <header>
161
+ <h3>Public Class Methods</h3>
162
+ </header>
163
+
164
+
165
+ <div id="method-c-new" class="method-detail ">
166
+
167
+ <div class="method-heading">
168
+ <span class="method-name">new</span><span
169
+ class="method-args">(descr, porcion, ingesta)</span>
170
+
171
+ <span class="method-click-advice">click to toggle source</span>
172
+
173
+ </div>
174
+
175
+
176
+ <div class="method-description">
177
+
178
+ <p>Inicializa el plato con los datos pasados.</p>
179
+
180
+
181
+
182
+
183
+ <div class="method-source-code" id="new-source">
184
+ <pre><span class="ruby-comment"># File lib/linkedlist/linkedlist.rb, line 16</span>
185
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">descr</span>, <span class="ruby-identifier">porcion</span>, <span class="ruby-identifier">ingesta</span>)
186
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;[Plato.initialize] La ingesta en gramos debe ser mayor que 0&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">ingesta</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
187
+ <span class="ruby-ivar">@descr</span>, <span class="ruby-ivar">@porcion</span>, <span class="ruby-ivar">@ingesta</span> = <span class="ruby-identifier">descr</span>, <span class="ruby-identifier">porcion</span>, <span class="ruby-identifier">ingesta</span>
188
+ <span class="ruby-keyword">end</span></pre>
189
+ </div>
190
+
191
+ </div>
192
+
193
+
194
+
195
+
196
+ </div>
197
+
198
+
199
+ </section>
200
+
201
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
202
+ <header>
203
+ <h3>Public Instance Methods</h3>
204
+ </header>
205
+
206
+
207
+ <div id="method-i-3D-3D" class="method-detail ">
208
+
209
+ <div class="method-heading">
210
+ <span class="method-name">==</span><span
211
+ class="method-args">(plato)</span>
212
+
213
+ <span class="method-click-advice">click to toggle source</span>
214
+
215
+ </div>
216
+
217
+
218
+ <div class="method-description">
219
+
220
+ <p>Comprobación de la igualdad entre platos.</p>
221
+
222
+
223
+
224
+
225
+ <div class="method-source-code" id="3D-3D-source">
226
+ <pre><span class="ruby-comment"># File lib/linkedlist/linkedlist.rb, line 22</span>
227
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">plato</span>)
228
+ <span class="ruby-keyword">return</span> <span class="ruby-ivar">@descr</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">plato</span>.<span class="ruby-identifier">descr</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@porcion</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">plato</span>.<span class="ruby-identifier">porcion</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@ingesta</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">plato</span>.<span class="ruby-identifier">ingesta</span>
229
+ <span class="ruby-keyword">end</span></pre>
230
+ </div>
231
+
232
+ </div>
233
+
234
+
235
+
236
+
237
+ </div>
238
+
239
+
240
+ <div id="method-i-eql-3F" class="method-detail ">
241
+
242
+ <div class="method-heading">
243
+ <span class="method-name">eql?</span><span
244
+ class="method-args">(plato)</span>
245
+
246
+ <span class="method-click-advice">click to toggle source</span>
247
+
248
+ </div>
249
+
250
+
251
+ <div class="method-description">
252
+
253
+ <p>Comprobación de la igualdad entre platos.</p>
254
+
255
+
256
+
257
+
258
+ <div class="method-source-code" id="eql-3F-source">
259
+ <pre><span class="ruby-comment"># File lib/linkedlist/linkedlist.rb, line 27</span>
260
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">plato</span>)
261
+ <span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">plato</span>
262
+ <span class="ruby-keyword">end</span></pre>
263
+ </div>
264
+
265
+ </div>
266
+
267
+
268
+
269
+
270
+ </div>
271
+
272
+
273
+ <div id="method-i-to_s" class="method-detail ">
274
+
275
+ <div class="method-heading">
276
+ <span class="method-name">to_s</span><span
277
+ class="method-args">()</span>
278
+
279
+ <span class="method-click-advice">click to toggle source</span>
280
+
281
+ </div>
282
+
283
+
284
+ <div class="method-description">
285
+
286
+ <p>Devuelve el plato formateado como cadena.</p>
287
+
288
+
289
+
290
+
291
+ <div class="method-source-code" id="to_s-source">
292
+ <pre><span class="ruby-comment"># File lib/linkedlist/linkedlist.rb, line 32</span>
293
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
294
+ <span class="ruby-keyword">return</span> <span class="ruby-node">&quot;#{@descr}, #{@porcion}, #{@ingesta} g&quot;</span>
295
+ <span class="ruby-keyword">end</span></pre>
296
+ </div>
297
+
298
+ </div>
299
+
300
+
301
+
302
+
303
+ </div>
304
+
305
+
306
+ </section>
307
+
308
+ </section>
309
+ </main>
310
+
311
+
312
+ <footer id="validator-badges" role="contentinfo">
313
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
314
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
315
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
316
+ </footer>
317
+