Class: PacienteSinObesidad

Inherits:
PacienteConDatos show all
Defined in:
lib/gematdd/paciente/paciente_sin_obesidad.rb

Overview

Representa un paciente cuyos datos antropométricos indican que no tiene obesidad

Instance Attribute Summary

Attributes inherited from PacienteConDatos

#datos

Attributes inherited from Paciente

#consulta

Attributes inherited from Individuo

#apellidos, #edad, #fecha_nac, #nombre, #ocupacion, #sexo

Instance Method Summary collapse

Methods inherited from PacienteConDatos

#<=>, #efecto_termogeno, #gasto_actividad_fisica, #gasto_energetico_basal, #gasto_energetico_total, #imc, #peso_teorico_ideal, #porcentaje_grasa, #rcc

Methods inherited from Individuo

#<=>, #genero

Constructor Details

#initialize(nombre, apellidos, sexo, fecha_nac, ocupacion, consulta, datos_antropometricos) ⇒ PacienteSinObesidad

Returns a new instance of PacienteSinObesidad



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/gematdd/paciente/paciente_sin_obesidad.rb', line 6

def initialize(nombre, apellidos, sexo, fecha_nac, ocupacion, consulta,
               datos_antropometricos)

  super(nombre, apellidos, sexo, fecha_nac, ocupacion, consulta,
        datos_antropometricos)

  if imc >= 30.0
    raise TypeError, "El Paciente tiene obesidad (IMC:
    #{imc} >= 30.0)"
  end
end

Instance Method Details

#to_sObject



18
19
20
21
# File 'lib/gematdd/paciente/paciente_sin_obesidad.rb', line 18

def to_s
  "#{super}\n
SegĂșn el IMC, este paciente NO tiene Obesidad."
end