Class: JournalArticle
- Inherits:
-
Regularpublications
- Object
- Reference
- Regularpublications
- JournalArticle
- Defined in:
- lib/prct11/journalarticle.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#finalpage ⇒ Object
Returns the value of attribute finalpage.
-
#initpage ⇒ Object
Returns the value of attribute initpage.
-
#journal ⇒ Object
Returns the value of attribute journal.
-
#number ⇒ Object
Returns the value of attribute number.
-
#volume ⇒ Object
Returns the value of attribute volume.
Attributes inherited from Reference
Instance Method Summary collapse
-
#initialize(authorsJournal, titleJournal, dateJournal, journal, number, volumen = nil, initpage, finalpage) ⇒ JournalArticle
constructor
A new instance of JournalArticle.
- #to_s ⇒ Object
Methods inherited from Reference
Constructor Details
#initialize(authorsJournal, titleJournal, dateJournal, journal, number, volumen = nil, initpage, finalpage) ⇒ JournalArticle
Returns a new instance of JournalArticle.
11 12 13 14 15 16 17 18 19 |
# File 'lib/prct11/journalarticle.rb', line 11 def initialize(, titleJournal, dateJournal, journal, number, volumen=nil, initpage, finalpage) super(, titleJournal, dateJournal) @journal = journal @volume = volume @number = number @initpage = initpage @finalpage = finalpage end |
Instance Attribute Details
#finalpage ⇒ Object
Returns the value of attribute finalpage.
9 10 11 |
# File 'lib/prct11/journalarticle.rb', line 9 def finalpage @finalpage end |
#initpage ⇒ Object
Returns the value of attribute initpage.
9 10 11 |
# File 'lib/prct11/journalarticle.rb', line 9 def initpage @initpage end |
#journal ⇒ Object
Returns the value of attribute journal.
9 10 11 |
# File 'lib/prct11/journalarticle.rb', line 9 def journal @journal end |
#number ⇒ Object
Returns the value of attribute number.
9 10 11 |
# File 'lib/prct11/journalarticle.rb', line 9 def number @number end |
#volume ⇒ Object
Returns the value of attribute volume.
9 10 11 |
# File 'lib/prct11/journalarticle.rb', line 9 def volume @volume end |
Instance Method Details
#to_s ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/prct11/journalarticle.rb', line 21 def to_s string = "" for i in (0..@authors.size-1) string += "#{[i]}" if (i != @authors.size-1) string += ", " end end string +="\n" string += title string += ".\n" string += @journal string += ", " if(!@volume.nil?) string += @volume.to_s string += " " end string += "(" + @number.to_s + ")" string += ", " + date string += "." end |