Class: PacienteT

Inherits:
PacienteM show all
Defined in:
lib/alu0101042305/persona.rb

Instance Attribute Summary

Attributes inherited from PacienteM

#cadera, #cintura, #edad, #menu, #peso, #talla

Attributes inherited from Paciente

#consulta

Attributes inherited from Persona

#nombre, #sexo

Instance Method Summary collapse

Methods inherited from PacienteM

#actividad, #addMenu, #basal, #imc, #initialize, #menuOk?, #pesoIdeal, #termogeno, #to_s, #total

Methods inherited from Paciente

#initialize, #to_s

Methods inherited from Persona

#initialize, #to_s

Constructor Details

This class inherits a constructor from PacienteM

Instance Method Details

#<=>(other) ⇒ Object

Raises:

  • (TypeError)


95
96
97
98
99
# File 'lib/alu0101042305/persona.rb', line 95

def <=> other
  raise TypeError, "Se esperaba un objeto Persona" unless other.is_a?Persona
  return self.total <=> other.total if other.is_a?PacienteT
  return -1
end