alu0100974652-pract06 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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ee31945a2f1b22ab73ee2fe868f5b56aff3e8fd7700cb3c3ae2534c730eae579
4
+ data.tar.gz: 84f85fc61a6faa0902d75525bbb5cea226710ca16fa7ef42594be609f5504987
5
+ SHA512:
6
+ metadata.gz: cdafde2f7634f80c3576a14bdac5caf79d39509efca5b7c5f0836002d6eb35492b8e54a66de71bc315aeb309037a448c5b906b8c9e32dbc282de63a3d33b6139
7
+ data.tar.gz: 55c63c5e411373fdc5e8a223d7be869df84f79dc8d5f8a01afd2b86aaf6a2ba81a41d86d72361389d97918cb148bcc3696f9a50854cc15a3b1e87b12ae286032
@@ -0,0 +1 @@
1
+ service_name: travis-ci
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
Binary file
@@ -0,0 +1,7 @@
1
+ build
2
+ clean
3
+ clobber
4
+ install
5
+ install:local
6
+ release[remote]
7
+ spec
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,12 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.3
7
+ before_install: gem install bundler -v 2.0.2
8
+
9
+ deploy:
10
+ provider: pages
11
+ skip-cleanup: true
12
+ github-token: $LPP
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at alu0100974652@ull.edu.es. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in pract06.gemspec
4
+ gemspec
5
+ gem 'coveralls', require: false
@@ -0,0 +1,95 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ alu0100974652-pract06 (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ coderay (1.1.2)
10
+ coveralls (0.8.23)
11
+ json (>= 1.8, < 3)
12
+ simplecov (~> 0.16.1)
13
+ term-ansicolor (~> 1.3)
14
+ thor (>= 0.19.4, < 2.0)
15
+ tins (~> 1.6)
16
+ diff-lcs (1.3)
17
+ docile (1.3.2)
18
+ ffi (1.11.2)
19
+ formatador (0.2.5)
20
+ guard (2.16.1)
21
+ formatador (>= 0.2.4)
22
+ listen (>= 2.7, < 4.0)
23
+ lumberjack (>= 1.0.12, < 2.0)
24
+ nenv (~> 0.1)
25
+ notiffany (~> 0.0)
26
+ pry (>= 0.9.12)
27
+ shellany (~> 0.0)
28
+ thor (>= 0.18.1)
29
+ guard-bundler (2.2.1)
30
+ bundler (>= 1.3.0, < 3)
31
+ guard (~> 2.2)
32
+ guard-compat (~> 1.1)
33
+ guard-compat (1.2.1)
34
+ guard-rspec (4.7.3)
35
+ guard (~> 2.1)
36
+ guard-compat (~> 1.1)
37
+ rspec (>= 2.99.0, < 4.0)
38
+ json (2.3.0)
39
+ listen (3.2.0)
40
+ rb-fsevent (~> 0.10, >= 0.10.3)
41
+ rb-inotify (~> 0.9, >= 0.9.10)
42
+ lumberjack (1.0.13)
43
+ method_source (0.9.2)
44
+ nenv (0.3.0)
45
+ notiffany (0.1.3)
46
+ nenv (~> 0.1)
47
+ shellany (~> 0.0)
48
+ pry (0.12.2)
49
+ coderay (~> 1.1.0)
50
+ method_source (~> 0.9.0)
51
+ rake (10.5.0)
52
+ rb-fsevent (0.10.3)
53
+ rb-inotify (0.10.0)
54
+ ffi (~> 1.0)
55
+ rspec (3.9.0)
56
+ rspec-core (~> 3.9.0)
57
+ rspec-expectations (~> 3.9.0)
58
+ rspec-mocks (~> 3.9.0)
59
+ rspec-core (3.9.0)
60
+ rspec-support (~> 3.9.0)
61
+ rspec-expectations (3.9.0)
62
+ diff-lcs (>= 1.2.0, < 2.0)
63
+ rspec-support (~> 3.9.0)
64
+ rspec-mocks (3.9.0)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.9.0)
67
+ rspec-support (3.9.0)
68
+ shellany (0.0.1)
69
+ simplecov (0.16.1)
70
+ docile (~> 1.1)
71
+ json (>= 1.8, < 3)
72
+ simplecov-html (~> 0.10.0)
73
+ simplecov-html (0.10.2)
74
+ sync (0.5.0)
75
+ term-ansicolor (1.7.1)
76
+ tins (~> 1.0)
77
+ thor (0.20.3)
78
+ tins (1.23.0)
79
+ sync
80
+
81
+ PLATFORMS
82
+ ruby
83
+
84
+ DEPENDENCIES
85
+ alu0100974652-pract06!
86
+ bundler (~> 2.0)
87
+ coveralls
88
+ guard
89
+ guard-bundler
90
+ guard-rspec
91
+ rake (~> 10.0)
92
+ rspec (~> 3.0)
93
+
94
+ BUNDLED WITH
95
+ 2.1.4
@@ -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.exist?(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,39 @@
1
+ # Pract06
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pract06`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'pract06'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install pract06
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pract06. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+ ## Code of Conduct
38
+
39
+ Everyone interacting in the Pract06 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pract06/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pract06"
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,1011 @@
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: Alimento
8
+
9
+ &mdash; 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 = "Alimento";
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 (A)</a> &raquo;
40
+
41
+
42
+ <span class="title">Alimento</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: Alimento
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">Alimento</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/pract06/pract06.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <h1 id="label-prct06.rb">prct06.rb</h1>
111
+ <dl class="rdoc-list note-list"><dt>Autor
112
+ <dd>
113
+ <p>Adrián Melián Fernández</p>
114
+ </dd></dl>
115
+
116
+ <h2 id="label-Introducci-C3-B3n+de+la+Clase+Alimento">Introducción de la Clase Alimento</h2>
117
+
118
+ <p>Implementación de la clase Alimento</p>
119
+
120
+ <h3 id="label-Clase+Alimento">Clase Alimento</h3>
121
+
122
+ <p>Definición de la clase Alimento compuesta por</p>
123
+ <ul><li>
124
+ <p>metodo initialize</p>
125
+ </li><li>
126
+ <p>metodo giv_nombre</p>
127
+ </li><li>
128
+ <p>metodo giv_gei</p>
129
+ </li><li>
130
+ <p>metodo giv_terreno</p>
131
+ </li><li>
132
+ <p>metodo valor_energetico</p>
133
+ </li><li>
134
+ <p>metodo to_s</p>
135
+ </li><li>
136
+ <p>&lt;=&gt;</p>
137
+ </li></ul>
138
+
139
+
140
+ </div>
141
+ </div>
142
+ <div class="tags">
143
+
144
+
145
+ </div>
146
+
147
+
148
+
149
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
150
+ <ul class="summary">
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#carbohidratos-instance_method" title="#carbohidratos (instance method)">#<strong>carbohidratos</strong> &#x21d2; Object </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+ <span class="note title readonly">readonly</span>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <span class="summary_desc"><div class='inline'>
175
+ <p>Returns the value of attribute carbohidratos.</p>
176
+ </div></span>
177
+
178
+ </li>
179
+
180
+
181
+ <li class="public ">
182
+ <span class="summary_signature">
183
+
184
+ <a href="#gei-instance_method" title="#gei (instance method)">#<strong>gei</strong> &#x21d2; Object </a>
185
+
186
+
187
+
188
+ </span>
189
+
190
+
191
+
192
+
193
+ <span class="note title readonly">readonly</span>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+ <span class="summary_desc"><div class='inline'>
204
+ <p>Returns the value of attribute gei.</p>
205
+ </div></span>
206
+
207
+ </li>
208
+
209
+
210
+ <li class="public ">
211
+ <span class="summary_signature">
212
+
213
+ <a href="#lipidos-instance_method" title="#lipidos (instance method)">#<strong>lipidos</strong> &#x21d2; Object </a>
214
+
215
+
216
+
217
+ </span>
218
+
219
+
220
+
221
+
222
+ <span class="note title readonly">readonly</span>
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+ <span class="summary_desc"><div class='inline'>
233
+ <p>Returns the value of attribute lipidos.</p>
234
+ </div></span>
235
+
236
+ </li>
237
+
238
+
239
+ <li class="public ">
240
+ <span class="summary_signature">
241
+
242
+ <a href="#nombre-instance_method" title="#nombre (instance method)">#<strong>nombre</strong> &#x21d2; Object </a>
243
+
244
+
245
+
246
+ </span>
247
+
248
+
249
+
250
+
251
+ <span class="note title readonly">readonly</span>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <span class="summary_desc"><div class='inline'>
262
+ <p>Returns the value of attribute nombre.</p>
263
+ </div></span>
264
+
265
+ </li>
266
+
267
+
268
+ <li class="public ">
269
+ <span class="summary_signature">
270
+
271
+ <a href="#proteinas-instance_method" title="#proteinas (instance method)">#<strong>proteinas</strong> &#x21d2; Object </a>
272
+
273
+
274
+
275
+ </span>
276
+
277
+
278
+
279
+
280
+ <span class="note title readonly">readonly</span>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'>
291
+ <p>Returns the value of attribute proteinas.</p>
292
+ </div></span>
293
+
294
+ </li>
295
+
296
+
297
+ <li class="public ">
298
+ <span class="summary_signature">
299
+
300
+ <a href="#terreno-instance_method" title="#terreno (instance method)">#<strong>terreno</strong> &#x21d2; Object </a>
301
+
302
+
303
+
304
+ </span>
305
+
306
+
307
+
308
+
309
+ <span class="note title readonly">readonly</span>
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+ <span class="summary_desc"><div class='inline'>
320
+ <p>Returns the value of attribute terreno.</p>
321
+ </div></span>
322
+
323
+ </li>
324
+
325
+
326
+ </ul>
327
+
328
+
329
+
330
+
331
+
332
+ <h2>
333
+ Instance Method Summary
334
+ <small><a href="#" class="summary_toggle">collapse</a></small>
335
+ </h2>
336
+
337
+ <ul class="summary">
338
+
339
+ <li class="public ">
340
+ <span class="summary_signature">
341
+
342
+ <a href="#<=>-instance_method" title="#&lt;=&gt; (instance method)">#<strong>&lt;=&gt;</strong>(other) &#x21d2; Object </a>
343
+
344
+
345
+
346
+ </span>
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+ <span class="summary_desc"><div class='inline'></div></span>
357
+
358
+ </li>
359
+
360
+
361
+ <li class="public ">
362
+ <span class="summary_signature">
363
+
364
+ <a href="#giv_gei-instance_method" title="#giv_gei (instance method)">#<strong>giv_gei</strong>(gei) &#x21d2; Object </a>
365
+
366
+
367
+
368
+ </span>
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+ <span class="summary_desc"><div class='inline'></div></span>
379
+
380
+ </li>
381
+
382
+
383
+ <li class="public ">
384
+ <span class="summary_signature">
385
+
386
+ <a href="#giv_nombre-instance_method" title="#giv_nombre (instance method)">#<strong>giv_nombre</strong>(nombre) &#x21d2; Object </a>
387
+
388
+
389
+
390
+ </span>
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+ <span class="summary_desc"><div class='inline'></div></span>
401
+
402
+ </li>
403
+
404
+
405
+ <li class="public ">
406
+ <span class="summary_signature">
407
+
408
+ <a href="#giv_terreno-instance_method" title="#giv_terreno (instance method)">#<strong>giv_terreno</strong>(terreno) &#x21d2; Object </a>
409
+
410
+
411
+
412
+ </span>
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+ <span class="summary_desc"><div class='inline'></div></span>
423
+
424
+ </li>
425
+
426
+
427
+ <li class="public ">
428
+ <span class="summary_signature">
429
+
430
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(nombre, proteinas, carbohidratos, lipidos, gei, terreno) &#x21d2; Alimento </a>
431
+
432
+
433
+
434
+ </span>
435
+
436
+
437
+ <span class="note title constructor">constructor</span>
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+ <span class="summary_desc"><div class='inline'>
447
+ <p>A new instance of Alimento.</p>
448
+ </div></span>
449
+
450
+ </li>
451
+
452
+
453
+ <li class="public ">
454
+ <span class="summary_signature">
455
+
456
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
457
+
458
+
459
+
460
+ </span>
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+ <span class="summary_desc"><div class='inline'></div></span>
471
+
472
+ </li>
473
+
474
+
475
+ <li class="public ">
476
+ <span class="summary_signature">
477
+
478
+ <a href="#valor_energetico-instance_method" title="#valor_energetico (instance method)">#<strong>valor_energetico</strong> &#x21d2; Object </a>
479
+
480
+
481
+
482
+ </span>
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+ <span class="summary_desc"><div class='inline'></div></span>
493
+
494
+ </li>
495
+
496
+
497
+ </ul>
498
+
499
+
500
+
501
+ <div id="constructor_details" class="method_details_list">
502
+ <h2>Constructor Details</h2>
503
+
504
+ <div class="method_details first">
505
+ <h3 class="signature first" id="initialize-instance_method">
506
+
507
+ #<strong>initialize</strong>(nombre, proteinas, carbohidratos, lipidos, gei, terreno) &#x21d2; <tt><span class='object_link'><a href="" title="Alimento (class)">Alimento</a></span></tt>
508
+
509
+
510
+
511
+
512
+
513
+ </h3><div class="docstring">
514
+ <div class="discussion">
515
+
516
+ <p>Returns a new instance of Alimento</p>
517
+
518
+
519
+ </div>
520
+ </div>
521
+ <div class="tags">
522
+
523
+
524
+ </div><table class="source_code">
525
+ <tr>
526
+ <td>
527
+ <pre class="lines">
528
+
529
+
530
+ 27
531
+ 28
532
+ 29
533
+ 30</pre>
534
+ </td>
535
+ <td>
536
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 27</span>
537
+
538
+ <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_proteinas'>proteinas</span><span class='comma'>,</span> <span class='id identifier rubyid_carbohidratos'>carbohidratos</span><span class='comma'>,</span> <span class='id identifier rubyid_lipidos'>lipidos</span><span class='comma'>,</span> <span class='id identifier rubyid_gei'>gei</span><span class='comma'>,</span> <span class='id identifier rubyid_terreno'>terreno</span><span class='rparen'>)</span>
539
+ <span class='ivar'>@nombre</span><span class='comma'>,</span> <span class='ivar'>@proteinas</span><span class='comma'>,</span> <span class='ivar'>@carbohidratos</span><span class='comma'>,</span> <span class='ivar'>@lipidos</span><span class='comma'>,</span> <span class='ivar'>@gei</span><span class='comma'>,</span> <span class='ivar'>@terreno</span> <span class='op'>=</span> <span class='id identifier rubyid_nombre'>nombre</span><span class='comma'>,</span> <span class='id identifier rubyid_proteinas'>proteinas</span><span class='comma'>,</span> <span class='id identifier rubyid_carbohidratos'>carbohidratos</span><span class='comma'>,</span> <span class='id identifier rubyid_lipidos'>lipidos</span><span class='comma'>,</span> <span class='id identifier rubyid_gei'>gei</span><span class='comma'>,</span> <span class='id identifier rubyid_terreno'>terreno</span>
540
+ <span class='ivar'>@valor_energetico</span> <span class='op'>=</span> <span class='id identifier rubyid_valor_energetico'>valor_energetico</span>
541
+ <span class='kw'>end</span></pre>
542
+ </td>
543
+ </tr>
544
+ </table>
545
+ </div>
546
+
547
+ </div>
548
+
549
+ <div id="instance_attr_details" class="attr_details">
550
+ <h2>Instance Attribute Details</h2>
551
+
552
+
553
+ <span id=""></span>
554
+ <div class="method_details first">
555
+ <h3 class="signature first" id="carbohidratos-instance_method">
556
+
557
+ #<strong>carbohidratos</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
558
+
559
+
560
+
561
+
562
+
563
+ </h3><div class="docstring">
564
+ <div class="discussion">
565
+
566
+ <p>Returns the value of attribute carbohidratos</p>
567
+
568
+
569
+ </div>
570
+ </div>
571
+ <div class="tags">
572
+
573
+
574
+ </div><table class="source_code">
575
+ <tr>
576
+ <td>
577
+ <pre class="lines">
578
+
579
+
580
+ 23
581
+ 24
582
+ 25</pre>
583
+ </td>
584
+ <td>
585
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 23</span>
586
+
587
+ <span class='kw'>def</span> <span class='id identifier rubyid_carbohidratos'>carbohidratos</span>
588
+ <span class='ivar'>@carbohidratos</span>
589
+ <span class='kw'>end</span></pre>
590
+ </td>
591
+ </tr>
592
+ </table>
593
+ </div>
594
+
595
+
596
+ <span id=""></span>
597
+ <div class="method_details ">
598
+ <h3 class="signature " id="gei-instance_method">
599
+
600
+ #<strong>gei</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
601
+
602
+
603
+
604
+
605
+
606
+ </h3><div class="docstring">
607
+ <div class="discussion">
608
+
609
+ <p>Returns the value of attribute gei</p>
610
+
611
+
612
+ </div>
613
+ </div>
614
+ <div class="tags">
615
+
616
+
617
+ </div><table class="source_code">
618
+ <tr>
619
+ <td>
620
+ <pre class="lines">
621
+
622
+
623
+ 23
624
+ 24
625
+ 25</pre>
626
+ </td>
627
+ <td>
628
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 23</span>
629
+
630
+ <span class='kw'>def</span> <span class='id identifier rubyid_gei'>gei</span>
631
+ <span class='ivar'>@gei</span>
632
+ <span class='kw'>end</span></pre>
633
+ </td>
634
+ </tr>
635
+ </table>
636
+ </div>
637
+
638
+
639
+ <span id=""></span>
640
+ <div class="method_details ">
641
+ <h3 class="signature " id="lipidos-instance_method">
642
+
643
+ #<strong>lipidos</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
644
+
645
+
646
+
647
+
648
+
649
+ </h3><div class="docstring">
650
+ <div class="discussion">
651
+
652
+ <p>Returns the value of attribute lipidos</p>
653
+
654
+
655
+ </div>
656
+ </div>
657
+ <div class="tags">
658
+
659
+
660
+ </div><table class="source_code">
661
+ <tr>
662
+ <td>
663
+ <pre class="lines">
664
+
665
+
666
+ 23
667
+ 24
668
+ 25</pre>
669
+ </td>
670
+ <td>
671
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 23</span>
672
+
673
+ <span class='kw'>def</span> <span class='id identifier rubyid_lipidos'>lipidos</span>
674
+ <span class='ivar'>@lipidos</span>
675
+ <span class='kw'>end</span></pre>
676
+ </td>
677
+ </tr>
678
+ </table>
679
+ </div>
680
+
681
+
682
+ <span id=""></span>
683
+ <div class="method_details ">
684
+ <h3 class="signature " id="nombre-instance_method">
685
+
686
+ #<strong>nombre</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
687
+
688
+
689
+
690
+
691
+
692
+ </h3><div class="docstring">
693
+ <div class="discussion">
694
+
695
+ <p>Returns the value of attribute nombre</p>
696
+
697
+
698
+ </div>
699
+ </div>
700
+ <div class="tags">
701
+
702
+
703
+ </div><table class="source_code">
704
+ <tr>
705
+ <td>
706
+ <pre class="lines">
707
+
708
+
709
+ 23
710
+ 24
711
+ 25</pre>
712
+ </td>
713
+ <td>
714
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 23</span>
715
+
716
+ <span class='kw'>def</span> <span class='id identifier rubyid_nombre'>nombre</span>
717
+ <span class='ivar'>@nombre</span>
718
+ <span class='kw'>end</span></pre>
719
+ </td>
720
+ </tr>
721
+ </table>
722
+ </div>
723
+
724
+
725
+ <span id=""></span>
726
+ <div class="method_details ">
727
+ <h3 class="signature " id="proteinas-instance_method">
728
+
729
+ #<strong>proteinas</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
730
+
731
+
732
+
733
+
734
+
735
+ </h3><div class="docstring">
736
+ <div class="discussion">
737
+
738
+ <p>Returns the value of attribute proteinas</p>
739
+
740
+
741
+ </div>
742
+ </div>
743
+ <div class="tags">
744
+
745
+
746
+ </div><table class="source_code">
747
+ <tr>
748
+ <td>
749
+ <pre class="lines">
750
+
751
+
752
+ 23
753
+ 24
754
+ 25</pre>
755
+ </td>
756
+ <td>
757
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 23</span>
758
+
759
+ <span class='kw'>def</span> <span class='id identifier rubyid_proteinas'>proteinas</span>
760
+ <span class='ivar'>@proteinas</span>
761
+ <span class='kw'>end</span></pre>
762
+ </td>
763
+ </tr>
764
+ </table>
765
+ </div>
766
+
767
+
768
+ <span id=""></span>
769
+ <div class="method_details ">
770
+ <h3 class="signature " id="terreno-instance_method">
771
+
772
+ #<strong>terreno</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
773
+
774
+
775
+
776
+
777
+
778
+ </h3><div class="docstring">
779
+ <div class="discussion">
780
+
781
+ <p>Returns the value of attribute terreno</p>
782
+
783
+
784
+ </div>
785
+ </div>
786
+ <div class="tags">
787
+
788
+
789
+ </div><table class="source_code">
790
+ <tr>
791
+ <td>
792
+ <pre class="lines">
793
+
794
+
795
+ 23
796
+ 24
797
+ 25</pre>
798
+ </td>
799
+ <td>
800
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 23</span>
801
+
802
+ <span class='kw'>def</span> <span class='id identifier rubyid_terreno'>terreno</span>
803
+ <span class='ivar'>@terreno</span>
804
+ <span class='kw'>end</span></pre>
805
+ </td>
806
+ </tr>
807
+ </table>
808
+ </div>
809
+
810
+ </div>
811
+
812
+
813
+ <div id="instance_method_details" class="method_details_list">
814
+ <h2>Instance Method Details</h2>
815
+
816
+
817
+ <div class="method_details first">
818
+ <h3 class="signature first" id="<=>-instance_method">
819
+
820
+ #<strong>&lt;=&gt;</strong>(other) &#x21d2; <tt>Object</tt>
821
+
822
+
823
+
824
+
825
+
826
+ </h3><table class="source_code">
827
+ <tr>
828
+ <td>
829
+ <pre class="lines">
830
+
831
+
832
+ 52
833
+ 53
834
+ 54
835
+ 55</pre>
836
+ </td>
837
+ <td>
838
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 52</span>
839
+
840
+ <span class='kw'>def</span> <span class='op'>&lt;=&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
841
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'><span class='object_link'><a href="" title="Alimento (class)">Alimento</a></span></span>
842
+ <span class='ivar'>@valor_energetico</span> <span class='op'>&lt;=&gt;</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_valor_energetico'>valor_energetico</span>
843
+ <span class='kw'>end</span></pre>
844
+ </td>
845
+ </tr>
846
+ </table>
847
+ </div>
848
+
849
+ <div class="method_details ">
850
+ <h3 class="signature " id="giv_gei-instance_method">
851
+
852
+ #<strong>giv_gei</strong>(gei) &#x21d2; <tt>Object</tt>
853
+
854
+
855
+
856
+
857
+
858
+ </h3><table class="source_code">
859
+ <tr>
860
+ <td>
861
+ <pre class="lines">
862
+
863
+
864
+ 36
865
+ 37
866
+ 38</pre>
867
+ </td>
868
+ <td>
869
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 36</span>
870
+
871
+ <span class='kw'>def</span> <span class='id identifier rubyid_giv_gei'>giv_gei</span><span class='lparen'>(</span><span class='id identifier rubyid_gei'>gei</span><span class='rparen'>)</span>
872
+ <span class='kw'>return</span> <span class='ivar'>@gei</span>
873
+ <span class='kw'>end</span></pre>
874
+ </td>
875
+ </tr>
876
+ </table>
877
+ </div>
878
+
879
+ <div class="method_details ">
880
+ <h3 class="signature " id="giv_nombre-instance_method">
881
+
882
+ #<strong>giv_nombre</strong>(nombre) &#x21d2; <tt>Object</tt>
883
+
884
+
885
+
886
+
887
+
888
+ </h3><table class="source_code">
889
+ <tr>
890
+ <td>
891
+ <pre class="lines">
892
+
893
+
894
+ 32
895
+ 33
896
+ 34</pre>
897
+ </td>
898
+ <td>
899
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 32</span>
900
+
901
+ <span class='kw'>def</span> <span class='id identifier rubyid_giv_nombre'>giv_nombre</span><span class='lparen'>(</span><span class='id identifier rubyid_nombre'>nombre</span><span class='rparen'>)</span>
902
+ <span class='kw'>return</span> <span class='ivar'>@nombre</span>
903
+ <span class='kw'>end</span></pre>
904
+ </td>
905
+ </tr>
906
+ </table>
907
+ </div>
908
+
909
+ <div class="method_details ">
910
+ <h3 class="signature " id="giv_terreno-instance_method">
911
+
912
+ #<strong>giv_terreno</strong>(terreno) &#x21d2; <tt>Object</tt>
913
+
914
+
915
+
916
+
917
+
918
+ </h3><table class="source_code">
919
+ <tr>
920
+ <td>
921
+ <pre class="lines">
922
+
923
+
924
+ 40
925
+ 41
926
+ 42</pre>
927
+ </td>
928
+ <td>
929
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 40</span>
930
+
931
+ <span class='kw'>def</span> <span class='id identifier rubyid_giv_terreno'>giv_terreno</span><span class='lparen'>(</span><span class='id identifier rubyid_terreno'>terreno</span><span class='rparen'>)</span>
932
+ <span class='kw'>return</span> <span class='ivar'>@terreno</span>
933
+ <span class='kw'>end</span></pre>
934
+ </td>
935
+ </tr>
936
+ </table>
937
+ </div>
938
+
939
+ <div class="method_details ">
940
+ <h3 class="signature " id="to_s-instance_method">
941
+
942
+ #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
943
+
944
+
945
+
946
+
947
+
948
+ </h3><table class="source_code">
949
+ <tr>
950
+ <td>
951
+ <pre class="lines">
952
+
953
+
954
+ 48
955
+ 49
956
+ 50</pre>
957
+ </td>
958
+ <td>
959
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 48</span>
960
+
961
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
962
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Nombre: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_nombre'>nombre</span><span class='embexpr_end'>}</span><span class='tstring_content'>, Proteinas: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_proteinas'>proteinas</span><span class='embexpr_end'>}</span><span class='tstring_content'>, Hidratos de carbono: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_carbohidratos'>carbohidratos</span><span class='embexpr_end'>}</span><span class='tstring_content'>, Lipidos: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_lipidos'>lipidos</span><span class='embexpr_end'>}</span><span class='tstring_content'>, Gases de efecto invernadero: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_gei'>gei</span><span class='embexpr_end'>}</span><span class='tstring_content'>, Terreno: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_terreno'>terreno</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
963
+ <span class='kw'>end</span></pre>
964
+ </td>
965
+ </tr>
966
+ </table>
967
+ </div>
968
+
969
+ <div class="method_details ">
970
+ <h3 class="signature " id="valor_energetico-instance_method">
971
+
972
+ #<strong>valor_energetico</strong> &#x21d2; <tt>Object</tt>
973
+
974
+
975
+
976
+
977
+
978
+ </h3><table class="source_code">
979
+ <tr>
980
+ <td>
981
+ <pre class="lines">
982
+
983
+
984
+ 44
985
+ 45
986
+ 46</pre>
987
+ </td>
988
+ <td>
989
+ <pre class="code"><span class="info file"># File 'lib/pract06/pract06.rb', line 44</span>
990
+
991
+ <span class='kw'>def</span> <span class='id identifier rubyid_valor_energetico'>valor_energetico</span>
992
+ <span class='kw'>return</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='ivar'>@proteinas</span> <span class='op'>*</span> <span class='int'>4</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='ivar'>@carbohidratos</span> <span class='op'>*</span> <span class='int'>9</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='ivar'>@lipidos</span> <span class='op'>*</span><span class='int'>4</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
993
+ <span class='kw'>end</span></pre>
994
+ </td>
995
+ </tr>
996
+ </table>
997
+ </div>
998
+
999
+ </div>
1000
+
1001
+ </div>
1002
+
1003
+ <div id="footer">
1004
+ Generated on Wed Dec 18 17:08:16 2019 by
1005
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1006
+ 0.9.20 (ruby-2.6.3).
1007
+ </div>
1008
+
1009
+ </div>
1010
+ </body>
1011
+ </html>