Method: Metaforce::Job::Retrieve#extract_to
- Defined in:
- lib/metaforce/job/retrieve.rb
#extract_to(destination) ⇒ Object
Public: Unzips the returned zip file to the location.
destination - Path to extract the contents to.
Examples
job.extract_to('./path')
# => #<Metaforce::Job::Retrieve @id='1234'>
Returns self.
65 66 67 68 69 70 71 |
# File 'lib/metaforce/job/retrieve.rb', line 65 def extract_to(destination) return on_complete { |job| job.extract_to(destination) } unless started? with_tmp_zip_file do |file| unzip(file, destination) end self end |