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.
245 246 247 248 |
# File 'lib/oddb2xml/downloader.rb', line 245 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
260 261 262 263 264 265 |
# File 'lib/oddb2xml/downloader.rb', line 260 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
250 251 252 253 254 255 256 257 258 |
# File 'lib/oddb2xml/downloader.rb', line 250 def init config = { log_level: :info, log: false, # $stdout raise_errors: true, wsdl: @url } @client = Savon::Client.new(config) end |