Class: BookToolkit::BookData

Inherits:
Object
  • Object
show all
Defined in:
lib/book_toolkit/book_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ BookData

Returns a new instance of BookData.



6
7
8
9
10
11
12
# File 'lib/book_toolkit/book_data.rb', line 6

def initialize args={}
  args.each{ |k, v| send("#{k}=v") }

  if !@isbn.nil?
    @isbn = BookToolkit.to_isbn13 @isbn
  end
end

Instance Attribute Details

#api_data_urlObject

Returns the value of attribute api_data_url.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def api_data_url
  @api_data_url
end

#authorObject

Returns the value of attribute author.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def author
  @author
end

#editionObject

Returns the value of attribute edition.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def edition
  @edition
end

#isbnObject

Returns the value of attribute isbn.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def isbn
  @isbn
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def name
  @name
end

#publisherObject

Returns the value of attribute publisher.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def publisher
  @publisher
end

#revisionObject

Returns the value of attribute revision.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def revision
  @revision
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/book_toolkit/book_data.rb', line 3

def url
  @url
end