Class: References::Ebook

Inherits:
Reference show all
Defined in:
lib/references/ebook.rb

Overview

Represents a e-document

Instance Attribute Summary collapse

Attributes inherited from Reference

#authors, #datee

Instance Method Summary collapse

Methods inherited from Reference

#<=>, #author, #cantidadAuthors, #cantidadIsbn, #cantidadSeries, #date, #editorial, #hasDate, #hasEdition, #hasEditionnumber, #hasTitle, #initialize, #prettyOutput, #title

Constructor Details

This class inherits a constructor from References::Reference

Instance Attribute Details

#url(url) ⇒ Object

Set the url from get the source of document

Parameters:

  • url (String)

    URL of source



20
21
22
# File 'lib/references/ebook.rb', line 20

def url
  @url
end

Instance Method Details

#formatAPAString

Format book reference to APA standard

Returns:

  • (String)

    format output



11
12
13
14
15
16
# File 'lib/references/ebook.rb', line 11

def formatAPA
  (prettyOutput(@authors.map { |x| x.to_s }) + "(" + @datee.year.to_s + ") " + @title +
   "\n\t(" + @edition.to_s + ") " +
   "(" + @editionnumber.to_s + ") " +
   @url)
end