Class: SoapyBing::Helpers::ZipDownloader
- Inherits:
-
Object
- Object
- SoapyBing::Helpers::ZipDownloader
- Defined in:
- lib/soapy_bing/helpers/zip_downloader.rb
Instance Method Summary collapse
-
#initialize(url) ⇒ ZipDownloader
constructor
A new instance of ZipDownloader.
- #read ⇒ Object
Constructor Details
#initialize(url) ⇒ ZipDownloader
Returns a new instance of ZipDownloader.
8 9 10 |
# File 'lib/soapy_bing/helpers/zip_downloader.rb', line 8 def initialize(url) @url = url end |
Instance Method Details
#read ⇒ Object
12 13 14 15 16 17 |
# File 'lib/soapy_bing/helpers/zip_downloader.rb', line 12 def read Zip::InputStream.open(download_io) do |archive_io| file_io = archive_io.get_next_entry.get_input_stream file_io.read end end |