Menu_dietetico 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.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/CODE_OF_CONDUCT_md.html +196 -0
- data/doc/Dieta.html +417 -0
- data/doc/Dieta_edades.html +234 -0
- data/doc/Dieta_grupos.html +233 -0
- data/doc/Gemfile.html +101 -0
- data/doc/Gemfile_lock.html +183 -0
- data/doc/Guardfile.html +181 -0
- data/doc/LICENSE_txt.html +118 -0
- data/doc/ListaEnlazada.html +396 -0
- data/doc/Object.html +117 -0
- data/doc/Prct06.html +110 -0
- data/doc/README_md.html +165 -0
- data/doc/Rakefile.html +102 -0
- data/doc/bin/setup.html +102 -0
- data/doc/created.rid +18 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +116 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +229 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/prct06_gemspec.html +136 -0
- data/doc/table_of_contents.html +175 -0
- data/lib/prct06.rb +5 -0
- data/lib/prct06/Dieta.rb +137 -0
- data/lib/prct06/ListaEnlazada.rb +67 -0
- data/lib/prct06/version.rb +3 -0
- data/prct06.gemspec +39 -0
- metadata +207 -0
data/doc/Guardfile.html
ADDED
@@ -0,0 +1,181 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Guardfile - 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="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
63
|
+
|
64
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
65
|
+
|
66
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
67
|
+
|
68
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
69
|
+
|
70
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
71
|
+
|
72
|
+
<li><a href="./README_md.html">README</a>
|
73
|
+
|
74
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
75
|
+
|
76
|
+
<li><a href="./bin/setup.html">setup</a>
|
77
|
+
|
78
|
+
<li><a href="./prct06_gemspec.html">prct06.gemspec</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
|
86
|
+
<main role="main" aria-label="Page Guardfile">
|
87
|
+
|
88
|
+
<p># A sample <a href="Guardfile.html">Guardfile</a> # More info at <a
|
89
|
+
href="https://github.com/guard/guard#readme">github.com/guard/guard#readme</a></p>
|
90
|
+
|
91
|
+
<p>## Uncomment and set this to only include directories you want to watch #
|
92
|
+
directories %w(app lib config test spec features) \ # .select{|d|
|
93
|
+
Dir.exists?(d) ? d : UI.warning(“Directory #{d} does not exist”)}</p>
|
94
|
+
|
95
|
+
<p>## Note: if you are using the `directories` clause above and you are not ##
|
96
|
+
watching the project directory ('.'), then you will want to move ##
|
97
|
+
the <a href="Guardfile.html">Guardfile</a> to a watched dir and symlink it
|
98
|
+
back, e.g. # # $ mkdir config # $ mv <a
|
99
|
+
href="Guardfile.html">Guardfile</a> config/ # $ ln -s config/Guardfile . #
|
100
|
+
# and, you'll have to watch “config/Guardfile” instead of “Guardfile”</p>
|
101
|
+
|
102
|
+
<p>guard :bundler do</p>
|
103
|
+
|
104
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler'</span>
|
105
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler/verify'</span>
|
106
|
+
<span class="ruby-identifier">helper</span> = <span class="ruby-constant">Guard</span><span class="ruby-operator">::</span><span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Verify</span>.<span class="ruby-identifier">new</span>
|
107
|
+
|
108
|
+
<span class="ruby-identifier">files</span> = [<span class="ruby-string">'Gemfile'</span>]
|
109
|
+
<span class="ruby-identifier">files</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Dir</span>[<span class="ruby-string">'*.gemspec'</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">helper</span>.<span class="ruby-identifier">uses_gemspec?</span>(<span class="ruby-identifier">f</span>) }
|
110
|
+
|
111
|
+
<span class="ruby-comment"># Assume files are symlinked from somewhere</span>
|
112
|
+
<span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">watch</span>(<span class="ruby-identifier">helper</span>.<span class="ruby-identifier">real_path</span>(<span class="ruby-identifier">file</span>)) }
|
113
|
+
</pre>
|
114
|
+
|
115
|
+
<p>end</p>
|
116
|
+
|
117
|
+
<p># Note: The cmd option is now required due to the increasing number of ways
|
118
|
+
# rspec may be run, below are examples of the most common uses. # *
|
119
|
+
bundler: 'bundle exec rspec' # * bundler binstubs:
|
120
|
+
'bin/rspec' # * spring: 'bin/rspec' (This will use spring
|
121
|
+
if running and you have # installed the spring
|
122
|
+
binstubs per the docs) # * zeus: 'zeus rspec' (requires the server
|
123
|
+
to be started separately) # * 'just' rspec: 'rspec'</p>
|
124
|
+
|
125
|
+
<p>guard :rspec, cmd: “bundle exec rspec” do</p>
|
126
|
+
|
127
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">"guard/rspec/dsl"</span>
|
128
|
+
<span class="ruby-identifier">dsl</span> = <span class="ruby-constant">Guard</span><span class="ruby-operator">::</span><span class="ruby-constant">RSpec</span><span class="ruby-operator">::</span><span class="ruby-constant">Dsl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>)
|
129
|
+
|
130
|
+
<span class="ruby-comment"># Feel free to open issues for suggestions and improvements</span>
|
131
|
+
|
132
|
+
<span class="ruby-comment"># RSpec files</span>
|
133
|
+
<span class="ruby-identifier">rspec</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rspec</span>
|
134
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_helper</span>) { <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_dir</span> }
|
135
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_support</span>) { <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_dir</span> }
|
136
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_files</span>)
|
137
|
+
|
138
|
+
<span class="ruby-comment"># Ruby files</span>
|
139
|
+
<span class="ruby-identifier">ruby</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">ruby</span>
|
140
|
+
<span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">watch_spec_files_for</span>(<span class="ruby-identifier">ruby</span>.<span class="ruby-identifier">lib_files</span>)
|
141
|
+
|
142
|
+
<span class="ruby-comment"># Rails files</span>
|
143
|
+
<span class="ruby-identifier">rails</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rails</span>(<span class="ruby-identifier">view_extensions</span><span class="ruby-operator">:</span> <span class="ruby-node">%w(erb haml slim)</span>)
|
144
|
+
<span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">watch_spec_files_for</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">app_files</span>)
|
145
|
+
<span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">watch_spec_files_for</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">views</span>)
|
146
|
+
|
147
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">controllers</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
|
148
|
+
[
|
149
|
+
<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"routing/#{m[1]}_routing"</span>),
|
150
|
+
<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"controllers/#{m[1]}_controller"</span>),
|
151
|
+
<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"acceptance/#{m[1]}"</span>)
|
152
|
+
]
|
153
|
+
<span class="ruby-keyword">end</span>
|
154
|
+
|
155
|
+
<span class="ruby-comment"># Rails config changes</span>
|
156
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">spec_helper</span>) { <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_dir</span> }
|
157
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">routes</span>) { <span class="ruby-node">"#{rspec.spec_dir}/routing"</span> }
|
158
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">app_controller</span>) { <span class="ruby-node">"#{rspec.spec_dir}/controllers"</span> }
|
159
|
+
|
160
|
+
<span class="ruby-comment"># Capybara features specs</span>
|
161
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">view_dirs</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"features/#{m[1]}"</span>) }
|
162
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">layouts</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"features/#{m[1]}"</span>) }
|
163
|
+
|
164
|
+
<span class="ruby-comment"># Turnip features and steps</span>
|
165
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{^spec/acceptance/(.+)\.feature$}</span>)
|
166
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{^spec/acceptance/steps/(.+)_steps\.rb$}</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
|
167
|
+
<span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">"**/#{m[1]}.feature"</span>)][<span class="ruby-value">0</span>] <span class="ruby-operator">||</span> <span class="ruby-string">"spec/acceptance"</span>
|
168
|
+
<span class="ruby-keyword">end</span>
|
169
|
+
</pre>
|
170
|
+
|
171
|
+
<p>end</p>
|
172
|
+
</main>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<footer id="validator-badges" role="contentinfo">
|
177
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
178
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
179
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
180
|
+
</footer>
|
181
|
+
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>LICENSE - 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="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
63
|
+
|
64
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
65
|
+
|
66
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
67
|
+
|
68
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
69
|
+
|
70
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
71
|
+
|
72
|
+
<li><a href="./README_md.html">README</a>
|
73
|
+
|
74
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
75
|
+
|
76
|
+
<li><a href="./bin/setup.html">setup</a>
|
77
|
+
|
78
|
+
<li><a href="./prct06_gemspec.html">prct06.gemspec</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
|
86
|
+
<main role="main" aria-label="Page LICENSE.txt">
|
87
|
+
|
88
|
+
<p>The MIT License (MIT)</p>
|
89
|
+
|
90
|
+
<p>Copyright © 2016 TODO: Write your name</p>
|
91
|
+
|
92
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
93
|
+
copy of this software and associated documentation files (the “Software”),
|
94
|
+
to deal in the Software without restriction, including without limitation
|
95
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
96
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
97
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
98
|
+
|
99
|
+
<p>The above copyright notice and this permission notice shall be included in
|
100
|
+
all copies or substantial portions of the Software.</p>
|
101
|
+
|
102
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
103
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
104
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
105
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
106
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
107
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
108
|
+
DEALINGS IN THE SOFTWARE.</p>
|
109
|
+
</main>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
<footer id="validator-badges" role="contentinfo">
|
114
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
115
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
116
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
117
|
+
</footer>
|
118
|
+
|
@@ -0,0 +1,396 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class ListaEnlazada - 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">Enumerable</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-each">#each</a>
|
88
|
+
|
89
|
+
<li ><a href="#method-i-pop">#pop</a>
|
90
|
+
|
91
|
+
<li ><a href="#method-i-push">#push</a>
|
92
|
+
|
93
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
94
|
+
|
95
|
+
</ul>
|
96
|
+
</div>
|
97
|
+
|
98
|
+
</div>
|
99
|
+
</nav>
|
100
|
+
|
101
|
+
<main role="main" aria-labelledby="class-ListaEnlazada">
|
102
|
+
<h1 id="class-ListaEnlazada" class="class">
|
103
|
+
class ListaEnlazada
|
104
|
+
</h1>
|
105
|
+
|
106
|
+
<section class="description">
|
107
|
+
|
108
|
+
<p>Clase que implementa una lista enlazada</p>
|
109
|
+
|
110
|
+
</section>
|
111
|
+
|
112
|
+
|
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-bottom" class="method-detail">
|
130
|
+
<div class="method-heading attribute-method-heading">
|
131
|
+
<span class="method-name">bottom</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-size" class="method-detail">
|
143
|
+
<div class="method-heading attribute-method-heading">
|
144
|
+
<span class="method-name">size</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-top" class="method-detail">
|
156
|
+
<div class="method-heading attribute-method-heading">
|
157
|
+
<span class="method-name">top</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
|
+
</section>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
173
|
+
<header>
|
174
|
+
<h3>Public Class Methods</h3>
|
175
|
+
</header>
|
176
|
+
|
177
|
+
|
178
|
+
<div id="method-c-new" class="method-detail ">
|
179
|
+
|
180
|
+
<div class="method-heading">
|
181
|
+
<span class="method-name">new</span><span
|
182
|
+
class="method-args">()</span>
|
183
|
+
|
184
|
+
<span class="method-click-advice">click to toggle source</span>
|
185
|
+
|
186
|
+
</div>
|
187
|
+
|
188
|
+
|
189
|
+
<div class="method-description">
|
190
|
+
|
191
|
+
<p>Al inicializarse el objeto. El tamaño de la lista es cero y tanto @bottom
|
192
|
+
como @top son nil.</p>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<div class="method-source-code" id="new-source">
|
198
|
+
<pre><span class="ruby-comment"># File lib/prct06/ListaEnlazada.rb, line 14</span>
|
199
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
|
200
|
+
<span class="ruby-ivar">@bottom</span> = <span class="ruby-keyword">nil</span>
|
201
|
+
<span class="ruby-ivar">@top</span> = <span class="ruby-keyword">nil</span>
|
202
|
+
<span class="ruby-ivar">@size</span> = <span class="ruby-value">0</span>
|
203
|
+
<span class="ruby-keyword">end</span></pre>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
</div>
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
</div>
|
212
|
+
|
213
|
+
|
214
|
+
</section>
|
215
|
+
|
216
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
217
|
+
<header>
|
218
|
+
<h3>Public Instance Methods</h3>
|
219
|
+
</header>
|
220
|
+
|
221
|
+
|
222
|
+
<div id="method-i-each" class="method-detail ">
|
223
|
+
|
224
|
+
<div class="method-heading">
|
225
|
+
<span class="method-name">each</span><span
|
226
|
+
class="method-args">() { |value| ... }</span>
|
227
|
+
|
228
|
+
<span class="method-click-advice">click to toggle source</span>
|
229
|
+
|
230
|
+
</div>
|
231
|
+
|
232
|
+
|
233
|
+
<div class="method-description">
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
<div class="method-source-code" id="each-source">
|
241
|
+
<pre><span class="ruby-comment"># File lib/prct06/ListaEnlazada.rb, line 49</span>
|
242
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>
|
243
|
+
<span class="ruby-identifier">i</span> = <span class="ruby-identifier">bottom</span>
|
244
|
+
<span class="ruby-keyword">while</span> <span class="ruby-identifier">i!</span>=<span class="ruby-keyword">nil</span> <span class="ruby-keyword">do</span>
|
245
|
+
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">value</span>
|
246
|
+
<span class="ruby-identifier">i</span> = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">next</span>;
|
247
|
+
<span class="ruby-keyword">end</span>
|
248
|
+
<span class="ruby-keyword">end</span></pre>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
</div>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</div>
|
257
|
+
|
258
|
+
|
259
|
+
<div id="method-i-pop" class="method-detail ">
|
260
|
+
|
261
|
+
<div class="method-heading">
|
262
|
+
<span class="method-name">pop</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>Elimina el último elemento añadido a la lista. En este caso, @top apuntará
|
273
|
+
al elemento anterior.</p>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
<div class="method-source-code" id="pop-source">
|
279
|
+
<pre><span class="ruby-comment"># File lib/prct06/ListaEnlazada.rb, line 37</span>
|
280
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">pop</span>
|
281
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@top</span><span class="ruby-operator">==</span><span class="ruby-keyword">nil</span>
|
282
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-string">"Error. La lista está vacía."</span>
|
283
|
+
<span class="ruby-keyword">else</span>
|
284
|
+
<span class="ruby-ivar">@top</span> = <span class="ruby-ivar">@top</span>.<span class="ruby-identifier">previous</span>
|
285
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@top</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
|
286
|
+
<span class="ruby-ivar">@bottom</span> = <span class="ruby-keyword">nil</span>
|
287
|
+
<span class="ruby-keyword">end</span>
|
288
|
+
<span class="ruby-ivar">@size</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
|
289
|
+
<span class="ruby-keyword">end</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-push" class="method-detail ">
|
302
|
+
|
303
|
+
<div class="method-heading">
|
304
|
+
<span class="method-name">push</span><span
|
305
|
+
class="method-args">(element)</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>Añade un elemento al final de la lista. @top apuntará al último elemento
|
315
|
+
añadido</p>
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
<div class="method-source-code" id="push-source">
|
321
|
+
<pre><span class="ruby-comment"># File lib/prct06/ListaEnlazada.rb, line 21</span>
|
322
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">push</span> (<span class="ruby-identifier">element</span>)
|
323
|
+
<span class="ruby-identifier">aux</span> = <span class="ruby-ivar">@top</span>
|
324
|
+
<span class="ruby-ivar">@top</span> = <span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">element</span>, <span class="ruby-keyword">nil</span> ,<span class="ruby-ivar">@top</span>)
|
325
|
+
<span class="ruby-keyword">if</span> (<span class="ruby-identifier">aux!</span>=<span class="ruby-keyword">nil</span>)
|
326
|
+
<span class="ruby-identifier">aux</span>.<span class="ruby-identifier">next</span> = <span class="ruby-ivar">@top</span>
|
327
|
+
<span class="ruby-keyword">end</span>
|
328
|
+
<span class="ruby-keyword">if</span> (<span class="ruby-ivar">@bottom</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@bottom</span>.<span class="ruby-identifier">next</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span> )
|
329
|
+
<span class="ruby-ivar">@bottom</span>.<span class="ruby-identifier">next</span> = <span class="ruby-ivar">@top</span>
|
330
|
+
<span class="ruby-keyword">end</span>
|
331
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@bottom</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
|
332
|
+
<span class="ruby-ivar">@bottom</span> = <span class="ruby-ivar">@top</span>
|
333
|
+
<span class="ruby-keyword">end</span>
|
334
|
+
<span class="ruby-ivar">@size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
335
|
+
<span class="ruby-keyword">end</span></pre>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
</div>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
</div>
|
344
|
+
|
345
|
+
|
346
|
+
<div id="method-i-to_s" class="method-detail ">
|
347
|
+
|
348
|
+
<div class="method-heading">
|
349
|
+
<span class="method-name">to_s</span><span
|
350
|
+
class="method-args">()</span>
|
351
|
+
|
352
|
+
<span class="method-click-advice">click to toggle source</span>
|
353
|
+
|
354
|
+
</div>
|
355
|
+
|
356
|
+
|
357
|
+
<div class="method-description">
|
358
|
+
|
359
|
+
<p>Método que permite mostrar el último elemento añadido en la lista. En caso
|
360
|
+
de que la lista esté vacía, mostrará el mensaje “Error. La lista está
|
361
|
+
vacía”</p>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
<div class="method-source-code" id="to_s-source">
|
367
|
+
<pre><span class="ruby-comment"># File lib/prct06/ListaEnlazada.rb, line 59</span>
|
368
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
369
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@top</span><span class="ruby-operator">==</span><span class="ruby-keyword">nil</span>
|
370
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-string">"Error. La lista está vacía."</span>
|
371
|
+
<span class="ruby-keyword">else</span>
|
372
|
+
<span class="ruby-ivar">@top</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_s</span>
|
373
|
+
<span class="ruby-keyword">end</span>
|
374
|
+
<span class="ruby-keyword">end</span></pre>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
</div>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
</div>
|
383
|
+
|
384
|
+
|
385
|
+
</section>
|
386
|
+
|
387
|
+
</section>
|
388
|
+
</main>
|
389
|
+
|
390
|
+
|
391
|
+
<footer id="validator-badges" role="contentinfo">
|
392
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
393
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
394
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
395
|
+
</footer>
|
396
|
+
|