class Cita

Attributes

author[RW]
datey[RW]
sufijo[RW]
titulo[RW]

Public Class Methods

new(author, date, titulo) click to toggle source
# File lib/lpp_Grupo3/cita.rb, line 6
def initialize(author, date, titulo)
   self.author=author
   self.datey=date
   self.titulo=titulo
   self.sufijo=0
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/lpp_Grupo3/cita.rb, line 28
def <=>(other)
   if author == other.author
    if datey == other.datey
        titulo<=>other.titulo
    else
        datey <=> other.datey
    end
   else
       author<=>other.author
   end
end
autor(datos = {}) click to toggle source
# File lib/lpp_Grupo3/cita.rb, line 20
def autor (datos = {})
    self.author.push([datos[:apellido], datos[:nombre]])
end
fecha(year) click to toggle source
# File lib/lpp_Grupo3/cita.rb, line 24
def fecha (year)
   self.datey = year 
end