Class: Persona

Inherits:
Object
  • Object
show all
Includes:
Comparable, Enumerable
Defined in:
lib/alu0100406580_nutricion/paciente.rb

Direct Known Subclasses

Paciente

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nombre, apellidos, edad, genero) ⇒ Persona

Returns a new instance of Persona.



20
21
22
23
24
25
# File 'lib/alu0100406580_nutricion/paciente.rb', line 20

def initialize(nombre, apellidos, edad, genero)
    @nombre = nombre
    @apellidos = apellidos
    @edad = edad
    @genero = genero
end

Instance Attribute Details

#apellidosObject

Returns the value of attribute apellidos.



18
19
20
# File 'lib/alu0100406580_nutricion/paciente.rb', line 18

def apellidos
  @apellidos
end

#edadObject

Returns the value of attribute edad.



18
19
20
# File 'lib/alu0100406580_nutricion/paciente.rb', line 18

def edad
  @edad
end

#generoObject

Returns the value of attribute genero.



18
19
20
# File 'lib/alu0100406580_nutricion/paciente.rb', line 18

def genero
  @genero
end

#nombreObject

Returns the value of attribute nombre.



18
19
20
# File 'lib/alu0100406580_nutricion/paciente.rb', line 18

def nombre
  @nombre
end