Class: Arxiv::Downloader::AbstractPage
- Inherits:
-
Object
- Object
- Arxiv::Downloader::AbstractPage
- Defined in:
- lib/arxiv/downloader/abstract_page.rb
Instance Method Summary collapse
- #download(to:) ⇒ Object
-
#initialize(identifier, client:) ⇒ AbstractPage
constructor
A new instance of AbstractPage.
Constructor Details
#initialize(identifier, client:) ⇒ AbstractPage
Returns a new instance of AbstractPage.
4 5 6 7 |
# File 'lib/arxiv/downloader/abstract_page.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/abstract_page.rb', line 9 def download to: File.write to, @client.get(url).to_s end |