class Bibliografia
Attributes
autor[RW]
fecha[RW]
titulo[RW]
Public Class Methods
new(titulo, &bloque)
click to toggle source
# File lib/referencia/clase.rb, line 7 def initialize(titulo, &bloque) self.titulo = titulo instance_eval &bloque if block_given? end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/referencia/clase.rb, line 12 def <=> (other) if @autor == other.autor @titulo <=> other.titulo else @autor <=> other.autor end end
autores(autor)
click to toggle source
# File lib/referencia/clase.rb, line 24 def autores(autor) @autor = [] @autor << autor end
fecha_publicacion(fecha)
click to toggle source
# File lib/referencia/clase.rb, line 20 def fecha_publicacion(fecha) @fecha = fecha end