Class: Arxiv::Downloader::PDF
- Inherits:
-
Object
- Object
- Arxiv::Downloader::PDF
- Defined in:
- lib/arxiv/downloader/pdf.rb
Instance Method Summary collapse
- #download(to:) ⇒ Object
-
#initialize(identifier, client:) ⇒ PDF
constructor
A new instance of PDF.
Constructor Details
#initialize(identifier, client:) ⇒ PDF
Returns a new instance of PDF.
4 5 6 7 |
# File 'lib/arxiv/downloader/pdf.rb', line 4 def initialize identifier, client: @identifier = identifier @client = client end |
Instance Method Details
#download(to:) ⇒ Object
9 10 11 |
# File 'lib/arxiv/downloader/pdf.rb', line 9 def download to: File.binwrite to, @client.get(url).to_s end |