Class: Electronicdocument
- Inherits:
-
Regularpublications
- Object
- Reference
- Regularpublications
- Electronicdocument
- Defined in:
- lib/prct11/electronicdocument.rb
Instance Attribute Summary
Attributes inherited from Reference
Instance Method Summary collapse
-
#initialize(authors, title, date, url) ⇒ Electronicdocument
constructor
A new instance of Electronicdocument.
- #to_s ⇒ Object
Methods inherited from Reference
Constructor Details
#initialize(authors, title, date, url) ⇒ Electronicdocument
Returns a new instance of Electronicdocument.
3 4 5 6 |
# File 'lib/prct11/electronicdocument.rb', line 3 def initialize(, title, date, url) super(, title, date) @url = url end |
Instance Method Details
#to_s ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/prct11/electronicdocument.rb', line 8 def to_s() string = "" for i in (0..@authors.size-1) string += "#{[i]}" if (i != @authors.size-1) string += ", " end end string += " (" + date + ").\n" string += title string += ".\nDisponible en " + @url end |