class Newspaper
Attributes
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 112 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 130 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 117 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 "#{fullnames} (#{self.p_date}). #{self.title_a}. #{self.title_}, pp. #{self.page}." end