Class: Book

Inherits:
Biblioref show all
Defined in:
lib/dsl/references.rb

Instance Attribute Summary

Attributes inherited from Biblioref

#author_name, #author_surname, #edit_num, #p_date, #p_house, #p_place, #title_, #volume

Instance Method Summary collapse

Constructor Details

#initialize(params = {}, &block) ⇒ Book

Returns a new instance of Book.



44
45
46
47
# File 'lib/dsl/references.rb', line 44

def initialize(params ={}, &block)
    super
    instance_eval &block
end

Instance Method Details

#<=>(another) ⇒ Object



52
53
54
55
56
57
58
# File 'lib/dsl/references.rb', line 52

def <=>(another)
  if self.author_surname== another.author_surname && self.p_date==another.p_date
    self.title_<=>another.title_
  else
      super
    end
end

#to_sObject



48
49
50
# File 'lib/dsl/references.rb', line 48

def to_s
        super
end