Class: BookscanClient::Model::Book
- Inherits:
-
Object
- Object
- BookscanClient::Model::Book
- Defined in:
- lib/bookscan_client/model/book.rb
Instance Attribute Summary collapse
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#hash ⇒ Object
Returns the value of attribute hash.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
Instance Method Summary collapse
- #download_url ⇒ Object
-
#initialize(filename: nil, hash: nil, digest: nil, image_url: nil) ⇒ Book
constructor
A new instance of Book.
Constructor Details
#initialize(filename: nil, hash: nil, digest: nil, image_url: nil) ⇒ Book
Returns a new instance of Book.
6 7 8 9 10 11 |
# File 'lib/bookscan_client/model/book.rb', line 6 def initialize(filename: nil, hash: nil, digest: nil, image_url: nil) @filename = filename @hash = hash @digest = digest @image_url = image_url end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
4 5 6 |
# File 'lib/bookscan_client/model/book.rb', line 4 def digest @digest end |
#filename ⇒ Object
Returns the value of attribute filename.
4 5 6 |
# File 'lib/bookscan_client/model/book.rb', line 4 def filename @filename end |
#hash ⇒ Object
Returns the value of attribute hash.
4 5 6 |
# File 'lib/bookscan_client/model/book.rb', line 4 def hash @hash end |
#image_url ⇒ Object
Returns the value of attribute image_url.
4 5 6 |
# File 'lib/bookscan_client/model/book.rb', line 4 def image_url @image_url end |
Instance Method Details
#download_url ⇒ Object
13 14 15 |
# File 'lib/bookscan_client/model/book.rb', line 13 def download_url "#{BookscanClient::URL::DOWNLOAD}?d=#{digest}&f=#{CGI.escape(filename)}" end |