alimento0100997910 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 693f54d1bd9826808d8fea946b6809fc420f89ac
4
+ data.tar.gz: 9803efeae1ef3fa7e2c6957bb8dec1ac872c2336
5
+ SHA512:
6
+ metadata.gz: 46a08a46735a270964e5faeec21f0c1bfdba9863b0896a62871c7f06723e4f4b4dedd204cd8b3ac5b6b162946edb6e4ac2c30090091743a60696ea071a1ac8a9
7
+ data.tar.gz: 7be01c543927edb2fcdbdef56d7a9fe8d0a227bdc26edaf9e2db81160326ec9ef37f361042eed84d8b378f6eeaaf3113748498165fc157a8d8d339ea88ee2cf8
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.rspec_status ADDED
@@ -0,0 +1,55 @@
1
+ example_id | status | run_time |
2
+ -------------------------------- | ------ | --------------- |
3
+ ./spec/alimento_spec.rb[1:1] | passed | 0.00073 seconds |
4
+ ./spec/alimento_spec.rb[1:2:1:1] | passed | 0.00066 seconds |
5
+ ./spec/alimento_spec.rb[1:2:1:2] | passed | 0.00024 seconds |
6
+ ./spec/alimento_spec.rb[1:2:1:3] | passed | 0.00018 seconds |
7
+ ./spec/alimento_spec.rb[1:2:1:4] | passed | 0.00022 seconds |
8
+ ./spec/alimento_spec.rb[1:2:2:1] | passed | 0.00019 seconds |
9
+ ./spec/alimento_spec.rb[1:2:2:2] | passed | 0.00021 seconds |
10
+ ./spec/alimento_spec.rb[1:2:2:3] | passed | 0.00035 seconds |
11
+ ./spec/alimento_spec.rb[1:2:2:4] | passed | 0.00058 seconds |
12
+ ./spec/alimento_spec.rb[1:2:2:5] | passed | 0.00054 seconds |
13
+ ./spec/alimento_spec.rb[1:2:3:1] | passed | 0.00226 seconds |
14
+ ./spec/alimento_spec.rb[1:2:3:2] | passed | 0.0003 seconds |
15
+ ./spec/alimento_spec.rb[1:2:3:3] | passed | 0.00023 seconds |
16
+ ./spec/alimento_spec.rb[1:2:3:4] | passed | 0.00024 seconds |
17
+ ./spec/alimento_spec.rb[1:2:3:5] | passed | 0.00021 seconds |
18
+ ./spec/alimento_spec.rb[2:1] | passed | 0.00019 seconds |
19
+ ./spec/alimento_spec.rb[2:2] | passed | 0.0002 seconds |
20
+ ./spec/alimento_spec.rb[2:3] | passed | 0.00018 seconds |
21
+ ./spec/alimento_spec.rb[3:1] | passed | 0.00019 seconds |
22
+ ./spec/alimento_spec.rb[3:2] | passed | 0.00018 seconds |
23
+ ./spec/alimento_spec.rb[3:3] | passed | 0.00018 seconds |
24
+ ./spec/alimento_spec.rb[4:1] | passed | 0.00021 seconds |
25
+ ./spec/alimento_spec.rb[4:2] | passed | 0.00018 seconds |
26
+ ./spec/alimento_spec.rb[4:3] | passed | 0.0002 seconds |
27
+ ./spec/alimento_spec.rb[5:1] | passed | 0.00021 seconds |
28
+ ./spec/alimento_spec.rb[5:2] | passed | 0.0002 seconds |
29
+ ./spec/alimento_spec.rb[5:3] | passed | 0.00019 seconds |
30
+ ./spec/alimento_spec.rb[6:1] | passed | 0.00027 seconds |
31
+ ./spec/alimento_spec.rb[6:2] | passed | 0.00019 seconds |
32
+ ./spec/alimento_spec.rb[6:3] | passed | 0.00021 seconds |
33
+ ./spec/alimento_spec.rb[7:1] | passed | 0.00018 seconds |
34
+ ./spec/alimento_spec.rb[7:2] | passed | 0.00017 seconds |
35
+ ./spec/alimento_spec.rb[7:3] | passed | 0.00017 seconds |
36
+ ./spec/alimento_spec.rb[8:1] | passed | 0.00018 seconds |
37
+ ./spec/alimento_spec.rb[8:2] | passed | 0.0002 seconds |
38
+ ./spec/alimento_spec.rb[8:3] | passed | 0.00015 seconds |
39
+ ./spec/alimento_spec.rb[9:1:1] | passed | 0.00015 seconds |
40
+ ./spec/alimento_spec.rb[9:1:2:1] | passed | 0.00012 seconds |
41
+ ./spec/alimento_spec.rb[9:1:2:2] | passed | 0.00013 seconds |
42
+ ./spec/alimento_spec.rb[9:1:2:3] | passed | 0.00011 seconds |
43
+ ./spec/alimento_spec.rb[9:1:2:4] | passed | 0.00013 seconds |
44
+ ./spec/alimento_spec.rb[9:1:2:5] | passed | 0.00013 seconds |
45
+ ./spec/alimento_spec.rb[9:1:3:1] | passed | 0.00015 seconds |
46
+ ./spec/alimento_spec.rb[9:1:3:2] | passed | 0.00013 seconds |
47
+ ./spec/alimento_spec.rb[9:1:4:1] | passed | 0.00058 seconds |
48
+ ./spec/alimento_spec.rb[9:1:4:2] | passed | 0.00081 seconds |
49
+ ./spec/alimento_spec.rb[9:1:4:3] | passed | 0.00025 seconds |
50
+ ./spec/alimento_spec.rb[10:1] | passed | 0.00014 seconds |
51
+ ./spec/alimento_spec.rb[10:2] | passed | 0.00011 seconds |
52
+ ./spec/alimento_spec.rb[10:3] | passed | 0.00011 seconds |
53
+ ./spec/alimento_spec.rb[10:4] | passed | 0.00012 seconds |
54
+ ./spec/alimento_spec.rb[10:5] | passed | 0.00013 seconds |
55
+ ./spec/alimento_spec.rb[10:6] | passed | 0.00032 seconds |
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.0
5
+ - 2.3.0
6
+ before_install: gem install bundler -v 1.15.4
data/Gemfile ADDED
@@ -0,0 +1,6 @@
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 alimento.gemspec
6
+ gemspec
data/Guardfile ADDED
@@ -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
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Alimento
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/alimento`. 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 'alimento'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install alimento
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]/alimento.
data/Rakefile ADDED
@@ -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
data/alimento.gemspec ADDED
@@ -0,0 +1,40 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "alimento/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "alimento0100997910"
8
+ spec.version = Alimento::VERSION
9
+ spec.authors = ["Alejandro Gonzalez Alonso"]
10
+ spec.email = ["alu0100997910@ull.edu.es"]
11
+
12
+ spec.summary = %q{Gema Alimento para la practica 6 de LPP}
13
+ spec.description = %q{Gema para calcular el indice calorico de un alimento}
14
+ spec.homepage = "https://github.com/ULL-ESIT-LPP-1718/tdd-alu0100997910.git"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(test|spec|features)/})
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.15"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_development_dependency "guard"
36
+ spec.add_development_dependency "guard-rspec"
37
+ spec.add_development_dependency "guard-bundler"
38
+ spec.add_development_dependency "yard"
39
+ spec.add_development_dependency "coveralls"
40
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "alimento"
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__)
data/bin/setup ADDED
@@ -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,150 @@
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
+ Module: Alimento
8
+
9
+ &mdash; Documentation by YARD 0.9.9
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>Module: Alimento
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/alimento/fuente.rb<span class="defines">,<br />
82
+ lib/alimento.rb,<br /> lib/alimento/version.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+ <p>Este módulo se ha creado para describir las clases alimentos y las clases
92
+ que heredan de los alimentos</p>
93
+ <dl class="rdoc-list note-list"><dt>Author
94
+ <dd>
95
+ <p>Alejandro González Alonso (<a
96
+ href="mailto:alu0100997910@ull.edu.es">alu0100997910@ull.edu.es</a>)</p>
97
+ </dd><dt>Copyright
98
+ <dd>
99
+ <p>Creative Commons</p>
100
+ </dd><dt>License
101
+ <dd>
102
+ <p>Distributes under the same terms as Ruby</p>
103
+ </dd></dl>
104
+
105
+
106
+ </div>
107
+ </div>
108
+ <div class="tags">
109
+
110
+
111
+ </div><h2>Defined Under Namespace</h2>
112
+ <p class="children">
113
+
114
+
115
+
116
+
117
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Alimento/Alimento.html" title="Alimento::Alimento (class)">Alimento</a></span>, <span class='object_link'><a href="Alimento/Carbohidratos.html" title="Alimento::Carbohidratos (class)">Carbohidratos</a></span>, <span class='object_link'><a href="Alimento/Carnes.html" title="Alimento::Carnes (class)">Carnes</a></span>, <span class='object_link'><a href="Alimento/DerivadoLacteo.html" title="Alimento::DerivadoLacteo (class)">DerivadoLacteo</a></span>, <span class='object_link'><a href="Alimento/Frutas.html" title="Alimento::Frutas (class)">Frutas</a></span>, <span class='object_link'><a href="Alimento/Grasos.html" title="Alimento::Grasos (class)">Grasos</a></span>, <span class='object_link'><a href="Alimento/Pescados.html" title="Alimento::Pescados (class)">Pescados</a></span>, <span class='object_link'><a href="Alimento/Plato.html" title="Alimento::Plato (class)">Plato</a></span>, <span class='object_link'><a href="Alimento/Verduras.html" title="Alimento::Verduras (class)">Verduras</a></span>
118
+
119
+
120
+ </p>
121
+
122
+ <h2>Constant Summary</h2>
123
+ <dl class="constants">
124
+
125
+ <dt id="VERSION-constant" class="">VERSION =
126
+
127
+ </dt>
128
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
129
+
130
+ </dl>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ </div>
141
+
142
+ <div id="footer">
143
+ Generated on Tue Dec 12 20:42:59 2017 by
144
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
145
+ 0.9.9 (ruby-2.4.2).
146
+ </div>
147
+
148
+ </div>
149
+ </body>
150
+ </html>
@@ -0,0 +1,961 @@
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::Alimento
8
+
9
+ &mdash; Documentation by YARD 0.9.9
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::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
+ <span class='title'><span class='object_link'><a href="../Alimento.html" title="Alimento (module)">Alimento</a></span></span>
41
+ &raquo;
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::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::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/alimento/fuente.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>Esta clase permite representar un alimento, con sus valores en Proteínas,
111
+ Glúcidos y Lípidos Se han incluido los mixin Comparable.</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div><div id="subclasses">
120
+ <h2>Direct Known Subclasses</h2>
121
+ <p class="children"><span class='object_link'><a href="Carbohidratos.html" title="Alimento::Carbohidratos (class)">Carbohidratos</a></span>, <span class='object_link'><a href="Carnes.html" title="Alimento::Carnes (class)">Carnes</a></span>, <span class='object_link'><a href="DerivadoLacteo.html" title="Alimento::DerivadoLacteo (class)">DerivadoLacteo</a></span>, <span class='object_link'><a href="Frutas.html" title="Alimento::Frutas (class)">Frutas</a></span>, <span class='object_link'><a href="Grasos.html" title="Alimento::Grasos (class)">Grasos</a></span>, <span class='object_link'><a href="Pescados.html" title="Alimento::Pescados (class)">Pescados</a></span>, <span class='object_link'><a href="Verduras.html" title="Alimento::Verduras (class)">Verduras</a></span></p>
122
+ </div>
123
+
124
+
125
+
126
+
127
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#glucidos-instance_method" title="#glucidos (instance method)">#<strong>glucidos</strong> &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+ <span class="note title readonly">readonly</span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'>
153
+ <p>Returns the value of attribute glucidos.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#lipidos-instance_method" title="#lipidos (instance method)">#<strong>lipidos</strong> &#x21d2; Object </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+ <span class="note title readonly">readonly</span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'>
182
+ <p>Returns the value of attribute lipidos.</p>
183
+ </div></span>
184
+
185
+ </li>
186
+
187
+
188
+ <li class="public ">
189
+ <span class="summary_signature">
190
+
191
+ <a href="#nombre-instance_method" title="#nombre (instance method)">#<strong>nombre</strong> &#x21d2; Object </a>
192
+
193
+
194
+
195
+ </span>
196
+
197
+
198
+
199
+
200
+ <span class="note title readonly">readonly</span>
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+ <span class="summary_desc"><div class='inline'>
211
+ <p>Returns the value of attribute nombre.</p>
212
+ </div></span>
213
+
214
+ </li>
215
+
216
+
217
+ <li class="public ">
218
+ <span class="summary_signature">
219
+
220
+ <a href="#proteinas-instance_method" title="#proteinas (instance method)">#<strong>proteinas</strong> &#x21d2; Object </a>
221
+
222
+
223
+
224
+ </span>
225
+
226
+
227
+
228
+
229
+ <span class="note title readonly">readonly</span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>Returns the value of attribute proteinas.</p>
241
+ </div></span>
242
+
243
+ </li>
244
+
245
+
246
+ </ul>
247
+
248
+
249
+
250
+
251
+
252
+ <h2>
253
+ Instance Method Summary
254
+ <small><a href="#" class="summary_toggle">collapse</a></small>
255
+ </h2>
256
+
257
+ <ul class="summary">
258
+
259
+ <li class="public ">
260
+ <span class="summary_signature">
261
+
262
+ <a href="#<=>-instance_method" title="#&lt;=&gt; (instance method)">#<strong>&lt;=&gt;</strong>(other) &#x21d2; Object </a>
263
+
264
+
265
+
266
+ </span>
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+ <span class="summary_desc"><div class='inline'>
277
+ <p>Se define para incluir el mixin comparable Compara los alimentos según su
278
+ valor energético.</p>
279
+ </div></span>
280
+
281
+ </li>
282
+
283
+
284
+ <li class="public ">
285
+ <span class="summary_signature">
286
+
287
+ <a href="#aibc-instance_method" title="#aibc (instance method)">#<strong>aibc</strong> &#x21d2; Object </a>
288
+
289
+
290
+
291
+ </span>
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+ <span class="summary_desc"><div class='inline'>
302
+ <p>Calcula el area bajo la curva de un alimento.</p>
303
+ </div></span>
304
+
305
+ </li>
306
+
307
+
308
+ <li class="public ">
309
+ <span class="summary_signature">
310
+
311
+ <a href="#energeticValue-instance_method" title="#energeticValue (instance method)">#<strong>energeticValue</strong> &#x21d2; Object </a>
312
+
313
+
314
+
315
+ </span>
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+ <span class="summary_desc"><div class='inline'>
326
+ <p>Se calcula el valor energético del alimento.</p>
327
+ </div></span>
328
+
329
+ </li>
330
+
331
+
332
+ <li class="public ">
333
+ <span class="summary_signature">
334
+
335
+ <a href="#indGlu-instance_method" title="#indGlu (instance method)">#<strong>indGlu</strong>(glucosa) &#x21d2; Object </a>
336
+
337
+
338
+
339
+ </span>
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ <span class="summary_desc"><div class='inline'>
350
+ <p>Calcula el indice glucemico total de un alimento.</p>
351
+ </div></span>
352
+
353
+ </li>
354
+
355
+
356
+ <li class="public ">
357
+ <span class="summary_signature">
358
+
359
+ <a href="#indIdv-instance_method" title="#indIdv (instance method)">#<strong>indIdv</strong>(individuo, glucosa) &#x21d2; Object </a>
360
+
361
+
362
+
363
+ </span>
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <span class="summary_desc"><div class='inline'>
374
+ <p>Calcula el indice glucemico individual de un alimento.</p>
375
+ </div></span>
376
+
377
+ </li>
378
+
379
+
380
+ <li class="public ">
381
+ <span class="summary_signature">
382
+
383
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name, p, g, l, med = nil) &#x21d2; Alimento </a>
384
+
385
+
386
+
387
+ </span>
388
+
389
+
390
+ <span class="note title constructor">constructor</span>
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+ <span class="summary_desc"><div class='inline'>
400
+ <p>Se definen los valores de proteinas, glucidos y lipidos y el nombre del
401
+ alimento.</p>
402
+ </div></span>
403
+
404
+ </li>
405
+
406
+
407
+ <li class="public ">
408
+ <span class="summary_signature">
409
+
410
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
411
+
412
+
413
+
414
+ </span>
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+ <span class="summary_desc"><div class='inline'>
425
+ <p>Formatea el objeto alimento a una cadena de texto.</p>
426
+ </div></span>
427
+
428
+ </li>
429
+
430
+
431
+ </ul>
432
+
433
+
434
+
435
+ <div id="constructor_details" class="method_details_list">
436
+ <h2>Constructor Details</h2>
437
+
438
+ <div class="method_details first">
439
+ <h3 class="signature first" id="initialize-instance_method">
440
+
441
+ #<strong>initialize</strong>(name, p, g, l, med = nil) &#x21d2; <tt><span class='object_link'><a href="" title="Alimento::Alimento (class)">Alimento</a></span></tt>
442
+
443
+
444
+
445
+
446
+
447
+ </h3><div class="docstring">
448
+ <div class="discussion">
449
+
450
+ <p>Se definen los valores de proteinas, glucidos y lipidos y el nombre del
451
+ alimento</p>
452
+
453
+
454
+ </div>
455
+ </div>
456
+ <div class="tags">
457
+
458
+
459
+ </div><table class="source_code">
460
+ <tr>
461
+ <td>
462
+ <pre class="lines">
463
+
464
+
465
+ 25
466
+ 26
467
+ 27
468
+ 28
469
+ 29
470
+ 30
471
+ 31</pre>
472
+ </td>
473
+ <td>
474
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 25</span>
475
+
476
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span><span class='id identifier rubyid_p'>p</span><span class='comma'>,</span><span class='id identifier rubyid_g'>g</span><span class='comma'>,</span><span class='id identifier rubyid_l'>l</span><span class='comma'>,</span><span class='id identifier rubyid_med'>med</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
477
+ <span class='ivar'>@nombre</span><span class='op'>=</span><span class='id identifier rubyid_name'>name</span>
478
+ <span class='ivar'>@proteinas</span><span class='op'>=</span><span class='id identifier rubyid_p'>p</span>
479
+ <span class='ivar'>@glucidos</span><span class='op'>=</span><span class='id identifier rubyid_g'>g</span>
480
+ <span class='ivar'>@lipidos</span><span class='op'>=</span><span class='id identifier rubyid_l'>l</span>
481
+ <span class='ivar'>@g</span><span class='op'>=</span><span class='id identifier rubyid_med'>med</span>
482
+ <span class='kw'>end</span></pre>
483
+ </td>
484
+ </tr>
485
+ </table>
486
+ </div>
487
+
488
+ </div>
489
+
490
+ <div id="instance_attr_details" class="attr_details">
491
+ <h2>Instance Attribute Details</h2>
492
+
493
+
494
+ <span id=""></span>
495
+ <div class="method_details first">
496
+ <h3 class="signature first" id="glucidos-instance_method">
497
+
498
+ #<strong>glucidos</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
499
+
500
+
501
+
502
+
503
+
504
+ </h3><div class="docstring">
505
+ <div class="discussion">
506
+
507
+ <p>Returns the value of attribute glucidos</p>
508
+
509
+
510
+ </div>
511
+ </div>
512
+ <div class="tags">
513
+
514
+
515
+ </div><table class="source_code">
516
+ <tr>
517
+ <td>
518
+ <pre class="lines">
519
+
520
+
521
+ 14
522
+ 15
523
+ 16</pre>
524
+ </td>
525
+ <td>
526
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 14</span>
527
+
528
+ <span class='kw'>def</span> <span class='id identifier rubyid_glucidos'>glucidos</span>
529
+ <span class='ivar'>@glucidos</span>
530
+ <span class='kw'>end</span></pre>
531
+ </td>
532
+ </tr>
533
+ </table>
534
+ </div>
535
+
536
+
537
+ <span id=""></span>
538
+ <div class="method_details ">
539
+ <h3 class="signature " id="lipidos-instance_method">
540
+
541
+ #<strong>lipidos</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
542
+
543
+
544
+
545
+
546
+
547
+ </h3><div class="docstring">
548
+ <div class="discussion">
549
+
550
+ <p>Returns the value of attribute lipidos</p>
551
+
552
+
553
+ </div>
554
+ </div>
555
+ <div class="tags">
556
+
557
+
558
+ </div><table class="source_code">
559
+ <tr>
560
+ <td>
561
+ <pre class="lines">
562
+
563
+
564
+ 14
565
+ 15
566
+ 16</pre>
567
+ </td>
568
+ <td>
569
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 14</span>
570
+
571
+ <span class='kw'>def</span> <span class='id identifier rubyid_lipidos'>lipidos</span>
572
+ <span class='ivar'>@lipidos</span>
573
+ <span class='kw'>end</span></pre>
574
+ </td>
575
+ </tr>
576
+ </table>
577
+ </div>
578
+
579
+
580
+ <span id=""></span>
581
+ <div class="method_details ">
582
+ <h3 class="signature " id="nombre-instance_method">
583
+
584
+ #<strong>nombre</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
585
+
586
+
587
+
588
+
589
+
590
+ </h3><div class="docstring">
591
+ <div class="discussion">
592
+
593
+ <p>Returns the value of attribute nombre</p>
594
+
595
+
596
+ </div>
597
+ </div>
598
+ <div class="tags">
599
+
600
+
601
+ </div><table class="source_code">
602
+ <tr>
603
+ <td>
604
+ <pre class="lines">
605
+
606
+
607
+ 14
608
+ 15
609
+ 16</pre>
610
+ </td>
611
+ <td>
612
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 14</span>
613
+
614
+ <span class='kw'>def</span> <span class='id identifier rubyid_nombre'>nombre</span>
615
+ <span class='ivar'>@nombre</span>
616
+ <span class='kw'>end</span></pre>
617
+ </td>
618
+ </tr>
619
+ </table>
620
+ </div>
621
+
622
+
623
+ <span id=""></span>
624
+ <div class="method_details ">
625
+ <h3 class="signature " id="proteinas-instance_method">
626
+
627
+ #<strong>proteinas</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
628
+
629
+
630
+
631
+
632
+
633
+ </h3><div class="docstring">
634
+ <div class="discussion">
635
+
636
+ <p>Returns the value of attribute proteinas</p>
637
+
638
+
639
+ </div>
640
+ </div>
641
+ <div class="tags">
642
+
643
+
644
+ </div><table class="source_code">
645
+ <tr>
646
+ <td>
647
+ <pre class="lines">
648
+
649
+
650
+ 14
651
+ 15
652
+ 16</pre>
653
+ </td>
654
+ <td>
655
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 14</span>
656
+
657
+ <span class='kw'>def</span> <span class='id identifier rubyid_proteinas'>proteinas</span>
658
+ <span class='ivar'>@proteinas</span>
659
+ <span class='kw'>end</span></pre>
660
+ </td>
661
+ </tr>
662
+ </table>
663
+ </div>
664
+
665
+ </div>
666
+
667
+
668
+ <div id="instance_method_details" class="method_details_list">
669
+ <h2>Instance Method Details</h2>
670
+
671
+
672
+ <div class="method_details first">
673
+ <h3 class="signature first" id="<=>-instance_method">
674
+
675
+ #<strong>&lt;=&gt;</strong>(other) &#x21d2; <tt>Object</tt>
676
+
677
+
678
+
679
+
680
+
681
+ </h3><div class="docstring">
682
+ <div class="discussion">
683
+
684
+ <p>Se define para incluir el mixin comparable Compara los alimentos según su
685
+ valor energético</p>
686
+
687
+
688
+ </div>
689
+ </div>
690
+ <div class="tags">
691
+
692
+
693
+ </div><table class="source_code">
694
+ <tr>
695
+ <td>
696
+ <pre class="lines">
697
+
698
+
699
+ 18
700
+ 19
701
+ 20
702
+ 21</pre>
703
+ </td>
704
+ <td>
705
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 18</span>
706
+
707
+ <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>
708
+ <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'>Alimento</span>
709
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_energeticValue'>energeticValue</span> <span class='op'>&lt;=&gt;</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_energeticValue'>energeticValue</span>
710
+ <span class='kw'>end</span></pre>
711
+ </td>
712
+ </tr>
713
+ </table>
714
+ </div>
715
+
716
+ <div class="method_details ">
717
+ <h3 class="signature " id="aibc-instance_method">
718
+
719
+ #<strong>aibc</strong> &#x21d2; <tt>Object</tt>
720
+
721
+
722
+
723
+
724
+
725
+ </h3><div class="docstring">
726
+ <div class="discussion">
727
+
728
+ <p>Calcula el area bajo la curva de un alimento</p>
729
+
730
+
731
+ </div>
732
+ </div>
733
+ <div class="tags">
734
+
735
+
736
+ </div><table class="source_code">
737
+ <tr>
738
+ <td>
739
+ <pre class="lines">
740
+
741
+
742
+ 39
743
+ 40
744
+ 41
745
+ 42
746
+ 43
747
+ 44
748
+ 45
749
+ 46
750
+ 47
751
+ 48
752
+ 49
753
+ 50
754
+ 51</pre>
755
+ </td>
756
+ <td>
757
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 39</span>
758
+
759
+ <span class='kw'>def</span> <span class='id identifier rubyid_aibc'>aibc</span>
760
+ <span class='id identifier rubyid_aibc'>aibc</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
761
+ <span class='ivar'>@g</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_value'>value</span><span class='op'>|</span>
762
+ <span class='id identifier rubyid_s'>s</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
763
+ <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_val'>val</span><span class='comma'>,</span><span class='id identifier rubyid_j'>j</span><span class='op'>|</span>
764
+ <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_j'>j</span><span class='op'>!=</span><span class='int'>0</span><span class='rparen'>)</span>
765
+ <span class='id identifier rubyid_s'>s</span> <span class='op'>&lt;&lt;</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_val'>val</span><span class='op'>-</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='op'>+</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='id identifier rubyid_j'>j</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='op'>-</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='op'>*</span><span class='int'>5</span><span class='rparen'>)</span><span class='op'>/</span><span class='int'>2</span>
766
+ <span class='kw'>end</span>
767
+ <span class='kw'>end</span>
768
+ <span class='id identifier rubyid_aibc'>aibc</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span><span class='lparen'>(</span><span class='symbol'>:+</span><span class='rparen'>)</span>
769
+ <span class='kw'>end</span>
770
+ <span class='id identifier rubyid_aibc'>aibc</span>
771
+ <span class='kw'>end</span></pre>
772
+ </td>
773
+ </tr>
774
+ </table>
775
+ </div>
776
+
777
+ <div class="method_details ">
778
+ <h3 class="signature " id="energeticValue-instance_method">
779
+
780
+ #<strong>energeticValue</strong> &#x21d2; <tt>Object</tt>
781
+
782
+
783
+
784
+
785
+
786
+ </h3><div class="docstring">
787
+ <div class="discussion">
788
+
789
+ <p>Se calcula el valor energético del alimento</p>
790
+
791
+
792
+ </div>
793
+ </div>
794
+ <div class="tags">
795
+
796
+
797
+ </div><table class="source_code">
798
+ <tr>
799
+ <td>
800
+ <pre class="lines">
801
+
802
+
803
+ 34
804
+ 35
805
+ 36</pre>
806
+ </td>
807
+ <td>
808
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 34</span>
809
+
810
+ <span class='kw'>def</span> <span class='id identifier rubyid_energeticValue'>energeticValue</span>
811
+ <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='ivar'>@proteinas</span><span class='op'>*</span><span class='int'>4</span> <span class='op'>+</span> <span class='ivar'>@glucidos</span><span class='op'>*</span><span class='int'>4</span> <span class='op'>+</span> <span class='ivar'>@lipidos</span><span class='op'>*</span><span class='int'>9</span>
812
+ <span class='kw'>end</span></pre>
813
+ </td>
814
+ </tr>
815
+ </table>
816
+ </div>
817
+
818
+ <div class="method_details ">
819
+ <h3 class="signature " id="indGlu-instance_method">
820
+
821
+ #<strong>indGlu</strong>(glucosa) &#x21d2; <tt>Object</tt>
822
+
823
+
824
+
825
+
826
+
827
+ </h3><div class="docstring">
828
+ <div class="discussion">
829
+
830
+ <p>Calcula el indice glucemico total de un alimento</p>
831
+
832
+
833
+ </div>
834
+ </div>
835
+ <div class="tags">
836
+
837
+
838
+ </div><table class="source_code">
839
+ <tr>
840
+ <td>
841
+ <pre class="lines">
842
+
843
+
844
+ 59
845
+ 60
846
+ 61
847
+ 62
848
+ 63
849
+ 64
850
+ 65</pre>
851
+ </td>
852
+ <td>
853
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 59</span>
854
+
855
+ <span class='kw'>def</span> <span class='id identifier rubyid_indGlu'>indGlu</span><span class='lparen'>(</span><span class='id identifier rubyid_glucosa'>glucosa</span><span class='rparen'>)</span>
856
+ <span class='id identifier rubyid_indidv'>indidv</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
857
+ <span class='ivar'>@g</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span><span class='id identifier rubyid_index'>index</span><span class='op'>|</span>
858
+ <span class='id identifier rubyid_indidv'>indidv</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_indIdv'>indIdv</span><span class='lparen'>(</span><span class='id identifier rubyid_index'>index</span><span class='comma'>,</span><span class='id identifier rubyid_glucosa'>glucosa</span><span class='rparen'>)</span>
859
+ <span class='kw'>end</span>
860
+ <span class='lparen'>(</span><span class='id identifier rubyid_indidv'>indidv</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span><span class='lparen'>(</span><span class='symbol'>:+</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='op'>/</span><span class='ivar'>@g</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
861
+ <span class='kw'>end</span></pre>
862
+ </td>
863
+ </tr>
864
+ </table>
865
+ </div>
866
+
867
+ <div class="method_details ">
868
+ <h3 class="signature " id="indIdv-instance_method">
869
+
870
+ #<strong>indIdv</strong>(individuo, glucosa) &#x21d2; <tt>Object</tt>
871
+
872
+
873
+
874
+
875
+
876
+ </h3><div class="docstring">
877
+ <div class="discussion">
878
+
879
+ <p>Calcula el indice glucemico individual de un alimento</p>
880
+
881
+
882
+ </div>
883
+ </div>
884
+ <div class="tags">
885
+
886
+
887
+ </div><table class="source_code">
888
+ <tr>
889
+ <td>
890
+ <pre class="lines">
891
+
892
+
893
+ 54
894
+ 55
895
+ 56</pre>
896
+ </td>
897
+ <td>
898
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 54</span>
899
+
900
+ <span class='kw'>def</span> <span class='id identifier rubyid_indIdv'>indIdv</span><span class='lparen'>(</span><span class='id identifier rubyid_individuo'>individuo</span><span class='comma'>,</span><span class='id identifier rubyid_glucosa'>glucosa</span><span class='rparen'>)</span>
901
+ <span class='id identifier rubyid_indidv'>indidv</span><span class='op'>=</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aibc'>aibc</span><span class='lbracket'>[</span><span class='id identifier rubyid_individuo'>individuo</span><span class='rbracket'>]</span><span class='op'>*</span><span class='int'>100</span><span class='op'>/</span><span class='id identifier rubyid_glucosa'>glucosa</span><span class='period'>.</span><span class='id identifier rubyid_aibc'>aibc</span><span class='lbracket'>[</span><span class='id identifier rubyid_individuo'>individuo</span><span class='rbracket'>]</span>
902
+ <span class='kw'>end</span></pre>
903
+ </td>
904
+ </tr>
905
+ </table>
906
+ </div>
907
+
908
+ <div class="method_details ">
909
+ <h3 class="signature " id="to_s-instance_method">
910
+
911
+ #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
912
+
913
+
914
+
915
+
916
+
917
+ </h3><div class="docstring">
918
+ <div class="discussion">
919
+
920
+ <p>Formatea el objeto alimento a una cadena de texto</p>
921
+
922
+
923
+ </div>
924
+ </div>
925
+ <div class="tags">
926
+
927
+
928
+ </div><table class="source_code">
929
+ <tr>
930
+ <td>
931
+ <pre class="lines">
932
+
933
+
934
+ 68
935
+ 69
936
+ 70</pre>
937
+ </td>
938
+ <td>
939
+ <pre class="code"><span class="info file"># File 'lib/alimento/fuente.rb', line 68</span>
940
+
941
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
942
+ <span class='id identifier rubyid_cadena'>cadena</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='ivar'>@nombre</span><span class='embexpr_end'>}</span><span class='tstring_content'>,</span><span class='embexpr_beg'>#{</span><span class='ivar'>@proteinas</span><span class='embexpr_end'>}</span><span class='tstring_content'>,</span><span class='embexpr_beg'>#{</span><span class='ivar'>@glucidos</span><span class='embexpr_end'>}</span><span class='tstring_content'>,</span><span class='embexpr_beg'>#{</span><span class='ivar'>@lipidos</span><span class='embexpr_end'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>&quot;</span></span>
943
+ <span class='kw'>end</span></pre>
944
+ </td>
945
+ </tr>
946
+ </table>
947
+ </div>
948
+
949
+ </div>
950
+
951
+ </div>
952
+
953
+ <div id="footer">
954
+ Generated on Tue Dec 12 20:43:00 2017 by
955
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
956
+ 0.9.9 (ruby-2.4.2).
957
+ </div>
958
+
959
+ </div>
960
+ </body>
961
+ </html>