class Biblio

Attributes

autor[R]
titulo[R]

Public Class Methods

new(titulo) { |self| ... } click to toggle source
# File lib/Bib/Bib.rb, line 7
def initialize(titulo, &bloque)
    self.autor = []
    self.titulo = titulo
    
    if block_given?
        if block.arity == 1
            yield self
        else
            instance_eval &bloque
        end
    end
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/Bib/Bib.rb, line 20
def <=> (other) 
                @titulo<=> other.titulo
        end