class Bibliography
Attributes
date[RW]
title[RW]
Public Class Methods
new(autor,title,date,editorial)
click to toggle source
# File lib/biblio/biblio.rb, line 9 def initialize (autor,title,date,editorial) @author = autor @title = title @date = date end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/biblio/biblio.rb, line 15 def <=>(other) if (@author != other.author) @author <=> other.author elsif(@date != other.date) @date <=> other.date else @title <=> other.title end end
==(other)
click to toggle source
# File lib/biblio/biblio.rb, line 27 def ==(other) @title == other.title end