class References::Book
Represent a book reference
Public Instance Methods
formatAPA()
click to toggle source
Format book reference to APA standard @return [String] format output
# File lib/references/book.rb, line 9 def formatAPA (prettyOutput(@authors.map { |x| x.to_s }) + "(" + @datee.year.to_s + ") " + @title + if @subtitle ": " + @subtitle + "." else "" end + "\n\t"+@serie+". (" + @edition.to_s + ") " + "(" + @editionnumber.to_s + ") " + @isbn.join(", ")) end
isbn(isbn)
click to toggle source
Set some isbn of document, each isbn is store in a list, you can have some in the same book params isbn [String]
# File lib/references/book.rb, line 29 def isbn(isbn) if @isbn.nil? @isbn = [] end @isbn << isbn end
subtitle(subtitle)
click to toggle source
Set subtitle of document params subtitle [String]
# File lib/references/book.rb, line 23 def subtitle(subtitle) @subtitle = subtitle end