Class: EDoc
Instance Attribute Summary collapse
-
#a_date ⇒ Object
Dirección de documento electrónico.
-
#medium ⇒ Object
Dirección de documento electrónico.
-
#url ⇒ Object
Dirección de documento electrónico.
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) ⇒ EDoc
constructor
A new instance of EDoc.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}, &block) ⇒ EDoc
Returns a new instance of EDoc.
144 145 146 147 |
# File 'lib/dsl/references.rb', line 144 def initialize(params ={}, &block) super instance_eval &block end |
Instance Attribute Details
#a_date ⇒ Object
Dirección de documento electrónico
141 142 143 |
# File 'lib/dsl/references.rb', line 141 def a_date @a_date end |
#medium ⇒ Object
Dirección de documento electrónico
141 142 143 |
# File 'lib/dsl/references.rb', line 141 def medium @medium end |
#url ⇒ Object
Dirección de documento electrónico
141 142 143 |
# File 'lib/dsl/references.rb', line 141 def url @url end |
Instance Method Details
#<=>(another) ⇒ Object
167 168 169 170 171 172 173 174 |
# File 'lib/dsl/references.rb', line 167 def <=>(another) if self. == another. && self.p_date==another.p_date self.<=>another. self.title_<=>another.title_ else super end end |
#to_s ⇒ Object
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/dsl/references.rb', line 149 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 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 |