class EDoc
Attributes
a_date[RW]
medium[RW]
url[RW]
Public Class Methods
new(params ={}, &block)
click to toggle source
Calls superclass method
Biblioref::new
# File lib/dsl/references.rb, line 144 def initialize(params ={}, &block) super instance_eval &block end
Public Instance Methods
<=>(another)
click to toggle source
Calls superclass method
Biblioref#<=>
# File lib/dsl/references.rb, line 167 def <=>(another) if self.author_surname == another.author_surname && self.p_date==another.p_date self.author_surname<=>another.author_surname self.title_<=>another.title_ else super end end
to_s()
click to toggle source
# File lib/dsl/references.rb, line 149 def to_s 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 if self.medium =="En lĂnea" "#{fullnames} (#{self.p_date}). #{self.title_} (#{self.edit_num}), [#{self.medium}]. #{self.p_place}: #{self.p_house}. Disponible en: #{self.url} [#{self.a_date}]." else "#{fullnames} (#{self.p_date}). #{self.title_} (#{self.edit_num}), [#{self.medium}]. #{self.p_place}: #{self.p_house} [#{self.a_date}]." end end