Class: Paciente
Direct Known Subclasses
Instance Attribute Summary collapse
-
#consulta ⇒ Object
readonly
Returns the value of attribute consulta.
Attributes inherited from Persona
Instance Method Summary collapse
-
#initialize(nombre, sexo, consulta) ⇒ Paciente
constructor
A new instance of Paciente.
- #to_s ⇒ Object
Methods inherited from Persona
Constructor Details
#initialize(nombre, sexo, consulta) ⇒ Paciente
Returns a new instance of Paciente.
27 28 29 30 |
# File 'lib/alu0101042305/persona.rb', line 27 def initialize(nombre,sexo,consulta) super(nombre,sexo) @consulta = consulta end |
Instance Attribute Details
#consulta ⇒ Object (readonly)
Returns the value of attribute consulta.
25 26 27 |
# File 'lib/alu0101042305/persona.rb', line 25 def consulta @consulta end |
Instance Method Details
#to_s ⇒ Object
32 33 34 |
# File 'lib/alu0101042305/persona.rb', line 32 def to_s super.to_s + " con consulta en #{@consulta}" end |