Sha256: 30391c0b4b9174ea524c73d1cd421a4a74bdc43c50cc39611576b58f3bd9f9fd
Contents?: true
Size: 678 Bytes
Versions: 1
Compression:
Stored size: 678 Bytes
Contents
class Diet attr_reader :cabecera, :menu, :vct def initialize(cabecera,menu,vct) @cabecera = cabecera @menu = menu @vct = vct end def to_s s = "" s << "#{cabecera[0]}" "(#{cabecera[1]} - #{cabecera[2]})\n" for i in 0..menu.length-1 s << "- #{menu[i][0]}, #{menu[i][1]}, #{menu[i][2]}\n" end s << "V.C.T. | % \t#{vct[0]} | #{vct[1]} - #{vct[2]} - #{vct[3]}\n" end def get_cabecera @cabecera[0] end def get_ingesta @cabecera[1] end def get_plato(num) @menu[num-1] end def get_vct @vct[0] end def get_proteinas @vct[1] end def get_grasas @vct[2] end def get_hidratos @vct[3] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
Gema_alu0100891485-0.1.0 | lib/dieta/diet.rb~ |