Class: Newspaper
Instance Attribute Summary collapse
-
#page ⇒ Object
Título de artículo.
-
#title_a ⇒ Object
Título de artículo.
Attributes inherited from Biblioref
#author_name, #author_surname, #edit_num, #p_date, #p_house, #p_place, #title_, #volume
Instance Method Summary collapse
- #<=>(another) ⇒ Object
-
#initialize(params = {}, &block) ⇒ Newspaper
constructor
A new instance of Newspaper.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}, &block) ⇒ Newspaper
Returns a new instance of Newspaper.
112 113 114 115 |
# File 'lib/dsl/references.rb', line 112 def initialize(params = {}, &block) super instance_eval &block end |
Instance Attribute Details
#page ⇒ Object
Título de artículo
110 111 112 |
# File 'lib/dsl/references.rb', line 110 def page @page end |
#title_a ⇒ Object
Título de artículo
110 111 112 |
# File 'lib/dsl/references.rb', line 110 def title_a @title_a end |
Instance Method Details
#<=>(another) ⇒ Object
130 131 132 133 134 135 136 137 |
# File 'lib/dsl/references.rb', line 130 def <=>(another) if self. == another. && self.p_date==another.p_date self.<=>another. self.title_a<=>another.title_a else super end end |
#to_s ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/dsl/references.rb', line 117 def to_s fullnames = "" i=0 while i < self..count if i != self..count-1 fullnames= fullnames + "#{self.[i]}, #{self.[i][0]}. & " else fullnames= fullnames + "#{self.[i]}, #{self.[i][0]}." end i=i+1 end "#{fullnames} (#{self.p_date}). #{self.title_a}. #{self.title_}, pp. #{self.page}." end |