gem_diet_alu0100891782 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.practica6.gemspec.swp +0 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +8 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +11 -0
- data/Rakefile +7 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/Diet.html +1495 -0
- data/doc/Diet_Alim.html +454 -0
- data/doc/Diet_edad.html +452 -0
- data/doc/List.html +932 -0
- data/doc/Node.html +400 -0
- data/doc/Practica6.html +119 -0
- data/doc/_index.html +158 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +481 -0
- data/doc/file.README.html +85 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +85 -0
- data/doc/js/app.js +243 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +371 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/practica6.rb +6 -0
- data/lib/practica6/practica10.rb +58 -0
- data/lib/practica6/practica6.rb +88 -0
- data/lib/practica6/practica7.rb +90 -0
- data/lib/practica6/practica8.rb +45 -0
- data/lib/practica6/version.rb +3 -0
- data/practica6.gemspec +41 -0
- metadata +168 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 186ec352ae723acf160753671a3ea432f953e481
|
4
|
+
data.tar.gz: c50307268a3593d519270809ff50ab08b3fbcdb7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e37033dacc76a302ebb0901fd2c7a3a0f2d2e5bea8527b2560a6a3020d9c891f47fbc2d795bded02a515537772ee3f41afd04cd357aa6fba0b73acc7d1f3e8d1
|
7
|
+
data.tar.gz: bc0a2bc6079f34b2752917d4d34b68feae16331883bc7f9ea433c9d70da4606fb43c0421449f870ab42197de348b8939e9603d6651c1cdcbf4bf605ec9442575
|
data/.gitignore
ADDED
Binary file
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -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 alu0100881677@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
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/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Guillermo
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Practica7: Menu Dietetico
|
2
|
+
|
3
|
+
|
4
|
+
This project is about a Simple Linked List to store diets. In lib/practica6/ you will find the classes Diet and List.
|
5
|
+
|
6
|
+
It has also been implemented some tests for the List class as for the Diet class in the previous project.
|
7
|
+
|
8
|
+
To store each value in the List it has been used a Struct calles Node ---> Node=Struct.new(:value,:next)
|
9
|
+
|
10
|
+
Author: Tarun Mohandas Daryanani "alu0100891782@ull.edu.es"
|
11
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "practica6"
|
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
|
data/bin/setup
ADDED
data/doc/Diet.html
ADDED
@@ -0,0 +1,1495 @@
|
|
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: Diet
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.5
|
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 = "Diet";
|
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"></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 (D)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Diet</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
|
+
<iframe id="search_frame" src="class_list.html"></iframe>
|
63
|
+
|
64
|
+
<div id="content"><h1>Class: Diet
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
</h1>
|
69
|
+
<div class="box_info">
|
70
|
+
|
71
|
+
<dl>
|
72
|
+
<dt>Inherits:</dt>
|
73
|
+
<dd>
|
74
|
+
<span class="inheritName">Object</span>
|
75
|
+
|
76
|
+
<ul class="fullTree">
|
77
|
+
<li>Object</li>
|
78
|
+
|
79
|
+
<li class="next">Diet</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<dl>
|
93
|
+
<dt>Includes:</dt>
|
94
|
+
<dd>Comparable</dd>
|
95
|
+
</dl>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dl>
|
103
|
+
<dt>Defined in:</dt>
|
104
|
+
<dd>lib/practica6/practica6.rb</dd>
|
105
|
+
</dl>
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<div id="subclasses">
|
110
|
+
<h2>Direct Known Subclasses</h2>
|
111
|
+
<p class="children"><span class='object_link'><a href="Diet_Alim.html" title="Diet_Alim (class)">Diet_Alim</a></span>, <span class='object_link'><a href="Diet_edad.html" title="Diet_edad (class)">Diet_edad</a></span></p>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
118
|
+
<ul class="summary">
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#con_plato-instance_method" title="#con_plato (instance method)">#<strong>con_plato</strong> ⇒ Object </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<span class="note title readonly">readonly</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Returns the value of attribute con_plato.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong> ⇒ Object </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<span class="note title readonly">readonly</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
172
|
+
<p>Returns the value of attribute data.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
<li class="public ">
|
179
|
+
<span class="summary_signature">
|
180
|
+
|
181
|
+
<a href="#des_plato-instance_method" title="#des_plato (instance method)">#<strong>des_plato</strong> ⇒ Object </a>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</span>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="note title readonly">readonly</span>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
201
|
+
<p>Returns the value of attribute des_plato.</p>
|
202
|
+
</div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
<li class="public ">
|
208
|
+
<span class="summary_signature">
|
209
|
+
|
210
|
+
<a href="#percentage-instance_method" title="#percentage (instance method)">#<strong>percentage</strong> ⇒ Object </a>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
</span>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<span class="note title readonly">readonly</span>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<span class="summary_desc"><div class='inline'>
|
230
|
+
<p>Returns the value of attribute percentage.</p>
|
231
|
+
</div></span>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
|
236
|
+
<li class="public ">
|
237
|
+
<span class="summary_signature">
|
238
|
+
|
239
|
+
<a href="#title-instance_method" title="#title (instance method)">#<strong>title</strong> ⇒ Object </a>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
</span>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
<span class="note title readonly">readonly</span>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
<span class="summary_desc"><div class='inline'>
|
259
|
+
<p>Returns the value of attribute title.</p>
|
260
|
+
</div></span>
|
261
|
+
|
262
|
+
</li>
|
263
|
+
|
264
|
+
|
265
|
+
<li class="public ">
|
266
|
+
<span class="summary_signature">
|
267
|
+
|
268
|
+
<a href="#vct-instance_method" title="#vct (instance method)">#<strong>vct</strong> ⇒ Object </a>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
</span>
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<span class="note title readonly">readonly</span>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<span class="summary_desc"><div class='inline'>
|
288
|
+
<p>Returns the value of attribute vct.</p>
|
289
|
+
</div></span>
|
290
|
+
|
291
|
+
</li>
|
292
|
+
|
293
|
+
|
294
|
+
</ul>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
<h2>
|
301
|
+
Instance Method Summary
|
302
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
303
|
+
</h2>
|
304
|
+
|
305
|
+
<ul class="summary">
|
306
|
+
|
307
|
+
<li class="public ">
|
308
|
+
<span class="summary_signature">
|
309
|
+
|
310
|
+
<a href="#%3C%3D%3E-instance_method" title="#<=> (instance method)">#<strong><=></strong>(other) ⇒ Object </a>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
</span>
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
<span class="summary_desc"><div class='inline'>
|
325
|
+
<p>operadores de <,<=,>,>=.</p>
|
326
|
+
</div></span>
|
327
|
+
|
328
|
+
</li>
|
329
|
+
|
330
|
+
|
331
|
+
<li class="public ">
|
332
|
+
<span class="summary_signature">
|
333
|
+
|
334
|
+
<a href="#%3D%3D-instance_method" title="#== (instance method)">#<strong>==</strong>(other) ⇒ Object </a>
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
</span>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
<span class="summary_desc"><div class='inline'>
|
349
|
+
<p>operador de ==: compara cada variables de instancia de la clase.</p>
|
350
|
+
</div></span>
|
351
|
+
|
352
|
+
</li>
|
353
|
+
|
354
|
+
|
355
|
+
<li class="public ">
|
356
|
+
<span class="summary_signature">
|
357
|
+
|
358
|
+
<a href="#daily_percentage-instance_method" title="#daily_percentage (instance method)">#<strong>daily_percentage</strong> ⇒ Object </a>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
</span>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
<span class="summary_desc"><div class='inline'>
|
373
|
+
<p>metodo que devuelve el porcentaje que supone del dia entero.</p>
|
374
|
+
</div></span>
|
375
|
+
|
376
|
+
</li>
|
377
|
+
|
378
|
+
|
379
|
+
<li class="public ">
|
380
|
+
<span class="summary_signature">
|
381
|
+
|
382
|
+
<a href="#gras-instance_method" title="#gras (instance method)">#<strong>gras</strong> ⇒ Object </a>
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
</span>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
<span class="summary_desc"><div class='inline'>
|
397
|
+
<p>metodo que devuelve el porcentaje de grasas.</p>
|
398
|
+
</div></span>
|
399
|
+
|
400
|
+
</li>
|
401
|
+
|
402
|
+
|
403
|
+
<li class="public ">
|
404
|
+
<span class="summary_signature">
|
405
|
+
|
406
|
+
<a href="#group_plates-instance_method" title="#group_plates (instance method)">#<strong>group_plates</strong> ⇒ Object </a>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
</span>
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
<span class="summary_desc"><div class='inline'>
|
421
|
+
<p>metodo que devuelve el nombre del conjunto de platos.</p>
|
422
|
+
</div></span>
|
423
|
+
|
424
|
+
</li>
|
425
|
+
|
426
|
+
|
427
|
+
<li class="public ">
|
428
|
+
<span class="summary_signature">
|
429
|
+
|
430
|
+
<a href="#hid_car-instance_method" title="#hid_car (instance method)">#<strong>hid_car</strong> ⇒ Object </a>
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
</span>
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
<span class="summary_desc"><div class='inline'>
|
445
|
+
<p>metodo que devuelve el porcentaje de hodratos de carbono.</p>
|
446
|
+
</div></span>
|
447
|
+
|
448
|
+
</li>
|
449
|
+
|
450
|
+
|
451
|
+
<li class="public ">
|
452
|
+
<span class="summary_signature">
|
453
|
+
|
454
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(title, percentage, con_plato, vct, data) ⇒ Diet </a>
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
</span>
|
459
|
+
|
460
|
+
|
461
|
+
<span class="note title constructor">constructor</span>
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
<span class="summary_desc"><div class='inline'>
|
471
|
+
<p>inicializamos la clase con un titulo, un porcentaje, un conjunto de platos,
|
472
|
+
un valor calorico y unos valores de proteinas, grasas…</p>
|
473
|
+
</div></span>
|
474
|
+
|
475
|
+
</li>
|
476
|
+
|
477
|
+
|
478
|
+
<li class="public ">
|
479
|
+
<span class="summary_signature">
|
480
|
+
|
481
|
+
<a href="#menu_title-instance_method" title="#menu_title (instance method)">#<strong>menu_title</strong> ⇒ Object </a>
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
</span>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
<span class="summary_desc"><div class='inline'>
|
496
|
+
<p>metodo que devuelve el titulo de la dieta.</p>
|
497
|
+
</div></span>
|
498
|
+
|
499
|
+
</li>
|
500
|
+
|
501
|
+
|
502
|
+
<li class="public ">
|
503
|
+
<span class="summary_signature">
|
504
|
+
|
505
|
+
<a href="#obtain_plate-instance_method" title="#obtain_plate (instance method)">#<strong>obtain_plate</strong> ⇒ Object </a>
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
</span>
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
<span class="summary_desc"><div class='inline'>
|
520
|
+
<p>metodo que devuelve el nombre del primer plato.</p>
|
521
|
+
</div></span>
|
522
|
+
|
523
|
+
</li>
|
524
|
+
|
525
|
+
|
526
|
+
<li class="public ">
|
527
|
+
<span class="summary_signature">
|
528
|
+
|
529
|
+
<a href="#one_plate-instance_method" title="#one_plate (instance method)">#<strong>one_plate</strong>(num) ⇒ Object </a>
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
</span>
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
<span class="summary_desc"><div class='inline'>
|
544
|
+
<p>metodo que devuelve el nombre de uno de los platos.</p>
|
545
|
+
</div></span>
|
546
|
+
|
547
|
+
</li>
|
548
|
+
|
549
|
+
|
550
|
+
<li class="public ">
|
551
|
+
<span class="summary_signature">
|
552
|
+
|
553
|
+
<a href="#prot-instance_method" title="#prot (instance method)">#<strong>prot</strong> ⇒ Object </a>
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
</span>
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
<span class="summary_desc"><div class='inline'>
|
568
|
+
<p>metodo que devuelve el porcentaje de proteinas.</p>
|
569
|
+
</div></span>
|
570
|
+
|
571
|
+
</li>
|
572
|
+
|
573
|
+
|
574
|
+
<li class="public ">
|
575
|
+
<span class="summary_signature">
|
576
|
+
|
577
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ Object </a>
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
</span>
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
<span class="summary_desc"><div class='inline'>
|
592
|
+
<p>metodo que imprime formateada la dieta completa.</p>
|
593
|
+
</div></span>
|
594
|
+
|
595
|
+
</li>
|
596
|
+
|
597
|
+
|
598
|
+
<li class="public ">
|
599
|
+
<span class="summary_signature">
|
600
|
+
|
601
|
+
<a href="#valor-instance_method" title="#valor (instance method)">#<strong>valor</strong> ⇒ Object </a>
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
</span>
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
<span class="summary_desc"><div class='inline'>
|
616
|
+
<p>metodo que devuelve el valor calorico.</p>
|
617
|
+
</div></span>
|
618
|
+
|
619
|
+
</li>
|
620
|
+
|
621
|
+
|
622
|
+
</ul>
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
<div id="constructor_details" class="method_details_list">
|
627
|
+
<h2>Constructor Details</h2>
|
628
|
+
|
629
|
+
<div class="method_details first">
|
630
|
+
<h3 class="signature first" id="initialize-instance_method">
|
631
|
+
|
632
|
+
#<strong>initialize</strong>(title, percentage, con_plato, vct, data) ⇒ <tt><span class='object_link'><a href="" title="Diet (class)">Diet</a></span></tt>
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
</h3><div class="docstring">
|
639
|
+
<div class="discussion">
|
640
|
+
|
641
|
+
<p>inicializamos la clase con un titulo, un porcentaje, un conjunto de platos,
|
642
|
+
un valor calorico y unos valores de proteinas, grasas…</p>
|
643
|
+
|
644
|
+
|
645
|
+
</div>
|
646
|
+
</div>
|
647
|
+
<div class="tags">
|
648
|
+
|
649
|
+
|
650
|
+
</div><table class="source_code">
|
651
|
+
<tr>
|
652
|
+
<td>
|
653
|
+
<pre class="lines">
|
654
|
+
|
655
|
+
|
656
|
+
11
|
657
|
+
12
|
658
|
+
13
|
659
|
+
14
|
660
|
+
15
|
661
|
+
16
|
662
|
+
17
|
663
|
+
18</pre>
|
664
|
+
</td>
|
665
|
+
<td>
|
666
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 11</span>
|
667
|
+
|
668
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_title'>title</span><span class='comma'>,</span><span class='id identifier rubyid_percentage'>percentage</span><span class='comma'>,</span><span class='id identifier rubyid_con_plato'>con_plato</span><span class='comma'>,</span><span class='id identifier rubyid_vct'>vct</span><span class='comma'>,</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
669
|
+
<span class='ivar'>@title</span><span class='op'>=</span><span class='id identifier rubyid_title'>title</span>
|
670
|
+
<span class='ivar'>@percentage</span><span class='op'>=</span><span class='id identifier rubyid_percentage'>percentage</span>
|
671
|
+
<span class='ivar'>@con_plato</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='op'>+</span> <span class='id identifier rubyid_con_plato'>con_plato</span>
|
672
|
+
<span class='ivar'>@des_plato</span> <span class='op'>=</span> <span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
673
|
+
<span class='ivar'>@vct</span> <span class='op'>=</span> <span class='id identifier rubyid_vct'>vct</span>
|
674
|
+
<span class='ivar'>@data</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='op'>+</span> <span class='id identifier rubyid_data'>data</span>
|
675
|
+
<span class='kw'>end</span></pre>
|
676
|
+
</td>
|
677
|
+
</tr>
|
678
|
+
</table>
|
679
|
+
</div>
|
680
|
+
|
681
|
+
</div>
|
682
|
+
|
683
|
+
<div id="instance_attr_details" class="attr_details">
|
684
|
+
<h2>Instance Attribute Details</h2>
|
685
|
+
|
686
|
+
|
687
|
+
<span id=""></span>
|
688
|
+
<div class="method_details first">
|
689
|
+
<h3 class="signature first" id="con_plato-instance_method">
|
690
|
+
|
691
|
+
#<strong>con_plato</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
</h3><div class="docstring">
|
698
|
+
<div class="discussion">
|
699
|
+
|
700
|
+
<p>Returns the value of attribute con_plato</p>
|
701
|
+
|
702
|
+
|
703
|
+
</div>
|
704
|
+
</div>
|
705
|
+
<div class="tags">
|
706
|
+
|
707
|
+
|
708
|
+
</div><table class="source_code">
|
709
|
+
<tr>
|
710
|
+
<td>
|
711
|
+
<pre class="lines">
|
712
|
+
|
713
|
+
|
714
|
+
7
|
715
|
+
8
|
716
|
+
9</pre>
|
717
|
+
</td>
|
718
|
+
<td>
|
719
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 7</span>
|
720
|
+
|
721
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_con_plato'>con_plato</span>
|
722
|
+
<span class='ivar'>@con_plato</span>
|
723
|
+
<span class='kw'>end</span></pre>
|
724
|
+
</td>
|
725
|
+
</tr>
|
726
|
+
</table>
|
727
|
+
</div>
|
728
|
+
|
729
|
+
|
730
|
+
<span id=""></span>
|
731
|
+
<div class="method_details ">
|
732
|
+
<h3 class="signature " id="data-instance_method">
|
733
|
+
|
734
|
+
#<strong>data</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
</h3><div class="docstring">
|
741
|
+
<div class="discussion">
|
742
|
+
|
743
|
+
<p>Returns the value of attribute data</p>
|
744
|
+
|
745
|
+
|
746
|
+
</div>
|
747
|
+
</div>
|
748
|
+
<div class="tags">
|
749
|
+
|
750
|
+
|
751
|
+
</div><table class="source_code">
|
752
|
+
<tr>
|
753
|
+
<td>
|
754
|
+
<pre class="lines">
|
755
|
+
|
756
|
+
|
757
|
+
8
|
758
|
+
9
|
759
|
+
10</pre>
|
760
|
+
</td>
|
761
|
+
<td>
|
762
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 8</span>
|
763
|
+
|
764
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span>
|
765
|
+
<span class='ivar'>@data</span>
|
766
|
+
<span class='kw'>end</span></pre>
|
767
|
+
</td>
|
768
|
+
</tr>
|
769
|
+
</table>
|
770
|
+
</div>
|
771
|
+
|
772
|
+
|
773
|
+
<span id=""></span>
|
774
|
+
<div class="method_details ">
|
775
|
+
<h3 class="signature " id="des_plato-instance_method">
|
776
|
+
|
777
|
+
#<strong>des_plato</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
</h3><div class="docstring">
|
784
|
+
<div class="discussion">
|
785
|
+
|
786
|
+
<p>Returns the value of attribute des_plato</p>
|
787
|
+
|
788
|
+
|
789
|
+
</div>
|
790
|
+
</div>
|
791
|
+
<div class="tags">
|
792
|
+
|
793
|
+
|
794
|
+
</div><table class="source_code">
|
795
|
+
<tr>
|
796
|
+
<td>
|
797
|
+
<pre class="lines">
|
798
|
+
|
799
|
+
|
800
|
+
6
|
801
|
+
7
|
802
|
+
8</pre>
|
803
|
+
</td>
|
804
|
+
<td>
|
805
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 6</span>
|
806
|
+
|
807
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_des_plato'>des_plato</span>
|
808
|
+
<span class='ivar'>@des_plato</span>
|
809
|
+
<span class='kw'>end</span></pre>
|
810
|
+
</td>
|
811
|
+
</tr>
|
812
|
+
</table>
|
813
|
+
</div>
|
814
|
+
|
815
|
+
|
816
|
+
<span id=""></span>
|
817
|
+
<div class="method_details ">
|
818
|
+
<h3 class="signature " id="percentage-instance_method">
|
819
|
+
|
820
|
+
#<strong>percentage</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
</h3><div class="docstring">
|
827
|
+
<div class="discussion">
|
828
|
+
|
829
|
+
<p>Returns the value of attribute percentage</p>
|
830
|
+
|
831
|
+
|
832
|
+
</div>
|
833
|
+
</div>
|
834
|
+
<div class="tags">
|
835
|
+
|
836
|
+
|
837
|
+
</div><table class="source_code">
|
838
|
+
<tr>
|
839
|
+
<td>
|
840
|
+
<pre class="lines">
|
841
|
+
|
842
|
+
|
843
|
+
5
|
844
|
+
6
|
845
|
+
7</pre>
|
846
|
+
</td>
|
847
|
+
<td>
|
848
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 5</span>
|
849
|
+
|
850
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_percentage'>percentage</span>
|
851
|
+
<span class='ivar'>@percentage</span>
|
852
|
+
<span class='kw'>end</span></pre>
|
853
|
+
</td>
|
854
|
+
</tr>
|
855
|
+
</table>
|
856
|
+
</div>
|
857
|
+
|
858
|
+
|
859
|
+
<span id=""></span>
|
860
|
+
<div class="method_details ">
|
861
|
+
<h3 class="signature " id="title-instance_method">
|
862
|
+
|
863
|
+
#<strong>title</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
</h3><div class="docstring">
|
870
|
+
<div class="discussion">
|
871
|
+
|
872
|
+
<p>Returns the value of attribute title</p>
|
873
|
+
|
874
|
+
|
875
|
+
</div>
|
876
|
+
</div>
|
877
|
+
<div class="tags">
|
878
|
+
|
879
|
+
|
880
|
+
</div><table class="source_code">
|
881
|
+
<tr>
|
882
|
+
<td>
|
883
|
+
<pre class="lines">
|
884
|
+
|
885
|
+
|
886
|
+
4
|
887
|
+
5
|
888
|
+
6</pre>
|
889
|
+
</td>
|
890
|
+
<td>
|
891
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 4</span>
|
892
|
+
|
893
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_title'>title</span>
|
894
|
+
<span class='ivar'>@title</span>
|
895
|
+
<span class='kw'>end</span></pre>
|
896
|
+
</td>
|
897
|
+
</tr>
|
898
|
+
</table>
|
899
|
+
</div>
|
900
|
+
|
901
|
+
|
902
|
+
<span id=""></span>
|
903
|
+
<div class="method_details ">
|
904
|
+
<h3 class="signature " id="vct-instance_method">
|
905
|
+
|
906
|
+
#<strong>vct</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
|
912
|
+
</h3><div class="docstring">
|
913
|
+
<div class="discussion">
|
914
|
+
|
915
|
+
<p>Returns the value of attribute vct</p>
|
916
|
+
|
917
|
+
|
918
|
+
</div>
|
919
|
+
</div>
|
920
|
+
<div class="tags">
|
921
|
+
|
922
|
+
|
923
|
+
</div><table class="source_code">
|
924
|
+
<tr>
|
925
|
+
<td>
|
926
|
+
<pre class="lines">
|
927
|
+
|
928
|
+
|
929
|
+
9
|
930
|
+
10
|
931
|
+
11</pre>
|
932
|
+
</td>
|
933
|
+
<td>
|
934
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 9</span>
|
935
|
+
|
936
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_vct'>vct</span>
|
937
|
+
<span class='ivar'>@vct</span>
|
938
|
+
<span class='kw'>end</span></pre>
|
939
|
+
</td>
|
940
|
+
</tr>
|
941
|
+
</table>
|
942
|
+
</div>
|
943
|
+
|
944
|
+
</div>
|
945
|
+
|
946
|
+
|
947
|
+
<div id="instance_method_details" class="method_details_list">
|
948
|
+
<h2>Instance Method Details</h2>
|
949
|
+
|
950
|
+
|
951
|
+
<div class="method_details first">
|
952
|
+
<h3 class="signature first" id="<=>-instance_method">
|
953
|
+
|
954
|
+
#<strong><=></strong>(other) ⇒ <tt>Object</tt>
|
955
|
+
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
</h3><div class="docstring">
|
961
|
+
<div class="discussion">
|
962
|
+
|
963
|
+
<p>operadores de <,<=,>,>=</p>
|
964
|
+
|
965
|
+
|
966
|
+
</div>
|
967
|
+
</div>
|
968
|
+
<div class="tags">
|
969
|
+
|
970
|
+
|
971
|
+
</div><table class="source_code">
|
972
|
+
<tr>
|
973
|
+
<td>
|
974
|
+
<pre class="lines">
|
975
|
+
|
976
|
+
|
977
|
+
20
|
978
|
+
21
|
979
|
+
22</pre>
|
980
|
+
</td>
|
981
|
+
<td>
|
982
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 20</span>
|
983
|
+
|
984
|
+
<span class='kw'>def</span> <span class='op'><=></span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
985
|
+
<span class='id identifier rubyid_vct'>vct</span><span class='op'><=></span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_vct'>vct</span>
|
986
|
+
<span class='kw'>end</span></pre>
|
987
|
+
</td>
|
988
|
+
</tr>
|
989
|
+
</table>
|
990
|
+
</div>
|
991
|
+
|
992
|
+
<div class="method_details ">
|
993
|
+
<h3 class="signature " id="==-instance_method">
|
994
|
+
|
995
|
+
#<strong>==</strong>(other) ⇒ <tt>Object</tt>
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
|
1001
|
+
</h3><div class="docstring">
|
1002
|
+
<div class="discussion">
|
1003
|
+
|
1004
|
+
<p>operador de ==: compara cada variables de instancia de la clase</p>
|
1005
|
+
|
1006
|
+
|
1007
|
+
</div>
|
1008
|
+
</div>
|
1009
|
+
<div class="tags">
|
1010
|
+
|
1011
|
+
|
1012
|
+
</div><table class="source_code">
|
1013
|
+
<tr>
|
1014
|
+
<td>
|
1015
|
+
<pre class="lines">
|
1016
|
+
|
1017
|
+
|
1018
|
+
24
|
1019
|
+
25
|
1020
|
+
26
|
1021
|
+
27
|
1022
|
+
28
|
1023
|
+
29
|
1024
|
+
30
|
1025
|
+
31</pre>
|
1026
|
+
</td>
|
1027
|
+
<td>
|
1028
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 24</span>
|
1029
|
+
|
1030
|
+
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
1031
|
+
<span class='id identifier rubyid_title'>title</span><span class='op'>==</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_title'>title</span>
|
1032
|
+
<span class='id identifier rubyid_percentage'>percentage</span><span class='op'>==</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_percentage'>percentage</span>
|
1033
|
+
<span class='id identifier rubyid_des_plato'>des_plato</span><span class='op'>==</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_des_plato'>des_plato</span>
|
1034
|
+
<span class='id identifier rubyid_con_plato'>con_plato</span><span class='op'>==</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_con_plato'>con_plato</span>
|
1035
|
+
<span class='id identifier rubyid_data'>data</span><span class='op'>==</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span>
|
1036
|
+
<span class='id identifier rubyid_vct'>vct</span><span class='op'>==</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_vct'>vct</span>
|
1037
|
+
<span class='kw'>end</span></pre>
|
1038
|
+
</td>
|
1039
|
+
</tr>
|
1040
|
+
</table>
|
1041
|
+
</div>
|
1042
|
+
|
1043
|
+
<div class="method_details ">
|
1044
|
+
<h3 class="signature " id="daily_percentage-instance_method">
|
1045
|
+
|
1046
|
+
#<strong>daily_percentage</strong> ⇒ <tt>Object</tt>
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
</h3><div class="docstring">
|
1053
|
+
<div class="discussion">
|
1054
|
+
|
1055
|
+
<p>metodo que devuelve el porcentaje que supone del dia entero</p>
|
1056
|
+
|
1057
|
+
|
1058
|
+
</div>
|
1059
|
+
</div>
|
1060
|
+
<div class="tags">
|
1061
|
+
|
1062
|
+
|
1063
|
+
</div><table class="source_code">
|
1064
|
+
<tr>
|
1065
|
+
<td>
|
1066
|
+
<pre class="lines">
|
1067
|
+
|
1068
|
+
|
1069
|
+
41
|
1070
|
+
42
|
1071
|
+
43</pre>
|
1072
|
+
</td>
|
1073
|
+
<td>
|
1074
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 41</span>
|
1075
|
+
|
1076
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_daily_percentage'>daily_percentage</span>
|
1077
|
+
<span class='id identifier rubyid_percentage'>percentage</span>
|
1078
|
+
<span class='kw'>end</span></pre>
|
1079
|
+
</td>
|
1080
|
+
</tr>
|
1081
|
+
</table>
|
1082
|
+
</div>
|
1083
|
+
|
1084
|
+
<div class="method_details ">
|
1085
|
+
<h3 class="signature " id="gras-instance_method">
|
1086
|
+
|
1087
|
+
#<strong>gras</strong> ⇒ <tt>Object</tt>
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
</h3><div class="docstring">
|
1094
|
+
<div class="discussion">
|
1095
|
+
|
1096
|
+
<p>metodo que devuelve el porcentaje de grasas</p>
|
1097
|
+
|
1098
|
+
|
1099
|
+
</div>
|
1100
|
+
</div>
|
1101
|
+
<div class="tags">
|
1102
|
+
|
1103
|
+
|
1104
|
+
</div><table class="source_code">
|
1105
|
+
<tr>
|
1106
|
+
<td>
|
1107
|
+
<pre class="lines">
|
1108
|
+
|
1109
|
+
|
1110
|
+
69
|
1111
|
+
70
|
1112
|
+
71</pre>
|
1113
|
+
</td>
|
1114
|
+
<td>
|
1115
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 69</span>
|
1116
|
+
|
1117
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_gras'>gras</span>
|
1118
|
+
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
|
1119
|
+
<span class='kw'>end</span></pre>
|
1120
|
+
</td>
|
1121
|
+
</tr>
|
1122
|
+
</table>
|
1123
|
+
</div>
|
1124
|
+
|
1125
|
+
<div class="method_details ">
|
1126
|
+
<h3 class="signature " id="group_plates-instance_method">
|
1127
|
+
|
1128
|
+
#<strong>group_plates</strong> ⇒ <tt>Object</tt>
|
1129
|
+
|
1130
|
+
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
</h3><div class="docstring">
|
1135
|
+
<div class="discussion">
|
1136
|
+
|
1137
|
+
<p>metodo que devuelve el nombre del conjunto de platos</p>
|
1138
|
+
|
1139
|
+
|
1140
|
+
</div>
|
1141
|
+
</div>
|
1142
|
+
<div class="tags">
|
1143
|
+
|
1144
|
+
|
1145
|
+
</div><table class="source_code">
|
1146
|
+
<tr>
|
1147
|
+
<td>
|
1148
|
+
<pre class="lines">
|
1149
|
+
|
1150
|
+
|
1151
|
+
50
|
1152
|
+
51
|
1153
|
+
52
|
1154
|
+
53
|
1155
|
+
54
|
1156
|
+
55
|
1157
|
+
56
|
1158
|
+
57
|
1159
|
+
58
|
1160
|
+
59</pre>
|
1161
|
+
</td>
|
1162
|
+
<td>
|
1163
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 50</span>
|
1164
|
+
|
1165
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_group_plates'>group_plates</span>
|
1166
|
+
<span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1167
|
+
<span class='gvar'>$i</span><span class='op'>=</span><span class='int'>1</span>
|
1168
|
+
<span class='kw'>while</span> <span class='gvar'>$i</span> <span class='op'><</span> <span class='id identifier rubyid_con_plato'>con_plato</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='kw'>do</span>
|
1169
|
+
<span class='id identifier rubyid_s'>s</span><span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>, </span><span class='tstring_end'>"</span></span>
|
1170
|
+
<span class='id identifier rubyid_s'>s</span><span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='gvar'>$i</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1171
|
+
<span class='gvar'>$i</span><span class='op'>+=</span><span class='int'>1</span>
|
1172
|
+
<span class='kw'>end</span>
|
1173
|
+
<span class='id identifier rubyid_s'>s</span>
|
1174
|
+
<span class='kw'>end</span></pre>
|
1175
|
+
</td>
|
1176
|
+
</tr>
|
1177
|
+
</table>
|
1178
|
+
</div>
|
1179
|
+
|
1180
|
+
<div class="method_details ">
|
1181
|
+
<h3 class="signature " id="hid_car-instance_method">
|
1182
|
+
|
1183
|
+
#<strong>hid_car</strong> ⇒ <tt>Object</tt>
|
1184
|
+
|
1185
|
+
|
1186
|
+
|
1187
|
+
|
1188
|
+
|
1189
|
+
</h3><div class="docstring">
|
1190
|
+
<div class="discussion">
|
1191
|
+
|
1192
|
+
<p>metodo que devuelve el porcentaje de hodratos de carbono</p>
|
1193
|
+
|
1194
|
+
|
1195
|
+
</div>
|
1196
|
+
</div>
|
1197
|
+
<div class="tags">
|
1198
|
+
|
1199
|
+
|
1200
|
+
</div><table class="source_code">
|
1201
|
+
<tr>
|
1202
|
+
<td>
|
1203
|
+
<pre class="lines">
|
1204
|
+
|
1205
|
+
|
1206
|
+
73
|
1207
|
+
74
|
1208
|
+
75</pre>
|
1209
|
+
</td>
|
1210
|
+
<td>
|
1211
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 73</span>
|
1212
|
+
|
1213
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_hid_car'>hid_car</span>
|
1214
|
+
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
|
1215
|
+
<span class='kw'>end</span></pre>
|
1216
|
+
</td>
|
1217
|
+
</tr>
|
1218
|
+
</table>
|
1219
|
+
</div>
|
1220
|
+
|
1221
|
+
<div class="method_details ">
|
1222
|
+
<h3 class="signature " id="menu_title-instance_method">
|
1223
|
+
|
1224
|
+
#<strong>menu_title</strong> ⇒ <tt>Object</tt>
|
1225
|
+
|
1226
|
+
|
1227
|
+
|
1228
|
+
|
1229
|
+
|
1230
|
+
</h3><div class="docstring">
|
1231
|
+
<div class="discussion">
|
1232
|
+
|
1233
|
+
<p>metodo que devuelve el titulo de la dieta</p>
|
1234
|
+
|
1235
|
+
|
1236
|
+
</div>
|
1237
|
+
</div>
|
1238
|
+
<div class="tags">
|
1239
|
+
|
1240
|
+
|
1241
|
+
</div><table class="source_code">
|
1242
|
+
<tr>
|
1243
|
+
<td>
|
1244
|
+
<pre class="lines">
|
1245
|
+
|
1246
|
+
|
1247
|
+
37
|
1248
|
+
38
|
1249
|
+
39</pre>
|
1250
|
+
</td>
|
1251
|
+
<td>
|
1252
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 37</span>
|
1253
|
+
|
1254
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_menu_title'>menu_title</span>
|
1255
|
+
<span class='id identifier rubyid_title'>title</span>
|
1256
|
+
<span class='kw'>end</span></pre>
|
1257
|
+
</td>
|
1258
|
+
</tr>
|
1259
|
+
</table>
|
1260
|
+
</div>
|
1261
|
+
|
1262
|
+
<div class="method_details ">
|
1263
|
+
<h3 class="signature " id="obtain_plate-instance_method">
|
1264
|
+
|
1265
|
+
#<strong>obtain_plate</strong> ⇒ <tt>Object</tt>
|
1266
|
+
|
1267
|
+
|
1268
|
+
|
1269
|
+
|
1270
|
+
|
1271
|
+
</h3><div class="docstring">
|
1272
|
+
<div class="discussion">
|
1273
|
+
|
1274
|
+
<p>metodo que devuelve el nombre del primer plato</p>
|
1275
|
+
|
1276
|
+
|
1277
|
+
</div>
|
1278
|
+
</div>
|
1279
|
+
<div class="tags">
|
1280
|
+
|
1281
|
+
|
1282
|
+
</div><table class="source_code">
|
1283
|
+
<tr>
|
1284
|
+
<td>
|
1285
|
+
<pre class="lines">
|
1286
|
+
|
1287
|
+
|
1288
|
+
33
|
1289
|
+
34
|
1290
|
+
35</pre>
|
1291
|
+
</td>
|
1292
|
+
<td>
|
1293
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 33</span>
|
1294
|
+
|
1295
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_obtain_plate'>obtain_plate</span>
|
1296
|
+
<span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
1297
|
+
<span class='kw'>end</span></pre>
|
1298
|
+
</td>
|
1299
|
+
</tr>
|
1300
|
+
</table>
|
1301
|
+
</div>
|
1302
|
+
|
1303
|
+
<div class="method_details ">
|
1304
|
+
<h3 class="signature " id="one_plate-instance_method">
|
1305
|
+
|
1306
|
+
#<strong>one_plate</strong>(num) ⇒ <tt>Object</tt>
|
1307
|
+
|
1308
|
+
|
1309
|
+
|
1310
|
+
|
1311
|
+
|
1312
|
+
</h3><div class="docstring">
|
1313
|
+
<div class="discussion">
|
1314
|
+
|
1315
|
+
<p>metodo que devuelve el nombre de uno de los platos</p>
|
1316
|
+
|
1317
|
+
|
1318
|
+
</div>
|
1319
|
+
</div>
|
1320
|
+
<div class="tags">
|
1321
|
+
|
1322
|
+
|
1323
|
+
</div><table class="source_code">
|
1324
|
+
<tr>
|
1325
|
+
<td>
|
1326
|
+
<pre class="lines">
|
1327
|
+
|
1328
|
+
|
1329
|
+
45
|
1330
|
+
46
|
1331
|
+
47
|
1332
|
+
48</pre>
|
1333
|
+
</td>
|
1334
|
+
<td>
|
1335
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 45</span>
|
1336
|
+
|
1337
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_one_plate'>one_plate</span> <span class='lparen'>(</span><span class='id identifier rubyid_num'>num</span><span class='rparen'>)</span>
|
1338
|
+
<span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='id identifier rubyid_num'>num</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
1339
|
+
|
1340
|
+
<span class='kw'>end</span></pre>
|
1341
|
+
</td>
|
1342
|
+
</tr>
|
1343
|
+
</table>
|
1344
|
+
</div>
|
1345
|
+
|
1346
|
+
<div class="method_details ">
|
1347
|
+
<h3 class="signature " id="prot-instance_method">
|
1348
|
+
|
1349
|
+
#<strong>prot</strong> ⇒ <tt>Object</tt>
|
1350
|
+
|
1351
|
+
|
1352
|
+
|
1353
|
+
|
1354
|
+
|
1355
|
+
</h3><div class="docstring">
|
1356
|
+
<div class="discussion">
|
1357
|
+
|
1358
|
+
<p>metodo que devuelve el porcentaje de proteinas</p>
|
1359
|
+
|
1360
|
+
|
1361
|
+
</div>
|
1362
|
+
</div>
|
1363
|
+
<div class="tags">
|
1364
|
+
|
1365
|
+
|
1366
|
+
</div><table class="source_code">
|
1367
|
+
<tr>
|
1368
|
+
<td>
|
1369
|
+
<pre class="lines">
|
1370
|
+
|
1371
|
+
|
1372
|
+
65
|
1373
|
+
66
|
1374
|
+
67</pre>
|
1375
|
+
</td>
|
1376
|
+
<td>
|
1377
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 65</span>
|
1378
|
+
|
1379
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prot'>prot</span>
|
1380
|
+
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
1381
|
+
<span class='kw'>end</span></pre>
|
1382
|
+
</td>
|
1383
|
+
</tr>
|
1384
|
+
</table>
|
1385
|
+
</div>
|
1386
|
+
|
1387
|
+
<div class="method_details ">
|
1388
|
+
<h3 class="signature " id="to_s-instance_method">
|
1389
|
+
|
1390
|
+
#<strong>to_s</strong> ⇒ <tt>Object</tt>
|
1391
|
+
|
1392
|
+
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
</h3><div class="docstring">
|
1397
|
+
<div class="discussion">
|
1398
|
+
|
1399
|
+
<p>metodo que imprime formateada la dieta completa</p>
|
1400
|
+
|
1401
|
+
|
1402
|
+
</div>
|
1403
|
+
</div>
|
1404
|
+
<div class="tags">
|
1405
|
+
|
1406
|
+
|
1407
|
+
</div><table class="source_code">
|
1408
|
+
<tr>
|
1409
|
+
<td>
|
1410
|
+
<pre class="lines">
|
1411
|
+
|
1412
|
+
|
1413
|
+
77
|
1414
|
+
78
|
1415
|
+
79
|
1416
|
+
80
|
1417
|
+
81
|
1418
|
+
82
|
1419
|
+
83
|
1420
|
+
84
|
1421
|
+
85
|
1422
|
+
86</pre>
|
1423
|
+
</td>
|
1424
|
+
<td>
|
1425
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 77</span>
|
1426
|
+
|
1427
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
1428
|
+
<span class='id identifier rubyid_s'>s</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_title'>title</span><span class='embexpr_end'>}</span><span class='tstring_content'> (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_percentage'>percentage</span><span class='embexpr_end'>}</span><span class='tstring_content'>%)\n</span><span class='tstring_end'>"</span></span>
|
1429
|
+
<span class='gvar'>$i</span><span class='op'>=</span><span class='int'>0</span>
|
1430
|
+
<span class='kw'>while</span> <span class='gvar'>$i</span><span class='op'><</span><span class='id identifier rubyid_con_plato'>con_plato</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='kw'>do</span>
|
1431
|
+
<span class='id identifier rubyid_s'>s</span><span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='gvar'>$i</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='gvar'>$i</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_con_plato'>con_plato</span><span class='lbracket'>[</span><span class='gvar'>$i</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> gr\n</span><span class='tstring_end'>"</span></span>
|
1432
|
+
<span class='gvar'>$i</span><span class='op'>+=</span><span class='int'>1</span>
|
1433
|
+
<span class='kw'>end</span>
|
1434
|
+
<span class='id identifier rubyid_s'>s</span><span class='op'>+=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>V.C.T | % </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vct'>vct</span><span class='embexpr_end'>}</span><span class='tstring_content'> kcal | </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>% - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1435
|
+
|
1436
|
+
<span class='kw'>end</span></pre>
|
1437
|
+
</td>
|
1438
|
+
</tr>
|
1439
|
+
</table>
|
1440
|
+
</div>
|
1441
|
+
|
1442
|
+
<div class="method_details ">
|
1443
|
+
<h3 class="signature " id="valor-instance_method">
|
1444
|
+
|
1445
|
+
#<strong>valor</strong> ⇒ <tt>Object</tt>
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
|
1450
|
+
|
1451
|
+
</h3><div class="docstring">
|
1452
|
+
<div class="discussion">
|
1453
|
+
|
1454
|
+
<p>metodo que devuelve el valor calorico</p>
|
1455
|
+
|
1456
|
+
|
1457
|
+
</div>
|
1458
|
+
</div>
|
1459
|
+
<div class="tags">
|
1460
|
+
|
1461
|
+
|
1462
|
+
</div><table class="source_code">
|
1463
|
+
<tr>
|
1464
|
+
<td>
|
1465
|
+
<pre class="lines">
|
1466
|
+
|
1467
|
+
|
1468
|
+
61
|
1469
|
+
62
|
1470
|
+
63</pre>
|
1471
|
+
</td>
|
1472
|
+
<td>
|
1473
|
+
<pre class="code"><span class="info file"># File 'lib/practica6/practica6.rb', line 61</span>
|
1474
|
+
|
1475
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_valor'>valor</span>
|
1476
|
+
<span class='id identifier rubyid_vct'>vct</span>
|
1477
|
+
<span class='kw'>end</span></pre>
|
1478
|
+
</td>
|
1479
|
+
</tr>
|
1480
|
+
</table>
|
1481
|
+
</div>
|
1482
|
+
|
1483
|
+
</div>
|
1484
|
+
|
1485
|
+
</div>
|
1486
|
+
|
1487
|
+
<div id="footer">
|
1488
|
+
Generated on Tue Nov 22 19:30:50 2016 by
|
1489
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1490
|
+
0.9.5 (ruby-2.3.0).
|
1491
|
+
</div>
|
1492
|
+
|
1493
|
+
</div>
|
1494
|
+
</body>
|
1495
|
+
</html>
|