Class: Oddb2xml::RefdataDownloader
- Inherits:
-
Downloader
- Object
- Downloader
- Oddb2xml::RefdataDownloader
- Includes:
- DownloadMethod
- Defined in:
- lib/oddb2xml/downloader.rb
Instance Attribute Summary
Attributes inherited from Downloader
#agent, #file2save, #type, #url
Instance Method Summary collapse
- #download ⇒ Object
- #init ⇒ Object
-
#initialize(options = {}, type = :pharma) ⇒ RefdataDownloader
constructor
A new instance of RefdataDownloader.
Methods inherited from Downloader
Constructor Details
#initialize(options = {}, type = :pharma) ⇒ RefdataDownloader
Returns a new instance of RefdataDownloader.
276 277 278 279 |
# File 'lib/oddb2xml/downloader.rb', line 276 def initialize( = {}, type = :pharma) url = "https://files.refdata.ch/simis-public-prod/Articles/1.0/Refdata.Articles.zip" super(, url) end |
Instance Method Details
#download ⇒ Object
285 286 287 288 289 290 |
# File 'lib/oddb2xml/downloader.rb', line 285 def download filename = "Refdata.Articles.zip" download_as(filename, "w+") content = read_xml_from_zip(/Refdata.Articles.xml/, File.join(DOWNLOADS, filename)) content end |
#init ⇒ Object
281 282 283 |
# File 'lib/oddb2xml/downloader.rb', line 281 def init # No SOAP client needed - we download a zip file directly end |