class EBook

Attributes

editor_name[RW]
editor_surname[RW]
page[RW]
title_a[RW]

Public Class Methods

new(params = {}, &block) click to toggle source
Calls superclass method Biblioref::new
# File lib/dsl/references.rb, line 66
def initialize(params = {}, &block)
    super
    self.editor_name = []
    self.editor_surname = []
    instance_eval &block
end

Public Instance Methods

<=>(another) click to toggle source
Calls superclass method Biblioref#<=>
# File lib/dsl/references.rb, line 99
   def <=>(another)
        if self.author_surname== another.author_surname && self.p_date==another.p_date
    self.author_surname<=>another.author_surname
    self.title_a<=>another.title_a
else
  super
end
end
to_s() click to toggle source
# File lib/dsl/references.rb, line 73
    def to_s
          editors = ""
 fullnames = ""
          i=0
  while i < self.author_name.count
if i != self.author_name.count-1
  fullnames= fullnames + "#{self.author_surname[i]}, #{self.author_name[i][0]}. & "
else
  fullnames= fullnames + "#{self.author_surname[i]}, #{self.author_name[i][0]}."
end
  i=i+1
end
i=0
   while i < self.editor_name.count
if i == self.editor_name.count-1
  editors= editors + "#{self.editor_name[i][0]}. #{self.editor_surname[i]}"
elsif i == self.editor_name.count-2
  editors= editors + "#{self.editor_name[i][0]}. #{self.editor_surname[i]} & "
 else
 editors= editors + "#{self.editor_name[i][0]}. #{self.editor_surname[i]}, "
end
  i=i+1
end
      "#{fullnames} (#{self.p_date}). #{self.title_a}. En #{editors} (comps), #{self.title_} (pp. #{self.page}) (#{self.edit_num}) (#{self.volume}). #{self.p_place}: #{self.p_house}."
    end