Sha256: 6731db88c528fa1e160d2ce8cfb0c0cedc59b27f2dc91332a36fe142169e537a

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

class BookscanClient
  module Model
    class Book
      attr_accessor :filename, :hash, :digest, :image_url

      def initialize(filename: nil, hash: nil, digest: nil, image_url: nil)
        @filename = filename
        @hash = hash
        @digest = digest
        @image_url = image_url
      end

      def download_url
        "#{BookscanClient::URL::DOWNLOAD}?d=#{digest}&f=#{CGI.escape(filename)}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bookscan_client-0.0.2 lib/bookscan_client/model/book.rb