Class: GoogleBooks::API::Book

Inherits:
Object
  • Object
show all
Defined in:
lib/google_books/api/book.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ Book

Returns a new instance of Book.



9
10
11
12
# File 'lib/google_books/api/book.rb', line 9

def initialize(item)
  return if item.nil?
  parse_item(item)
end

Instance Attribute Details

#authorsObject (readonly)

Returns the value of attribute authors.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def authors
  @authors
end

#average_ratingObject (readonly)

Returns the value of attribute average_rating.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def average_rating
  @average_rating
end

#categoriesObject (readonly)

Returns the value of attribute categories.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def categories
  @categories
end

#coversObject (readonly)

Returns the value of attribute covers.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def covers
  @covers
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def description
  @description
end

Returns the value of attribute info_link.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def info_link
  @info_link
end

#isbnObject (readonly)

Returns the value of attribute isbn.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def isbn
  @isbn
end

#isbn_10Object (readonly)

Returns the value of attribute isbn_10.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def isbn_10
  @isbn_10
end

#page_countObject (readonly)

Returns the value of attribute page_count.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def page_count
  @page_count
end

Returns the value of attribute preview_link.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def preview_link
  @preview_link
end

#published_dateObject (readonly)

Returns the value of attribute published_date.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def published_date
  @published_date
end

#publisherObject (readonly)

Returns the value of attribute publisher.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def publisher
  @publisher
end

#ratings_countObject (readonly)

Returns the value of attribute ratings_count.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def ratings_count
  @ratings_count
end

#titleObject (readonly)

Returns the value of attribute title.



4
5
6
# File 'lib/google_books/api/book.rb', line 4

def title
  @title
end