Class: BookFinder::Book

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Book

Returns a new instance of Book.



5
6
7
8
9
10
11
12
# File 'lib/bookfinder/book.rb', line 5

def initialize(options = {})
  @title = options['title']
  @authors = options['authors']
  @page_count = options['pageCount']
  @description = options['description']
  @image_urls = options['imageLinks']
  @published_date = options['publishedDate']
end

Instance Attribute Details

#authorsObject (readonly)

Returns the value of attribute authors.



3
4
5
# File 'lib/bookfinder/book.rb', line 3

def authors
  @authors
end

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/bookfinder/book.rb', line 3

def description
  @description
end

#image_urlsObject (readonly)

Returns the value of attribute image_urls.



3
4
5
# File 'lib/bookfinder/book.rb', line 3

def image_urls
  @image_urls
end

#page_countObject (readonly)

Returns the value of attribute page_count.



3
4
5
# File 'lib/bookfinder/book.rb', line 3

def page_count
  @page_count
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/bookfinder/book.rb', line 3

def title
  @title
end