Method: Dieta#ingesta
- Defined in:
- lib/prct06/Dieta.rb
#ingesta(porcentaje = {}) ⇒ Object
función para definir el porcentaje de ingesta. Podría darse una estimación entre dos
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/prct06/Dieta.rb', line 41 def ingesta(porcentaje = {}) standard = porcentaje[:fijo] if porcentaje[:fijo] low = porcentaje[:min] if porcentaje[:min] up = porcentaje[:max] if porcentaje[:max] if porcentaje[:fijo] then self.porcentaje_ingesta = "#{standard}%" else self.porcentaje_ingesta = "#{low}% - #{up}%" end end |