Class: Blastengine::Download
- Includes:
- Blastengine
- Defined in:
- lib/blastengine/download.rb
Constant Summary
Constants included from Blastengine
Instance Attribute Summary
Attributes inherited from Base
#created_time, #delivery_id, #delivery_time, #delivery_type, #drop_count, #hard_error_count, #open_count, #sent_count, #soft_error_count, #status, #total_count, #updated_time
Instance Method Summary collapse
Methods included from Blastengine
Methods inherited from Base
#cancel, #client, client, #delete, #get, #set, #sets, #unsubscribe
Instance Method Details
#download(res) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/blastengine/download.rb', line 9 def download res f = Tempfile.create("blastengine") f.binmode f.write res f.flush path = f.path input = Zip::File.open path data = input.read input.entries[0].to_s f.close return data end |