Class: Oddb2xml::MedregbmDownloader
- Inherits:
-
Downloader
- Object
- Downloader
- Oddb2xml::MedregbmDownloader
- Includes:
- DownloadMethod
- Defined in:
- lib/oddb2xml/downloader.rb
Instance Attribute Summary
Attributes inherited from Downloader
Instance Method Summary collapse
- #download ⇒ Object
-
#initialize(type = :company) ⇒ MedregbmDownloader
constructor
A new instance of MedregbmDownloader.
Methods inherited from Downloader
Constructor Details
#initialize(type = :company) ⇒ MedregbmDownloader
Returns a new instance of MedregbmDownloader.
179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/oddb2xml/downloader.rb', line 179 def initialize(type=:company) @type = type case @type when :company # betrieb action = 'CreateExcelListBetriebs' when :person # medizinalperson action = 'CreateExcelListMedizinalPersons' else action = '' end url = "https://www.medregbm.admin.ch/Publikation/#{action}" super({}, url) end |
Instance Method Details
#download ⇒ Object
192 193 194 |
# File 'lib/oddb2xml/downloader.rb', line 192 def download download_as("medregbm_#{@type.to_s}.txt", 'r:iso-8859-1:utf-8') end |