alimento-alu0101132907 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 +2 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +8 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +97 -0
- data/Guardfile +84 -0
- data/README.md +27 -0
- data/Rakefile +6 -0
- data/alimento.gemspec +35 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/Alimento.html +133 -0
- data/docs/Alimento/Comida.html +1129 -0
- data/docs/Alimento/Error.html +124 -0
- data/docs/Dll.html +1762 -0
- data/docs/Dll/Node.html +410 -0
- data/docs/Gemfile.html +100 -0
- data/docs/Gemfile_lock.html +178 -0
- data/docs/Guardfile.html +182 -0
- data/docs/Plato.html +1002 -0
- data/docs/PlatoEfi.html +561 -0
- data/docs/README_md.html +135 -0
- data/docs/Rakefile.html +101 -0
- data/docs/_index.html +183 -0
- data/docs/alimento_gemspec.html +132 -0
- data/docs/bin/setup.html +101 -0
- data/docs/class_list.html +51 -0
- data/docs/created.rid +16 -0
- data/docs/css/common.css +1 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/rdoc.css +611 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +102 -0
- data/docs/file_list.html +56 -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/frames.html +17 -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 +102 -0
- data/docs/js/app.js +303 -0
- data/docs/js/darkfish.js +84 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/js/navigation.js +106 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -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/method_list.html +411 -0
- data/docs/table_of_contents.html +259 -0
- data/docs/top-level-namespace.html +112 -0
- data/lib/alimento.rb +46 -0
- data/lib/alimento/alimento.rb +70 -0
- data/lib/alimento/dll.rb +164 -0
- data/lib/alimento/plato.rb +173 -0
- data/lib/alimento/version.rb +3 -0
- metadata +243 -0
@@ -0,0 +1,178 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Gemfile.lock - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
<body id="top" role="document" class="file">
|
26
|
+
<nav role="navigation">
|
27
|
+
<div id="project-navigation">
|
28
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
29
|
+
<h2>
|
30
|
+
<a href="./index.html" rel="home">Home</a>
|
31
|
+
</h2>
|
32
|
+
|
33
|
+
<div id="table-of-contents-navigation">
|
34
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
35
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
36
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
41
|
+
<form action="#" method="get" accept-charset="utf-8">
|
42
|
+
<div id="search-field-wrapper">
|
43
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
44
|
+
aria-autocomplete="list" aria-controls="search-results"
|
45
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
46
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<ul id="search-results" aria-label="Search Results"
|
50
|
+
aria-busy="false" aria-expanded="false"
|
51
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
52
|
+
</form>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
<div id="project-metadata">
|
60
|
+
<div id="fileindex-section" class="nav-section">
|
61
|
+
<h3>Pages</h3>
|
62
|
+
|
63
|
+
<ul class="link-list">
|
64
|
+
|
65
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
66
|
+
|
67
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
68
|
+
|
69
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
70
|
+
|
71
|
+
<li><a href="./README_md.html">README</a>
|
72
|
+
|
73
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
74
|
+
|
75
|
+
<li><a href="./alimento_gemspec.html">alimento.gemspec</a>
|
76
|
+
|
77
|
+
<li><a href="./bin/setup.html">setup</a>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-label="Page Gemfile.lock">
|
86
|
+
|
87
|
+
<p>PATH</p>
|
88
|
+
|
89
|
+
<pre>remote: .
|
90
|
+
specs:
|
91
|
+
alimento (0.1.0)</pre>
|
92
|
+
|
93
|
+
<p>GEM</p>
|
94
|
+
|
95
|
+
<pre>remote: https://rubygems.org/
|
96
|
+
specs:
|
97
|
+
coderay (1.1.2)
|
98
|
+
diff-lcs (1.3)
|
99
|
+
ffi (1.11.2)
|
100
|
+
formatador (0.2.5)
|
101
|
+
guard (2.16.1)
|
102
|
+
formatador (>= 0.2.4)
|
103
|
+
listen (>= 2.7, < 4.0)
|
104
|
+
lumberjack (>= 1.0.12, < 2.0)
|
105
|
+
nenv (~> 0.1)
|
106
|
+
notiffany (~> 0.0)
|
107
|
+
pry (>= 0.9.12)
|
108
|
+
shellany (~> 0.0)
|
109
|
+
thor (>= 0.18.1)
|
110
|
+
guard-bundler (2.2.1)
|
111
|
+
bundler (>= 1.3.0, < 3)
|
112
|
+
guard (~> 2.2)
|
113
|
+
guard-compat (~> 1.1)
|
114
|
+
guard-compat (1.2.1)
|
115
|
+
guard-rspec (4.7.3)
|
116
|
+
guard (~> 2.1)
|
117
|
+
guard-compat (~> 1.1)
|
118
|
+
rspec (>= 2.99.0, < 4.0)
|
119
|
+
listen (3.2.0)
|
120
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
121
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
122
|
+
lumberjack (1.0.13)
|
123
|
+
method_source (0.9.2)
|
124
|
+
nenv (0.3.0)
|
125
|
+
notiffany (0.1.3)
|
126
|
+
nenv (~> 0.1)
|
127
|
+
shellany (~> 0.0)
|
128
|
+
pry (0.12.2)
|
129
|
+
coderay (~> 1.1.0)
|
130
|
+
method_source (~> 0.9.0)
|
131
|
+
rake (10.5.0)
|
132
|
+
rb-fsevent (0.10.3)
|
133
|
+
rb-inotify (0.10.0)
|
134
|
+
ffi (~> 1.0)
|
135
|
+
rspec (3.9.0)
|
136
|
+
rspec-core (~> 3.9.0)
|
137
|
+
rspec-expectations (~> 3.9.0)
|
138
|
+
rspec-mocks (~> 3.9.0)
|
139
|
+
rspec-core (3.9.0)
|
140
|
+
rspec-support (~> 3.9.0)
|
141
|
+
rspec-expectations (3.9.0)
|
142
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
143
|
+
rspec-support (~> 3.9.0)
|
144
|
+
rspec-mocks (3.9.0)
|
145
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
146
|
+
rspec-support (~> 3.9.0)
|
147
|
+
rspec-support (3.9.0)
|
148
|
+
shellany (0.0.1)
|
149
|
+
thor (0.20.3)</pre>
|
150
|
+
|
151
|
+
<p>PLATFORMS</p>
|
152
|
+
|
153
|
+
<pre class="ruby"><span class="ruby-identifier">ruby</span>
|
154
|
+
</pre>
|
155
|
+
|
156
|
+
<p>DEPENDENCIES</p>
|
157
|
+
|
158
|
+
<pre>alimento!
|
159
|
+
bundler (~> 2.0)
|
160
|
+
guard
|
161
|
+
guard-bundler
|
162
|
+
guard-rspec
|
163
|
+
rake (~> 10.0)
|
164
|
+
rspec (~> 3.0)</pre>
|
165
|
+
|
166
|
+
<p>BUNDLED WITH</p>
|
167
|
+
|
168
|
+
<pre>2.0.2</pre>
|
169
|
+
</main>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<footer id="validator-badges" role="contentinfo">
|
174
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
175
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1.1.
|
176
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
177
|
+
</footer>
|
178
|
+
|
data/docs/Guardfile.html
ADDED
@@ -0,0 +1,182 @@
|
|
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/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
<body id="top" role="document" class="file">
|
26
|
+
<nav role="navigation">
|
27
|
+
<div id="project-navigation">
|
28
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
29
|
+
<h2>
|
30
|
+
<a href="./index.html" rel="home">Home</a>
|
31
|
+
</h2>
|
32
|
+
|
33
|
+
<div id="table-of-contents-navigation">
|
34
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
35
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
36
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
41
|
+
<form action="#" method="get" accept-charset="utf-8">
|
42
|
+
<div id="search-field-wrapper">
|
43
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
44
|
+
aria-autocomplete="list" aria-controls="search-results"
|
45
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
46
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<ul id="search-results" aria-label="Search Results"
|
50
|
+
aria-busy="false" aria-expanded="false"
|
51
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
52
|
+
</form>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
<div id="project-metadata">
|
60
|
+
<div id="fileindex-section" class="nav-section">
|
61
|
+
<h3>Pages</h3>
|
62
|
+
|
63
|
+
<ul class="link-list">
|
64
|
+
|
65
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
66
|
+
|
67
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
68
|
+
|
69
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
70
|
+
|
71
|
+
<li><a href="./README_md.html">README</a>
|
72
|
+
|
73
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
74
|
+
|
75
|
+
<li><a href="./alimento_gemspec.html">alimento.gemspec</a>
|
76
|
+
|
77
|
+
<li><a href="./bin/setup.html">setup</a>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-label="Page Guardfile">
|
86
|
+
|
87
|
+
<p># A sample <a href="Guardfile.html">Guardfile</a> # More info at <a
|
88
|
+
href="https://github.com/guard/guard#readme">github.com/guard/guard#readme</a></p>
|
89
|
+
|
90
|
+
<p>## Uncomment and set this to only include directories you want to watch #
|
91
|
+
directories %w(app lib config test spec features) \ # .select{|d|
|
92
|
+
Dir.exist?(d) ? d : UI.warning(“Directory #{d} does not exist”)}</p>
|
93
|
+
|
94
|
+
<p>## Note: if you are using the `directories` clause above and you are not ##
|
95
|
+
watching the project directory ('.'), then you will want to move ##
|
96
|
+
the <a href="Guardfile.html">Guardfile</a> to a watched dir and symlink it
|
97
|
+
back, e.g. # # $ mkdir config # $ mv <a
|
98
|
+
href="Guardfile.html">Guardfile</a> config/ # $ ln -s config/Guardfile . #
|
99
|
+
# and, you'll have to watch “config/Guardfile” instead of “Guardfile”</p>
|
100
|
+
|
101
|
+
<p>guard :bundler do</p>
|
102
|
+
|
103
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler'</span>
|
104
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler/verify'</span>
|
105
|
+
<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>
|
106
|
+
|
107
|
+
<span class="ruby-identifier">files</span> = [<span class="ruby-string">'Gemfile'</span>]
|
108
|
+
<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>) }
|
109
|
+
|
110
|
+
<span class="ruby-comment"># Assume files are symlinked from somewhere</span>
|
111
|
+
<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>)) }
|
112
|
+
</pre>
|
113
|
+
|
114
|
+
<p>end</p>
|
115
|
+
|
116
|
+
<p># Note: The cmd option is now required due to the increasing number of ways
|
117
|
+
# rspec may be run, below are examples of the most common uses. # *
|
118
|
+
bundler: 'bundle exec rspec' # * bundler binstubs:
|
119
|
+
'bin/rspec' # * spring: 'bin/rspec' (This will use spring
|
120
|
+
if running and you have # installed the spring
|
121
|
+
binstubs per the docs) # * zeus: 'zeus rspec' (requires the server
|
122
|
+
to be started separately) # * 'just' rspec: 'rspec'</p>
|
123
|
+
|
124
|
+
<p>guard :rspec, cmd: “bundle exec rspec” do</p>
|
125
|
+
|
126
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">"guard/rspec/dsl"</span>
|
127
|
+
<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>)
|
128
|
+
|
129
|
+
<span class="ruby-comment"># Feel free to open issues for suggestions and improvements</span>
|
130
|
+
<span class="ruby-comment"># Ruby source files</span>
|
131
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{^lib/alimento/(.+)\.rb$}</span>) { <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_dir</span> }
|
132
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{'lib/gema.rb'}</span>)
|
133
|
+
<span class="ruby-comment"># RSpec files</span>
|
134
|
+
<span class="ruby-identifier">rspec</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rspec</span>
|
135
|
+
<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> }
|
136
|
+
<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> }
|
137
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_files</span>)
|
138
|
+
|
139
|
+
<span class="ruby-comment"># Ruby files</span>
|
140
|
+
<span class="ruby-identifier">ruby</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">ruby</span>
|
141
|
+
<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>)
|
142
|
+
|
143
|
+
<span class="ruby-comment"># Rails files</span>
|
144
|
+
<span class="ruby-identifier">rails</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rails</span>(<span class="ruby-value">view_extensions:</span> <span class="ruby-node">%w(erb haml slim)</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">app_files</span>)
|
146
|
+
<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>)
|
147
|
+
|
148
|
+
<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>
|
149
|
+
[
|
150
|
+
<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>),
|
151
|
+
<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>),
|
152
|
+
<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>)
|
153
|
+
]
|
154
|
+
<span class="ruby-keyword">end</span>
|
155
|
+
|
156
|
+
<span class="ruby-comment"># Rails config changes</span>
|
157
|
+
<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> }
|
158
|
+
<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> }
|
159
|
+
<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> }
|
160
|
+
|
161
|
+
<span class="ruby-comment"># Capybara features specs</span>
|
162
|
+
<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>) }
|
163
|
+
<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>) }
|
164
|
+
|
165
|
+
<span class="ruby-comment"># Turnip features and steps</span>
|
166
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{^spec/acceptance/(.+)\.feature$}</span>)
|
167
|
+
<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>
|
168
|
+
<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>
|
169
|
+
<span class="ruby-keyword">end</span>
|
170
|
+
</pre>
|
171
|
+
|
172
|
+
<p>end</p>
|
173
|
+
</main>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<footer id="validator-badges" role="contentinfo">
|
178
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
179
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1.1.
|
180
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
181
|
+
</footer>
|
182
|
+
|
data/docs/Plato.html
ADDED
@@ -0,0 +1,1002 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Plato
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Plato";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (P)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Plato</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Plato
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Plato</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd>Comparable</dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/alimento/plato.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Overview</h2><div class="docstring">
|
108
|
+
<div class="discussion">
|
109
|
+
|
110
|
+
<p>Clase para representar un plato</p>
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class="tags">
|
116
|
+
|
117
|
+
|
118
|
+
</div><div id="subclasses">
|
119
|
+
<h2>Direct Known Subclasses</h2>
|
120
|
+
<p class="children"><span class='object_link'><a href="PlatoEfi.html" title="PlatoEfi (class)">PlatoEfi</a></span></p>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
127
|
+
<ul class="summary">
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#alimentos-instance_method" title="#alimentos (instance method)">#<strong>alimentos</strong> ⇒ Object </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<span class="note title readonly">readonly</span>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<span class="summary_desc"><div class='inline'>
|
152
|
+
<p>Returns the value of attribute alimentos.</p>
|
153
|
+
</div></span>
|
154
|
+
|
155
|
+
</li>
|
156
|
+
|
157
|
+
|
158
|
+
<li class="public ">
|
159
|
+
<span class="summary_signature">
|
160
|
+
|
161
|
+
<a href="#cantidades-instance_method" title="#cantidades (instance method)">#<strong>cantidades</strong> ⇒ Object </a>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</span>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<span class="note title readonly">readonly</span>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<span class="summary_desc"><div class='inline'>
|
181
|
+
<p>Returns the value of attribute cantidades.</p>
|
182
|
+
</div></span>
|
183
|
+
|
184
|
+
</li>
|
185
|
+
|
186
|
+
|
187
|
+
<li class="public ">
|
188
|
+
<span class="summary_signature">
|
189
|
+
|
190
|
+
<a href="#nombre-instance_method" title="#nombre (instance method)">#<strong>nombre</strong> ⇒ Object </a>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
</span>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<span class="note title readonly">readonly</span>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<span class="summary_desc"><div class='inline'>
|
210
|
+
<p>Returns the value of attribute nombre.</p>
|
211
|
+
</div></span>
|
212
|
+
|
213
|
+
</li>
|
214
|
+
|
215
|
+
|
216
|
+
</ul>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
<h2>
|
223
|
+
Instance Method Summary
|
224
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
225
|
+
</h2>
|
226
|
+
|
227
|
+
<ul class="summary">
|
228
|
+
|
229
|
+
<li class="public ">
|
230
|
+
<span class="summary_signature">
|
231
|
+
|
232
|
+
<a href="#<=>-instance_method" title="#<=> (instance method)">#<strong><=></strong>(other) ⇒ Int </a>
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
</span>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
<span class="summary_desc"><div class='inline'>
|
247
|
+
<p>Metodo usado por el modulo comparable para comparar platos.</p>
|
248
|
+
</div></span>
|
249
|
+
|
250
|
+
</li>
|
251
|
+
|
252
|
+
|
253
|
+
<li class="public ">
|
254
|
+
<span class="summary_signature">
|
255
|
+
|
256
|
+
<a href="#cantidad_alimento-instance_method" title="#cantidad_alimento (instance method)">#<strong>cantidad_alimento</strong>(nombre_alimento) ⇒ Int </a>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
</span>
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
<span class="summary_desc"><div class='inline'>
|
271
|
+
<p>Permite comprobar la cantidad de un determinado alimento en el plato.</p>
|
272
|
+
</div></span>
|
273
|
+
|
274
|
+
</li>
|
275
|
+
|
276
|
+
|
277
|
+
<li class="public ">
|
278
|
+
<span class="summary_signature">
|
279
|
+
|
280
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(nombre, alimentos, cantidades) ⇒ Plato </a>
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
</span>
|
285
|
+
|
286
|
+
|
287
|
+
<span class="note title constructor">constructor</span>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<span class="summary_desc"><div class='inline'>
|
297
|
+
<p>Inicializa una instancia de la clase plato.</p>
|
298
|
+
</div></span>
|
299
|
+
|
300
|
+
</li>
|
301
|
+
|
302
|
+
|
303
|
+
<li class="public ">
|
304
|
+
<span class="summary_signature">
|
305
|
+
|
306
|
+
<a href="#porcentajes-instance_method" title="#porcentajes (instance method)">#<strong>porcentajes</strong> ⇒ Hash </a>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
</span>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
<span class="summary_desc"><div class='inline'>
|
321
|
+
<p>Permite obtener el porcentaje de cada nutriente.</p>
|
322
|
+
</div></span>
|
323
|
+
|
324
|
+
</li>
|
325
|
+
|
326
|
+
|
327
|
+
<li class="public ">
|
328
|
+
<span class="summary_signature">
|
329
|
+
|
330
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
</span>
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
<span class="summary_desc"><div class='inline'>
|
345
|
+
<p>Permite obtener el plato formateado.</p>
|
346
|
+
</div></span>
|
347
|
+
|
348
|
+
</li>
|
349
|
+
|
350
|
+
|
351
|
+
<li class="public ">
|
352
|
+
<span class="summary_signature">
|
353
|
+
|
354
|
+
<a href="#vct-instance_method" title="#vct (instance method)">#<strong>vct</strong> ⇒ Float </a>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
</span>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
<span class="summary_desc"><div class='inline'>
|
369
|
+
<p>Calcula el valor calorico total del plato.</p>
|
370
|
+
</div></span>
|
371
|
+
|
372
|
+
</li>
|
373
|
+
|
374
|
+
|
375
|
+
</ul>
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
<div id="constructor_details" class="method_details_list">
|
380
|
+
<h2>Constructor Details</h2>
|
381
|
+
|
382
|
+
<div class="method_details first">
|
383
|
+
<h3 class="signature first" id="initialize-instance_method">
|
384
|
+
|
385
|
+
#<strong>initialize</strong>(nombre, alimentos, cantidades) ⇒ <tt><span class='object_link'><a href="" title="Plato (class)">Plato</a></span></tt>
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
</h3><div class="docstring">
|
392
|
+
<div class="discussion">
|
393
|
+
|
394
|
+
<p>Inicializa una instancia de la clase plato</p>
|
395
|
+
|
396
|
+
|
397
|
+
</div>
|
398
|
+
</div>
|
399
|
+
<div class="tags">
|
400
|
+
<p class="tag_title">Parameters:</p>
|
401
|
+
<ul class="param">
|
402
|
+
|
403
|
+
<li>
|
404
|
+
|
405
|
+
<span class='name'>nombre</span>
|
406
|
+
|
407
|
+
|
408
|
+
<span class='type'>(<tt>String</tt>)</span>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
—
|
413
|
+
<div class='inline'>
|
414
|
+
<p>Nombre del alimento</p>
|
415
|
+
</div>
|
416
|
+
|
417
|
+
</li>
|
418
|
+
|
419
|
+
<li>
|
420
|
+
|
421
|
+
<span class='name'>alimentos</span>
|
422
|
+
|
423
|
+
|
424
|
+
<span class='type'>(<tt><span class='object_link'><a href="Dll.html" title="Dll (class)">Dll</a></span></tt>)</span>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
—
|
429
|
+
<div class='inline'>
|
430
|
+
<p>Lista doblemente enlazada que representa los alimentos</p>
|
431
|
+
</div>
|
432
|
+
|
433
|
+
</li>
|
434
|
+
|
435
|
+
<li>
|
436
|
+
|
437
|
+
<span class='name'>cantidades</span>
|
438
|
+
|
439
|
+
|
440
|
+
<span class='type'>(<tt><span class='object_link'><a href="Dll.html" title="Dll (class)">Dll</a></span></tt>)</span>
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
—
|
445
|
+
<div class='inline'>
|
446
|
+
<p>Lista que representa las cantidades de cada alimento</p>
|
447
|
+
</div>
|
448
|
+
|
449
|
+
</li>
|
450
|
+
|
451
|
+
</ul>
|
452
|
+
|
453
|
+
|
454
|
+
</div><table class="source_code">
|
455
|
+
<tr>
|
456
|
+
<td>
|
457
|
+
<pre class="lines">
|
458
|
+
|
459
|
+
|
460
|
+
13
|
461
|
+
14
|
462
|
+
15
|
463
|
+
16
|
464
|
+
17</pre>
|
465
|
+
</td>
|
466
|
+
<td>
|
467
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 13</span>
|
468
|
+
|
469
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_nombre'>nombre</span><span class='comma'>,</span> <span class='id identifier rubyid_alimentos'>alimentos</span><span class='comma'>,</span> <span class='id identifier rubyid_cantidades'>cantidades</span><span class='rparen'>)</span>
|
470
|
+
<span class='ivar'>@nombre</span> <span class='op'>=</span> <span class='id identifier rubyid_nombre'>nombre</span>
|
471
|
+
<span class='ivar'>@alimentos</span> <span class='op'>=</span> <span class='id identifier rubyid_alimentos'>alimentos</span>
|
472
|
+
<span class='ivar'>@cantidades</span> <span class='op'>=</span> <span class='id identifier rubyid_cantidades'>cantidades</span>
|
473
|
+
<span class='kw'>end</span></pre>
|
474
|
+
</td>
|
475
|
+
</tr>
|
476
|
+
</table>
|
477
|
+
</div>
|
478
|
+
|
479
|
+
</div>
|
480
|
+
|
481
|
+
<div id="instance_attr_details" class="attr_details">
|
482
|
+
<h2>Instance Attribute Details</h2>
|
483
|
+
|
484
|
+
|
485
|
+
<span id=""></span>
|
486
|
+
<div class="method_details first">
|
487
|
+
<h3 class="signature first" id="alimentos-instance_method">
|
488
|
+
|
489
|
+
#<strong>alimentos</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
</h3><div class="docstring">
|
496
|
+
<div class="discussion">
|
497
|
+
|
498
|
+
<p>Returns the value of attribute alimentos</p>
|
499
|
+
|
500
|
+
|
501
|
+
</div>
|
502
|
+
</div>
|
503
|
+
<div class="tags">
|
504
|
+
|
505
|
+
|
506
|
+
</div><table class="source_code">
|
507
|
+
<tr>
|
508
|
+
<td>
|
509
|
+
<pre class="lines">
|
510
|
+
|
511
|
+
|
512
|
+
5
|
513
|
+
6
|
514
|
+
7</pre>
|
515
|
+
</td>
|
516
|
+
<td>
|
517
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 5</span>
|
518
|
+
|
519
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_alimentos'>alimentos</span>
|
520
|
+
<span class='ivar'>@alimentos</span>
|
521
|
+
<span class='kw'>end</span></pre>
|
522
|
+
</td>
|
523
|
+
</tr>
|
524
|
+
</table>
|
525
|
+
</div>
|
526
|
+
|
527
|
+
|
528
|
+
<span id=""></span>
|
529
|
+
<div class="method_details ">
|
530
|
+
<h3 class="signature " id="cantidades-instance_method">
|
531
|
+
|
532
|
+
#<strong>cantidades</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
</h3><div class="docstring">
|
539
|
+
<div class="discussion">
|
540
|
+
|
541
|
+
<p>Returns the value of attribute cantidades</p>
|
542
|
+
|
543
|
+
|
544
|
+
</div>
|
545
|
+
</div>
|
546
|
+
<div class="tags">
|
547
|
+
|
548
|
+
|
549
|
+
</div><table class="source_code">
|
550
|
+
<tr>
|
551
|
+
<td>
|
552
|
+
<pre class="lines">
|
553
|
+
|
554
|
+
|
555
|
+
5
|
556
|
+
6
|
557
|
+
7</pre>
|
558
|
+
</td>
|
559
|
+
<td>
|
560
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 5</span>
|
561
|
+
|
562
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cantidades'>cantidades</span>
|
563
|
+
<span class='ivar'>@cantidades</span>
|
564
|
+
<span class='kw'>end</span></pre>
|
565
|
+
</td>
|
566
|
+
</tr>
|
567
|
+
</table>
|
568
|
+
</div>
|
569
|
+
|
570
|
+
|
571
|
+
<span id=""></span>
|
572
|
+
<div class="method_details ">
|
573
|
+
<h3 class="signature " id="nombre-instance_method">
|
574
|
+
|
575
|
+
#<strong>nombre</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
</h3><div class="docstring">
|
582
|
+
<div class="discussion">
|
583
|
+
|
584
|
+
<p>Returns the value of attribute nombre</p>
|
585
|
+
|
586
|
+
|
587
|
+
</div>
|
588
|
+
</div>
|
589
|
+
<div class="tags">
|
590
|
+
|
591
|
+
|
592
|
+
</div><table class="source_code">
|
593
|
+
<tr>
|
594
|
+
<td>
|
595
|
+
<pre class="lines">
|
596
|
+
|
597
|
+
|
598
|
+
5
|
599
|
+
6
|
600
|
+
7</pre>
|
601
|
+
</td>
|
602
|
+
<td>
|
603
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 5</span>
|
604
|
+
|
605
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_nombre'>nombre</span>
|
606
|
+
<span class='ivar'>@nombre</span>
|
607
|
+
<span class='kw'>end</span></pre>
|
608
|
+
</td>
|
609
|
+
</tr>
|
610
|
+
</table>
|
611
|
+
</div>
|
612
|
+
|
613
|
+
</div>
|
614
|
+
|
615
|
+
|
616
|
+
<div id="instance_method_details" class="method_details_list">
|
617
|
+
<h2>Instance Method Details</h2>
|
618
|
+
|
619
|
+
|
620
|
+
<div class="method_details first">
|
621
|
+
<h3 class="signature first" id="<=>-instance_method">
|
622
|
+
|
623
|
+
#<strong><=></strong>(other) ⇒ <tt>Int</tt>
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
</h3><div class="docstring">
|
630
|
+
<div class="discussion">
|
631
|
+
|
632
|
+
<p>Metodo usado por el modulo comparable para comparar platos</p>
|
633
|
+
|
634
|
+
|
635
|
+
</div>
|
636
|
+
</div>
|
637
|
+
<div class="tags">
|
638
|
+
<p class="tag_title">Parameters:</p>
|
639
|
+
<ul class="param">
|
640
|
+
|
641
|
+
<li>
|
642
|
+
|
643
|
+
<span class='name'>other</span>
|
644
|
+
|
645
|
+
|
646
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Plato (class)">Plato</a></span></tt>)</span>
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
—
|
651
|
+
<div class='inline'>
|
652
|
+
<p>Plato a comparar</p>
|
653
|
+
</div>
|
654
|
+
|
655
|
+
</li>
|
656
|
+
|
657
|
+
</ul>
|
658
|
+
|
659
|
+
<p class="tag_title">Returns:</p>
|
660
|
+
<ul class="return">
|
661
|
+
|
662
|
+
<li>
|
663
|
+
|
664
|
+
|
665
|
+
<span class='type'>(<tt>Int</tt>)</span>
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
—
|
670
|
+
<div class='inline'>
|
671
|
+
<p>-1, 0, 1, o Nil</p>
|
672
|
+
</div>
|
673
|
+
|
674
|
+
</li>
|
675
|
+
|
676
|
+
</ul>
|
677
|
+
|
678
|
+
</div><table class="source_code">
|
679
|
+
<tr>
|
680
|
+
<td>
|
681
|
+
<pre class="lines">
|
682
|
+
|
683
|
+
|
684
|
+
40
|
685
|
+
41
|
686
|
+
42</pre>
|
687
|
+
</td>
|
688
|
+
<td>
|
689
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 40</span>
|
690
|
+
|
691
|
+
<span class='kw'>def</span> <span class='op'><=></span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
692
|
+
<span class='id identifier rubyid_vct'>vct</span><span class='op'><=></span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_vct'>vct</span>
|
693
|
+
<span class='kw'>end</span></pre>
|
694
|
+
</td>
|
695
|
+
</tr>
|
696
|
+
</table>
|
697
|
+
</div>
|
698
|
+
|
699
|
+
<div class="method_details ">
|
700
|
+
<h3 class="signature " id="cantidad_alimento-instance_method">
|
701
|
+
|
702
|
+
#<strong>cantidad_alimento</strong>(nombre_alimento) ⇒ <tt>Int</tt>
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
</h3><div class="docstring">
|
709
|
+
<div class="discussion">
|
710
|
+
|
711
|
+
<p>Permite comprobar la cantidad de un determinado alimento en el plato</p>
|
712
|
+
|
713
|
+
|
714
|
+
</div>
|
715
|
+
</div>
|
716
|
+
<div class="tags">
|
717
|
+
<p class="tag_title">Parameters:</p>
|
718
|
+
<ul class="param">
|
719
|
+
|
720
|
+
<li>
|
721
|
+
|
722
|
+
<span class='name'>nombre_alimento</span>
|
723
|
+
|
724
|
+
|
725
|
+
<span class='type'>(<tt>String</tt>)</span>
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
—
|
730
|
+
<div class='inline'>
|
731
|
+
<p>Nombre del plato a comprobar</p>
|
732
|
+
</div>
|
733
|
+
|
734
|
+
</li>
|
735
|
+
|
736
|
+
</ul>
|
737
|
+
|
738
|
+
<p class="tag_title">Returns:</p>
|
739
|
+
<ul class="return">
|
740
|
+
|
741
|
+
<li>
|
742
|
+
|
743
|
+
|
744
|
+
<span class='type'>(<tt>Int</tt>)</span>
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
—
|
749
|
+
<div class='inline'>
|
750
|
+
<p>Cantidad del alimento</p>
|
751
|
+
</div>
|
752
|
+
|
753
|
+
</li>
|
754
|
+
|
755
|
+
</ul>
|
756
|
+
|
757
|
+
</div><table class="source_code">
|
758
|
+
<tr>
|
759
|
+
<td>
|
760
|
+
<pre class="lines">
|
761
|
+
|
762
|
+
|
763
|
+
47
|
764
|
+
48
|
765
|
+
49
|
766
|
+
50</pre>
|
767
|
+
</td>
|
768
|
+
<td>
|
769
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 47</span>
|
770
|
+
|
771
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cantidad_alimento'>cantidad_alimento</span><span class='lparen'>(</span><span class='id identifier rubyid_nombre_alimento'>nombre_alimento</span><span class='rparen'>)</span>
|
772
|
+
<span class='id identifier rubyid_pos'>pos</span> <span class='op'>=</span> <span class='id identifier rubyid_alimentos'>alimentos</span><span class='period'>.</span><span class='id identifier rubyid_find_index'>find_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_nombre'>nombre</span> <span class='op'>==</span> <span class='id identifier rubyid_nombre_alimento'>nombre_alimento</span> <span class='rbrace'>}</span>
|
773
|
+
<span class='id identifier rubyid_cantidades'>cantidades</span><span class='period'>.</span><span class='id identifier rubyid_drop'>drop</span><span class='lparen'>(</span><span class='id identifier rubyid_pos'>pos</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
774
|
+
<span class='kw'>end</span></pre>
|
775
|
+
</td>
|
776
|
+
</tr>
|
777
|
+
</table>
|
778
|
+
</div>
|
779
|
+
|
780
|
+
<div class="method_details ">
|
781
|
+
<h3 class="signature " id="porcentajes-instance_method">
|
782
|
+
|
783
|
+
#<strong>porcentajes</strong> ⇒ <tt>Hash</tt>
|
784
|
+
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
</h3><div class="docstring">
|
790
|
+
<div class="discussion">
|
791
|
+
|
792
|
+
<p>Permite obtener el porcentaje de cada nutriente</p>
|
793
|
+
|
794
|
+
|
795
|
+
</div>
|
796
|
+
</div>
|
797
|
+
<div class="tags">
|
798
|
+
|
799
|
+
<p class="tag_title">Returns:</p>
|
800
|
+
<ul class="return">
|
801
|
+
|
802
|
+
<li>
|
803
|
+
|
804
|
+
|
805
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
—
|
810
|
+
<div class='inline'>
|
811
|
+
<p>Devuelve un hash, que tienen como claves: “Proteinas”, “Carbohidratos” y
|
812
|
+
“Lipidos”</p>
|
813
|
+
</div>
|
814
|
+
|
815
|
+
</li>
|
816
|
+
|
817
|
+
</ul>
|
818
|
+
|
819
|
+
</div><table class="source_code">
|
820
|
+
<tr>
|
821
|
+
<td>
|
822
|
+
<pre class="lines">
|
823
|
+
|
824
|
+
|
825
|
+
22
|
826
|
+
23
|
827
|
+
24
|
828
|
+
25
|
829
|
+
26
|
830
|
+
27
|
831
|
+
28
|
832
|
+
29
|
833
|
+
30
|
834
|
+
31
|
835
|
+
32
|
836
|
+
33
|
837
|
+
34
|
838
|
+
35</pre>
|
839
|
+
</td>
|
840
|
+
<td>
|
841
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 22</span>
|
842
|
+
|
843
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_porcentajes'>porcentajes</span>
|
844
|
+
<span class='id identifier rubyid_nombres_nutr'>nombres_nutr</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Alimento.html" title="Alimento (module)">Alimento</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Alimento/Comida.html" title="Alimento::Comida (class)">Comida</a></span></span><span class='period'>.</span><span class='id identifier rubyid_nombres_nutrientes'><span class='object_link'><a href="Alimento/Comida.html#nombres_nutrientes-class_method" title="Alimento::Comida.nombres_nutrientes (method)">nombres_nutrientes</a></span></span>
|
845
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_nombres_nutr'>nombres_nutr</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='float'>0.00</span><span class='comma'>,</span><span class='float'>0.00</span><span class='comma'>,</span><span class='float'>0.00</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
846
|
+
<span class='id identifier rubyid_total'>total</span> <span class='op'>=</span> <span class='float'>0.00</span>
|
847
|
+
|
848
|
+
<span class='id identifier rubyid_alimentos'>alimentos</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
|
849
|
+
<span class='id identifier rubyid_nombres_nutr'>nombres_nutr</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span>
|
850
|
+
<span class='id identifier rubyid_cantidad_nutriente'>cantidad_nutriente</span> <span class='op'>=</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_nutrientes'>nutrientes</span><span class='lbracket'>[</span><span class='id identifier rubyid_n'>n</span><span class='rbracket'>]</span> <span class='op'>*</span> <span class='id identifier rubyid_cantidad_alimento'>cantidad_alimento</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_nombre'>nombre</span><span class='rparen'>)</span>
|
851
|
+
<span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='id identifier rubyid_n'>n</span><span class='rbracket'>]</span> <span class='op'>+=</span> <span class='id identifier rubyid_cantidad_nutriente'>cantidad_nutriente</span>
|
852
|
+
<span class='id identifier rubyid_total'>total</span> <span class='op'>+=</span> <span class='id identifier rubyid_cantidad_nutriente'>cantidad_nutriente</span>
|
853
|
+
<span class='kw'>end</span>
|
854
|
+
<span class='kw'>end</span>
|
855
|
+
<span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_transform_values'>transform_values</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='op'>/</span><span class='id identifier rubyid_total'>total</span><span class='rparen'>)</span><span class='op'>*</span><span class='int'>100</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
856
|
+
<span class='kw'>end</span></pre>
|
857
|
+
</td>
|
858
|
+
</tr>
|
859
|
+
</table>
|
860
|
+
</div>
|
861
|
+
|
862
|
+
<div class="method_details ">
|
863
|
+
<h3 class="signature " id="to_s-instance_method">
|
864
|
+
|
865
|
+
#<strong>to_s</strong> ⇒ <tt>String</tt>
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
</h3><div class="docstring">
|
872
|
+
<div class="discussion">
|
873
|
+
|
874
|
+
<p>Permite obtener el plato formateado</p>
|
875
|
+
|
876
|
+
|
877
|
+
</div>
|
878
|
+
</div>
|
879
|
+
<div class="tags">
|
880
|
+
|
881
|
+
<p class="tag_title">Returns:</p>
|
882
|
+
<ul class="return">
|
883
|
+
|
884
|
+
<li>
|
885
|
+
|
886
|
+
|
887
|
+
<span class='type'>(<tt>String</tt>)</span>
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
—
|
892
|
+
<div class='inline'>
|
893
|
+
<p>plato con l siguiente formato: “Nombre_p1: Xgr, nombre_p2: Ygr…”</p>
|
894
|
+
</div>
|
895
|
+
|
896
|
+
</li>
|
897
|
+
|
898
|
+
</ul>
|
899
|
+
|
900
|
+
</div><table class="source_code">
|
901
|
+
<tr>
|
902
|
+
<td>
|
903
|
+
<pre class="lines">
|
904
|
+
|
905
|
+
|
906
|
+
60
|
907
|
+
61
|
908
|
+
62
|
909
|
+
63
|
910
|
+
64
|
911
|
+
65
|
912
|
+
66
|
913
|
+
67</pre>
|
914
|
+
</td>
|
915
|
+
<td>
|
916
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 60</span>
|
917
|
+
|
918
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
919
|
+
<span class='id identifier rubyid_zipped'>zipped</span> <span class='op'>=</span> <span class='id identifier rubyid_alimentos'>alimentos</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span> <span class='id identifier rubyid_cantidades'>cantidades</span>
|
920
|
+
<span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
921
|
+
<span class='id identifier rubyid_zipped'>zipped</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_g'>g</span><span class='op'>|</span>
|
922
|
+
<span class='id identifier rubyid_arr'>arr</span> <span class='op'><<</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_nombre'>nombre</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>: </span><span class='tstring_end'>"</span></span> <span class='op'><<</span> <span class='id identifier rubyid_g'>g</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>gr, </span><span class='tstring_end'>"</span></span>
|
923
|
+
<span class='kw'>end</span>
|
924
|
+
<span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>, </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
925
|
+
<span class='kw'>end</span></pre>
|
926
|
+
</td>
|
927
|
+
</tr>
|
928
|
+
</table>
|
929
|
+
</div>
|
930
|
+
|
931
|
+
<div class="method_details ">
|
932
|
+
<h3 class="signature " id="vct-instance_method">
|
933
|
+
|
934
|
+
#<strong>vct</strong> ⇒ <tt>Float</tt>
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
|
939
|
+
|
940
|
+
</h3><div class="docstring">
|
941
|
+
<div class="discussion">
|
942
|
+
|
943
|
+
<p>Calcula el valor calorico total del plato</p>
|
944
|
+
|
945
|
+
|
946
|
+
</div>
|
947
|
+
</div>
|
948
|
+
<div class="tags">
|
949
|
+
|
950
|
+
<p class="tag_title">Returns:</p>
|
951
|
+
<ul class="return">
|
952
|
+
|
953
|
+
<li>
|
954
|
+
|
955
|
+
|
956
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
—
|
961
|
+
<div class='inline'>
|
962
|
+
<p>Vct</p>
|
963
|
+
</div>
|
964
|
+
|
965
|
+
</li>
|
966
|
+
|
967
|
+
</ul>
|
968
|
+
|
969
|
+
</div><table class="source_code">
|
970
|
+
<tr>
|
971
|
+
<td>
|
972
|
+
<pre class="lines">
|
973
|
+
|
974
|
+
|
975
|
+
54
|
976
|
+
55
|
977
|
+
56</pre>
|
978
|
+
</td>
|
979
|
+
<td>
|
980
|
+
<pre class="code"><span class="info file"># File 'lib/alimento/plato.rb', line 54</span>
|
981
|
+
|
982
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_vct'>vct</span>
|
983
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_alimentos'>alimentos</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span><span class='lparen'>(</span><span class='id identifier rubyid_cantidades'>cantidades</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_sum'>sum</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_sum'>sum</span> <span class='op'>+</span> <span class='id identifier rubyid_p'>p</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_valor_energetico'>valor_energetico</span> <span class='op'>*</span> <span class='id identifier rubyid_p'>p</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
984
|
+
<span class='kw'>end</span></pre>
|
985
|
+
</td>
|
986
|
+
</tr>
|
987
|
+
</table>
|
988
|
+
</div>
|
989
|
+
|
990
|
+
</div>
|
991
|
+
|
992
|
+
</div>
|
993
|
+
|
994
|
+
<div id="footer">
|
995
|
+
Generated on Thu Dec 19 15:40:31 2019 by
|
996
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
997
|
+
0.9.20 (ruby-2.5.7).
|
998
|
+
</div>
|
999
|
+
|
1000
|
+
</div>
|
1001
|
+
</body>
|
1002
|
+
</html>
|