Sha256: 03e1c5fff5de76e694dd453ef045fd1a5be2644dd81437860fe55aab0806a155

Contents?: true

Size: 585 Bytes

Versions: 1

Compression:

Stored size: 585 Bytes

Contents

# coding: utf-8
require "references"
require "date"

module References
  # Represents a e-document
  class Ebook < Reference
    attr_accessor :url
    # Format book reference to APA standard
    # @return [String] format output
    def formatAPA
      (prettyOutput(@authors.map { |x| x.to_s }) + "(" + @datee.year.to_s + ") " + @title +
       "\n\t(" + @edition.to_s + ") " +
       "(" + @editionnumber.to_s + ") " +
       @url)
    end

    # Set the url from get the source of document
    # @param url [String] URL of source
    def url(url)
      @url = url
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
referencess-0.1.0 lib/references/ebook.rb