Class: Downlow::Dir

Inherits:
Extractor show all
Defined in:
lib/downlow/extractors/dir.rb

Instance Attribute Summary

Attributes inherited from Extractor

#destination, #final_path, #options, #path, #tmp_dir

Instance Method Summary collapse

Methods inherited from Extractor

extract, #extracted?, extractor_for, handles, #initialize

Constructor Details

This class inherits a constructor from Downlow::Extractor

Instance Method Details

#extractObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/downlow/extractors/dir.rb', line 6

def extract
  if path.directory?
    self.destination = destination + path.basename
    destination.dirname.mkpath
  else
    destination.dirname.mkpath
  end
  path.cp destination
  @final_path = destination
end