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.
246 247 248 249 |
# File 'lib/oddb2xml/downloader.rb', line 246 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
255 256 257 258 259 260 |
# File 'lib/oddb2xml/downloader.rb', line 255 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
251 252 253 |
# File 'lib/oddb2xml/downloader.rb', line 251 def init # No SOAP client needed - we download a zip file directly end |