gema1718alu0100889871 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +12 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +6 -0
  6. data/Gemfile +8 -0
  7. data/Guardfile +82 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +15 -0
  10. data/Rakefile +42 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docs/Alimento.html +494 -0
  14. data/docs/Alimento_grupo.html +234 -0
  15. data/docs/Gema.html +112 -0
  16. data/docs/Gemfile.html +102 -0
  17. data/docs/Gemfile_lock.html +181 -0
  18. data/docs/Guardfile.html +179 -0
  19. data/docs/LICENSE_txt.html +116 -0
  20. data/docs/Listadll.html +576 -0
  21. data/docs/Object.html +118 -0
  22. data/docs/README_md.html +101 -0
  23. data/docs/Rakefile.html +128 -0
  24. data/docs/bin/setup.html +100 -0
  25. data/docs/created.rid +19 -0
  26. data/docs/css/fonts.css +167 -0
  27. data/docs/css/rdoc.css +590 -0
  28. data/docs/fonts/Lato-Light.ttf +0 -0
  29. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  30. data/docs/fonts/Lato-Regular.ttf +0 -0
  31. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  32. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  33. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  34. data/docs/gema_gemspec.html +133 -0
  35. data/docs/images/add.png +0 -0
  36. data/docs/images/arrow_up.png +0 -0
  37. data/docs/images/brick.png +0 -0
  38. data/docs/images/brick_link.png +0 -0
  39. data/docs/images/bug.png +0 -0
  40. data/docs/images/bullet_black.png +0 -0
  41. data/docs/images/bullet_toggle_minus.png +0 -0
  42. data/docs/images/bullet_toggle_plus.png +0 -0
  43. data/docs/images/date.png +0 -0
  44. data/docs/images/delete.png +0 -0
  45. data/docs/images/find.png +0 -0
  46. data/docs/images/loadingAnimation.gif +0 -0
  47. data/docs/images/macFFBgHack.png +0 -0
  48. data/docs/images/package.png +0 -0
  49. data/docs/images/page_green.png +0 -0
  50. data/docs/images/page_white_text.png +0 -0
  51. data/docs/images/page_white_width.png +0 -0
  52. data/docs/images/plugin.png +0 -0
  53. data/docs/images/ruby.png +0 -0
  54. data/docs/images/tag_blue.png +0 -0
  55. data/docs/images/tag_green.png +0 -0
  56. data/docs/images/transparent.png +0 -0
  57. data/docs/images/wrench.png +0 -0
  58. data/docs/images/wrench_orange.png +0 -0
  59. data/docs/images/zoom.png +0 -0
  60. data/docs/index.html +112 -0
  61. data/docs/js/darkfish.js +161 -0
  62. data/docs/js/jquery.js +4 -0
  63. data/docs/js/navigation.js +142 -0
  64. data/docs/js/navigation.js.gz +0 -0
  65. data/docs/js/search.js +109 -0
  66. data/docs/js/search_index.js +1 -0
  67. data/docs/js/search_index.js.gz +0 -0
  68. data/docs/js/searcher.js +229 -0
  69. data/docs/js/searcher.js.gz +0 -0
  70. data/docs/table_of_contents.html +184 -0
  71. data/gema.gemspec +41 -0
  72. data/lib/gema.rb +5 -0
  73. data/lib/gema/alimento.rb +90 -0
  74. data/lib/gema/alimento2.rb +85 -0
  75. data/lib/gema/listadll.rb +128 -0
  76. data/lib/gema/platos.rb +114 -0
  77. data/lib/gema/version.rb +5 -0
  78. metadata +219 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 87e71ace7875b07a09d4e0c95e0e288fb1d5d5cca02d796d3ac3028d8f38bd3d
4
+ data.tar.gz: 3215db0e81ea1830a1b57a94bde3ff198945b7f82d53d8c1638454ed0ac5b201
5
+ SHA512:
6
+ metadata.gz: 846c8e6b32ca8dcd3c22e20b71b0513ad67e975fee17d63d56f5a3cfebbb1e6d0b2053fb7bd62dd2d92729f7dbc39aead6a95f7b11822ee8e50a8c53be422e33
7
+ data.tar.gz: 957eeeb676fd6e99b814974324c14364c585f93a75ee70475ee00053584a85402f79718718cc0d46df840275920217f789ba7f4573cb40e2a16a54bb2614a635
@@ -0,0 +1 @@
1
+ service_name: travis-ci
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,6 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.15.4
6
+
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in gema.gemspec
6
+ gemspec
7
+
8
+ gem 'coveralls', require: false
@@ -0,0 +1,82 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ guard :bundler do
19
+ require 'guard/bundler'
20
+ require 'guard/bundler/verify'
21
+ helper = Guard::Bundler::Verify.new
22
+
23
+ files = ['Gemfile']
24
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
25
+
26
+ # Assume files are symlinked from somewhere
27
+ files.each { |file| watch(helper.real_path(file)) }
28
+ end
29
+
30
+ # Note: The cmd option is now required due to the increasing number of ways
31
+ # rspec may be run, below are examples of the most common uses.
32
+ # * bundler: 'bundle exec rspec'
33
+ # * bundler binstubs: 'bin/rspec'
34
+ # * spring: 'bin/rspec' (This will use spring if running and you have
35
+ # installed the spring binstubs per the docs)
36
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
37
+ # * 'just' rspec: 'rspec'
38
+
39
+ guard :rspec, cmd: "bundle exec rspec" do
40
+ require "guard/rspec/dsl"
41
+ dsl = Guard::RSpec::Dsl.new(self)
42
+
43
+ # Feel free to open issues for suggestions and improvements
44
+
45
+ # RSpec files
46
+ rspec = dsl.rspec
47
+ watch(rspec.spec_helper) { rspec.spec_dir }
48
+ watch(rspec.spec_support) { rspec.spec_dir }
49
+ watch(rspec.spec_files)
50
+
51
+ # Ruby files
52
+ ruby = dsl.ruby
53
+ dsl.watch_spec_files_for(ruby.lib_files)
54
+
55
+ # Rails files
56
+ rails = dsl.rails(view_extensions: %w(erb haml slim))
57
+ dsl.watch_spec_files_for(rails.app_files)
58
+ dsl.watch_spec_files_for(rails.views)
59
+
60
+ watch(rails.controllers) do |m|
61
+ [
62
+ rspec.spec.call("routing/#{m[1]}_routing"),
63
+ rspec.spec.call("controllers/#{m[1]}_controller"),
64
+ rspec.spec.call("acceptance/#{m[1]}")
65
+ ]
66
+ end
67
+
68
+ # Rails config changes
69
+ watch(rails.spec_helper) { rspec.spec_dir }
70
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
71
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
72
+
73
+ # Capybara features specs
74
+ watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
75
+ watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
76
+
77
+ # Turnip features and steps
78
+ watch(%r{^spec/acceptance/(.+)\.feature$})
79
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
80
+ Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
81
+ end
82
+ end
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Victoria Quintana
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ #LPP: Práctica 11
2
+ ================
3
+
4
+ Diseño e implementación de un DSL, siguiendo la filosofía de Ruby, que permita la definición de platos de Hardvard.
5
+
6
+ Victoria Quintana Martí
7
+
8
+ Travis añadido privadoo
9
+
10
+ Añadiendo coveralls
11
+
12
+ [![Coverage Status](https://coveralls.io/repos/github/alu0100889871/nutrientes/badge.svg?branch=master)](https://coveralls.io/github/alu0100889871/nutrientes?branch=master)
13
+
14
+ https://travis-ci.org/alu0100889871/nutrientes
15
+
@@ -0,0 +1,42 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
8
+ desc "Ejecutar las espectativas de la clase "
9
+ task :spec do
10
+ sh "rspec -I. spec/alimento_spec.rb"
11
+ end
12
+
13
+ desc "Ejecutar las espectativas de la clase Lista doblemente enlazada"
14
+ task :spec do
15
+ sh "rspec -I. spec/listadll_spec.rb"
16
+ end
17
+
18
+ desc "Ejecutar las espectativas para que los menús sean comparables y enumerables"
19
+ task :spec do
20
+ sh "rspec -I. spec/comp_y_enum_spec.rb"
21
+ end
22
+ desc "Ejecutar las espectativas de programacion funcional"
23
+ task :spec do
24
+ sh "rspec -I. spec/alimento2_spec.rb"
25
+ end
26
+
27
+ desc "Ejecutar las espectativas de programacion funcional 2"
28
+ task :spec do
29
+ sh "rspec -I. spec/loop_spec.rb"
30
+ end
31
+
32
+ desc "Ejecutar las espectativas de platos"
33
+ task :spec do
34
+ sh "rspec -I. spec/platos_spec.rb"
35
+ end
36
+
37
+ desc "Ejecutar con documentacion"
38
+ task :doc do
39
+ sh "rspec -I. spec/alimento_spec.rb --format documentation"
40
+ end
41
+
42
+
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "gema"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,494 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Alimento - 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">Comparable</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-3C-3D-3E">#&lt;=&gt;</a>
88
+
89
+ <li ><a href="#method-i-get_glucidos">#get_glucidos</a>
90
+
91
+ <li ><a href="#method-i-get_grasas">#get_grasas</a>
92
+
93
+ <li ><a href="#method-i-get_name">#get_name</a>
94
+
95
+ <li ><a href="#method-i-get_proteinas">#get_proteinas</a>
96
+
97
+ <li ><a href="#method-i-get_valor_energetico">#get_valor_energetico</a>
98
+
99
+ <li ><a href="#method-i-to_s">#to_s</a>
100
+
101
+ </ul>
102
+ </div>
103
+
104
+ </div>
105
+ </nav>
106
+
107
+ <main role="main" aria-labelledby="class-Alimento">
108
+ <h1 id="class-Alimento" class="class">
109
+ class Alimento
110
+ </h1>
111
+
112
+ <section class="description">
113
+
114
+ <p>Clase <a href="Alimento.html">Alimento</a></p>
115
+
116
+ </section>
117
+
118
+
119
+
120
+
121
+ <section id="5Buntitled-5D" class="documentation-section">
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <section class="attribute-method-details" class="method-section">
130
+ <header>
131
+ <h3>Attributes</h3>
132
+ </header>
133
+
134
+
135
+ <div id="attribute-i-glucidos" class="method-detail">
136
+ <div class="method-heading attribute-method-heading">
137
+ <span class="method-name">glucidos</span><span
138
+ class="attribute-access-type">[RW]</span>
139
+ </div>
140
+
141
+ <div class="method-description">
142
+
143
+ <p>Nombre del alimento, proteinas del alimento, glucidos del alimento y
144
+ lipidos del alimento</p>
145
+
146
+ </div>
147
+ </div>
148
+
149
+ <div id="attribute-i-lipidos" class="method-detail">
150
+ <div class="method-heading attribute-method-heading">
151
+ <span class="method-name">lipidos</span><span
152
+ class="attribute-access-type">[RW]</span>
153
+ </div>
154
+
155
+ <div class="method-description">
156
+
157
+ <p>Nombre del alimento, proteinas del alimento, glucidos del alimento y
158
+ lipidos del alimento</p>
159
+
160
+ </div>
161
+ </div>
162
+
163
+ <div id="attribute-i-name" class="method-detail">
164
+ <div class="method-heading attribute-method-heading">
165
+ <span class="method-name">name</span><span
166
+ class="attribute-access-type">[RW]</span>
167
+ </div>
168
+
169
+ <div class="method-description">
170
+
171
+ <p>Nombre del alimento, proteinas del alimento, glucidos del alimento y
172
+ lipidos del alimento</p>
173
+
174
+ </div>
175
+ </div>
176
+
177
+ <div id="attribute-i-proteinas" class="method-detail">
178
+ <div class="method-heading attribute-method-heading">
179
+ <span class="method-name">proteinas</span><span
180
+ class="attribute-access-type">[RW]</span>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+
185
+ <p>Nombre del alimento, proteinas del alimento, glucidos del alimento y
186
+ lipidos del alimento</p>
187
+
188
+ </div>
189
+ </div>
190
+
191
+ </section>
192
+
193
+
194
+
195
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
196
+ <header>
197
+ <h3>Public Class Methods</h3>
198
+ </header>
199
+
200
+
201
+ <div id="method-c-new" class="method-detail ">
202
+
203
+ <div class="method-heading">
204
+ <span class="method-name">new</span><span
205
+ class="method-args">(name, proteinas, glucidos, lipidos)</span>
206
+
207
+ <span class="method-click-advice">click to toggle source</span>
208
+
209
+ </div>
210
+
211
+
212
+ <div class="method-description">
213
+
214
+ <p>Constructor de <a href="Alimento.html">Alimento</a></p>
215
+
216
+
217
+
218
+
219
+ <div class="method-source-code" id="new-source">
220
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 8</span>
221
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">glucidos</span>, <span class="ruby-identifier">lipidos</span>)
222
+ <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
223
+ <span class="ruby-ivar">@proteinas</span> = <span class="ruby-identifier">proteinas</span>
224
+ <span class="ruby-ivar">@glucidos</span> = <span class="ruby-identifier">glucidos</span>
225
+ <span class="ruby-ivar">@lipidos</span> = <span class="ruby-identifier">lipidos</span>
226
+ <span class="ruby-keyword">end</span></pre>
227
+ </div>
228
+
229
+ </div>
230
+
231
+
232
+
233
+
234
+ </div>
235
+
236
+
237
+ </section>
238
+
239
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
240
+ <header>
241
+ <h3>Public Instance Methods</h3>
242
+ </header>
243
+
244
+
245
+ <div id="method-i-3C-3D-3E" class="method-detail ">
246
+
247
+ <div class="method-heading">
248
+ <span class="method-name">&lt;=&gt;</span><span
249
+ class="method-args">(another)</span>
250
+
251
+ <span class="method-click-advice">click to toggle source</span>
252
+
253
+ </div>
254
+
255
+
256
+ <div class="method-description">
257
+
258
+ <p>Método necesario para poder utilizar el módulo comparable</p>
259
+
260
+
261
+
262
+
263
+ <div class="method-source-code" id="3C-3D-3E-source">
264
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 15</span>
265
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">another</span>)
266
+ <span class="ruby-identifier">get_valor_energetico</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">another</span>.<span class="ruby-identifier">get_valor_energetico</span>
267
+ <span class="ruby-keyword">end</span></pre>
268
+ </div>
269
+
270
+ </div>
271
+
272
+
273
+
274
+
275
+ </div>
276
+
277
+
278
+ <div id="method-i-get_glucidos" class="method-detail ">
279
+
280
+ <div class="method-heading">
281
+ <span class="method-name">get_glucidos</span><span
282
+ class="method-args">()</span>
283
+
284
+ <span class="method-click-advice">click to toggle source</span>
285
+
286
+ </div>
287
+
288
+
289
+ <div class="method-description">
290
+
291
+ <p>Método para obtener los glucidos del alimento</p>
292
+
293
+
294
+
295
+
296
+ <div class="method-source-code" id="get_glucidos-source">
297
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 34</span>
298
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_glucidos</span>
299
+
300
+ <span class="ruby-ivar">@glucidos</span>
301
+ <span class="ruby-keyword">end</span></pre>
302
+ </div>
303
+
304
+ </div>
305
+
306
+
307
+
308
+
309
+ </div>
310
+
311
+
312
+ <div id="method-i-get_grasas" class="method-detail ">
313
+
314
+ <div class="method-heading">
315
+ <span class="method-name">get_grasas</span><span
316
+ class="method-args">()</span>
317
+
318
+ <span class="method-click-advice">click to toggle source</span>
319
+
320
+ </div>
321
+
322
+
323
+ <div class="method-description">
324
+
325
+ <p>Método para obtener las grasas del alimento</p>
326
+
327
+
328
+
329
+
330
+ <div class="method-source-code" id="get_grasas-source">
331
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 39</span>
332
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_grasas</span>
333
+
334
+ <span class="ruby-ivar">@lipidos</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-get_name" class="method-detail ">
347
+
348
+ <div class="method-heading">
349
+ <span class="method-name">get_name</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 para obtener el nombre del alimento</p>
360
+
361
+
362
+
363
+
364
+ <div class="method-source-code" id="get_name-source">
365
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 24</span>
366
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_name</span>
367
+
368
+ <span class="ruby-ivar">@name</span>
369
+ <span class="ruby-keyword">end</span></pre>
370
+ </div>
371
+
372
+ </div>
373
+
374
+
375
+
376
+
377
+ </div>
378
+
379
+
380
+ <div id="method-i-get_proteinas" class="method-detail ">
381
+
382
+ <div class="method-heading">
383
+ <span class="method-name">get_proteinas</span><span
384
+ class="method-args">()</span>
385
+
386
+ <span class="method-click-advice">click to toggle source</span>
387
+
388
+ </div>
389
+
390
+
391
+ <div class="method-description">
392
+
393
+ <p>Método para obtener las proteinas del alimento</p>
394
+
395
+
396
+
397
+
398
+ <div class="method-source-code" id="get_proteinas-source">
399
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 29</span>
400
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_proteinas</span>
401
+
402
+ <span class="ruby-ivar">@proteinas</span>
403
+ <span class="ruby-keyword">end</span></pre>
404
+ </div>
405
+
406
+ </div>
407
+
408
+
409
+
410
+
411
+ </div>
412
+
413
+
414
+ <div id="method-i-get_valor_energetico" class="method-detail ">
415
+
416
+ <div class="method-heading">
417
+ <span class="method-name">get_valor_energetico</span><span
418
+ class="method-args">()</span>
419
+
420
+ <span class="method-click-advice">click to toggle source</span>
421
+
422
+ </div>
423
+
424
+
425
+ <div class="method-description">
426
+
427
+ <p>Método para obtener el valor energetico del alimento</p>
428
+
429
+
430
+
431
+
432
+ <div class="method-source-code" id="get_valor_energetico-source">
433
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 44</span>
434
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_valor_energetico</span>
435
+
436
+ (<span class="ruby-ivar">@proteinas</span><span class="ruby-operator">*</span><span class="ruby-value">4</span>)<span class="ruby-operator">+</span>(<span class="ruby-ivar">@glucidos</span><span class="ruby-operator">*</span><span class="ruby-value">4</span>)<span class="ruby-operator">+</span>(<span class="ruby-ivar">@lipidos</span><span class="ruby-operator">*</span><span class="ruby-value">9</span>)
437
+
438
+ <span class="ruby-keyword">end</span></pre>
439
+ </div>
440
+
441
+ </div>
442
+
443
+
444
+
445
+
446
+ </div>
447
+
448
+
449
+ <div id="method-i-to_s" class="method-detail ">
450
+
451
+ <div class="method-heading">
452
+ <span class="method-name">to_s</span><span
453
+ class="method-args">()</span>
454
+
455
+ <span class="method-click-advice">click to toggle source</span>
456
+
457
+ </div>
458
+
459
+
460
+ <div class="method-description">
461
+
462
+ <p>Método para imprimir <a href="Alimento.html">Alimento</a></p>
463
+
464
+
465
+
466
+
467
+ <div class="method-source-code" id="to_s-source">
468
+ <pre><span class="ruby-comment"># File lib/gema/alimento.rb, line 19</span>
469
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
470
+ <span class="ruby-identifier">title</span>= <span class="ruby-string">&quot;\nAlimento:\n\n&quot;</span>
471
+ <span class="ruby-identifier">title</span><span class="ruby-operator">+=</span><span class="ruby-node">&quot;#{@name}\t#{@proteinas}g\t#{@glucidos}g\t#{@lipidos}g&quot;</span>
472
+ <span class="ruby-keyword">end</span></pre>
473
+ </div>
474
+
475
+ </div>
476
+
477
+
478
+
479
+
480
+ </div>
481
+
482
+
483
+ </section>
484
+
485
+ </section>
486
+ </main>
487
+
488
+
489
+ <footer id="validator-badges" role="contentinfo">
490
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
491
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
492
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
493
+ </footer>
494
+