dieta_alu0100885941 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/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dieta.gemspec +39 -0
- data/lib/dieta/dl_list.rb +67 -0
- data/lib/dieta/linked_list.rb +30 -0
- data/lib/dieta/menu.rb +45 -0
- data/lib/dieta/menu_alimentos.rb +15 -0
- data/lib/dieta/menu_edades.rb +14 -0
- data/lib/dieta/version.rb +3 -0
- data/lib/dieta.rb +5 -0
- metadata +150 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 595644b8c5b56a701a73d83acae63d54f43ce7d1
|
4
|
+
data.tar.gz: 7468c9eff2412cf264d32b847adb288c8d5d8b2e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cdbbebdcd5bf379a05a46480b072ecbc3f5319de39b38405d6f25ea75d50b78091a1f6388700e0d81f63239c7c4ca66d52a00bd882e98e936a2bd52d4c4de74e
|
7
|
+
data.tar.gz: 93fd33d71bc4e9449fcc5881c6b83718a8344dfb404c6859e2e2f4a4d3e0b025115dad2feb0e04a89e1f7baacde5dafeeaf958dcfb924506116dd2246b3d7247
|
data/.gitignore
ADDED
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 alu0100895179@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 Jaime Madico
|
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,41 @@
|
|
1
|
+
# Dieta
|
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/dieta`. 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 'dieta'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install dieta
|
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]/dieta. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "dieta"
|
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/dieta.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'dieta/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "dieta_alu0100885941"
|
8
|
+
spec.version = Dieta::VERSION
|
9
|
+
spec.authors = ["Jaime Madico", "Sergio Morente"]
|
10
|
+
spec.email = ["alu0100895179@ull.edu.es", "alu0100885941@ull.edu.es"]
|
11
|
+
|
12
|
+
spec.summary = %q{Gema que nos permite escribir dietas}
|
13
|
+
spec.description = %q{Gema que nos permite escribir dietas, en concreto distintos objetos menú con información detallada de los alimentos, calorías, grasas,etc.}
|
14
|
+
spec.homepage = "https://github.com/ULL-ESIT-LPP-1617/tdd-menu-equipo_33"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
# "public gem pushes."
|
24
|
+
# end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
+
spec.add_development_dependency "guard"
|
37
|
+
spec.add_development_dependency "guard-rspec"
|
38
|
+
spec.add_development_dependency "guard-bundler"
|
39
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
class Dl_linked_list
|
2
|
+
|
3
|
+
attr_reader :inicio, :tail
|
4
|
+
Node = Struct.new(:value,:next,:prev)
|
5
|
+
def initialize(&block)
|
6
|
+
@inicio= nil
|
7
|
+
@tail= nil
|
8
|
+
if(block_given?)
|
9
|
+
instance_eval(&block)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
def elemento(options)
|
13
|
+
insert_inicio(options[:data])
|
14
|
+
end
|
15
|
+
def insert_final(data)
|
16
|
+
if(@inicio==nil && @tail==nil)
|
17
|
+
aux=Node.new(data,nil,nil)
|
18
|
+
@inicio= aux
|
19
|
+
@tail = @inicio
|
20
|
+
else
|
21
|
+
aux=Node.new(data,nil,@tail)
|
22
|
+
@tail[:next]=aux
|
23
|
+
@tail=aux
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
def insert_inicio(data)
|
28
|
+
if(@inicio==nil && @tail==nil)
|
29
|
+
aux=Node.new(data,nil,nil)
|
30
|
+
@inicio=aux
|
31
|
+
@tail = @inicio
|
32
|
+
else
|
33
|
+
aux=Node.new(data,nil,@inicio)
|
34
|
+
@inicio[:prev]=aux
|
35
|
+
@inicio=aux
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def extract_inicio
|
40
|
+
if(@inicio!=nil)
|
41
|
+
temp= @inicio[:value]
|
42
|
+
@inicio=@inicio[:next]
|
43
|
+
@inicio[:prev]=nil
|
44
|
+
temp
|
45
|
+
end
|
46
|
+
end
|
47
|
+
def extract_final
|
48
|
+
if(@inicio!=nil)
|
49
|
+
temp=@tail[:value]
|
50
|
+
@tail=@tail[:prev]
|
51
|
+
@tail[:next]=nil
|
52
|
+
end
|
53
|
+
end
|
54
|
+
def to_s
|
55
|
+
temp = @inicio
|
56
|
+
cont= 1
|
57
|
+
string = ""
|
58
|
+
while(temp!=nil)
|
59
|
+
string+="Valor numero #{cont}) Equivale a #{temp[:value]}\n"
|
60
|
+
temp=temp[:next]
|
61
|
+
cont+=1
|
62
|
+
end
|
63
|
+
|
64
|
+
string
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class Linked_list
|
2
|
+
|
3
|
+
attr_reader :inicio
|
4
|
+
Node = Struct.new(:value,:next)
|
5
|
+
def initialize
|
6
|
+
@inicio=Node.new(nil,nil)
|
7
|
+
end
|
8
|
+
def insert(data)
|
9
|
+
aux=Node.new(data,@inicio)
|
10
|
+
@inicio=aux
|
11
|
+
end
|
12
|
+
def extract
|
13
|
+
temp= @inicio[:value]
|
14
|
+
@inicio=@inicio[:next]
|
15
|
+
temp
|
16
|
+
end
|
17
|
+
def to_s
|
18
|
+
temp = @inicio
|
19
|
+
cont= 1
|
20
|
+
string = ""
|
21
|
+
while(temp[:next]!=nil)
|
22
|
+
string+="Valor numero #{cont}) Equivale a #{temp[:value]}\n"
|
23
|
+
temp=temp[:next]
|
24
|
+
cont+=1
|
25
|
+
end
|
26
|
+
|
27
|
+
string
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
data/lib/dieta/menu.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
class Menu
|
2
|
+
|
3
|
+
attr_reader :titulo, :porcentaje, :platos, :vct, :porcentaje_pgh
|
4
|
+
def initialize(titulo="", porcentaje=[], platos=[], vct="", porcentaje_pgh=[], &block)
|
5
|
+
@titulo, @porcentaje, @platos, @vct, @porcentaje_pgh= titulo, porcentaje, platos, vct, porcentaje_pgh
|
6
|
+
if(block_given?)
|
7
|
+
instance_eval(&block)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def titulo(options)
|
12
|
+
@titulo << options[:titulo]
|
13
|
+
end
|
14
|
+
def porcentaje(options)
|
15
|
+
@porcentaje << options[:menor]
|
16
|
+
@porcentaje << options[:mayor]
|
17
|
+
end
|
18
|
+
def platos(options)
|
19
|
+
plato=[]
|
20
|
+
plato << options[:a1]
|
21
|
+
plato << options[:a2]
|
22
|
+
plato << options[:a3]
|
23
|
+
@platos << plato
|
24
|
+
end
|
25
|
+
def vct(options)
|
26
|
+
@vct << options[:vct]
|
27
|
+
end
|
28
|
+
def porcentaje_pgh(options)
|
29
|
+
@porcentaje_pgh << options[:p]
|
30
|
+
@porcentaje_pgh << options[:g]
|
31
|
+
@porcentaje_pgh << options[:h]
|
32
|
+
end
|
33
|
+
def to_s()
|
34
|
+
x=""
|
35
|
+
x = "#{@titulo}"
|
36
|
+
x << " (#{@porcentaje[0]} - #{@porcentaje[1]}%)\n"
|
37
|
+
i=0
|
38
|
+
while (i<@platos.length())
|
39
|
+
x << "- #{@platos[i][0]}, #{@platos[i][1]}, #{@platos[i][2]} g\n"
|
40
|
+
i+=1
|
41
|
+
end
|
42
|
+
x << "V.C.T. | % #{@vct} | #{@porcentaje_pgh[0]}% - #{@porcentaje_pgh[1]}% - #{@porcentaje_pgh[2]}%\n"
|
43
|
+
x
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "./lib/dieta/menu.rb"
|
2
|
+
|
3
|
+
|
4
|
+
class
|
5
|
+
Menu_alimentos < Menu
|
6
|
+
attr_reader :alimentos
|
7
|
+
def initialize(alimentos, titulo, porcentaje, platos, vct, porcentaje_pgh)
|
8
|
+
super(titulo, porcentaje, platos, vct, porcentaje_pgh)
|
9
|
+
@alimentos=alimentos
|
10
|
+
end
|
11
|
+
def to_s
|
12
|
+
aux="Grupo de alimentos: #{@alimentos}\n"
|
13
|
+
aux+= super()
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "./lib/dieta/menu.rb"
|
2
|
+
|
3
|
+
|
4
|
+
class Menu_edades < Menu
|
5
|
+
attr_reader :edad
|
6
|
+
def initialize(edad, titulo, porcentaje, platos, vct, porcentaje_pgh)
|
7
|
+
super(titulo, porcentaje, platos, vct, porcentaje_pgh)
|
8
|
+
@edad=edad
|
9
|
+
end
|
10
|
+
def to_s
|
11
|
+
aux="Edad: #{@edad}\n"
|
12
|
+
aux+= super()
|
13
|
+
end
|
14
|
+
end
|
data/lib/dieta.rb
ADDED
metadata
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dieta_alu0100885941
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jaime Madico
|
8
|
+
- Sergio Morente
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-12-16 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.13'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.13'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '10.0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '10.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rspec
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3.0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: guard
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: guard-rspec
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: guard-bundler
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
description: Gema que nos permite escribir dietas, en concreto distintos objetos menú
|
99
|
+
con información detallada de los alimentos, calorías, grasas,etc.
|
100
|
+
email:
|
101
|
+
- alu0100895179@ull.edu.es
|
102
|
+
- alu0100885941@ull.edu.es
|
103
|
+
executables: []
|
104
|
+
extensions: []
|
105
|
+
extra_rdoc_files: []
|
106
|
+
files:
|
107
|
+
- ".gitignore"
|
108
|
+
- ".rspec"
|
109
|
+
- ".travis.yml"
|
110
|
+
- CODE_OF_CONDUCT.md
|
111
|
+
- Gemfile
|
112
|
+
- Guardfile
|
113
|
+
- LICENSE.txt
|
114
|
+
- README.md
|
115
|
+
- Rakefile
|
116
|
+
- bin/console
|
117
|
+
- bin/setup
|
118
|
+
- dieta.gemspec
|
119
|
+
- lib/dieta.rb
|
120
|
+
- lib/dieta/dl_list.rb
|
121
|
+
- lib/dieta/linked_list.rb
|
122
|
+
- lib/dieta/menu.rb
|
123
|
+
- lib/dieta/menu_alimentos.rb
|
124
|
+
- lib/dieta/menu_edades.rb
|
125
|
+
- lib/dieta/version.rb
|
126
|
+
homepage: https://github.com/ULL-ESIT-LPP-1617/tdd-menu-equipo_33
|
127
|
+
licenses:
|
128
|
+
- MIT
|
129
|
+
metadata: {}
|
130
|
+
post_install_message:
|
131
|
+
rdoc_options: []
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
requirements: []
|
145
|
+
rubyforge_project:
|
146
|
+
rubygems_version: 2.5.1
|
147
|
+
signing_key:
|
148
|
+
specification_version: 4
|
149
|
+
summary: Gema que nos permite escribir dietas
|
150
|
+
test_files: []
|