Class: LocalFileStrategy

Inherits:
AbstractDownloadStrategy show all
Defined in:
lib/lace/download_strategy.rb

Instance Attribute Summary

Attributes inherited from AbstractDownloadStrategy

#resource, #target_folder

Instance Method Summary collapse

Methods inherited from AbstractDownloadStrategy

#initialize, #stage, #uri

Constructor Details

This class inherits a constructor from AbstractDownloadStrategy

Instance Method Details

#fetchObject



49
50
51
52
53
# File 'lib/lace/download_strategy.rb', line 49

def fetch
  ohai "Fetching #@uri into #@target_folder"
  FileUtils.cp_r @uri, @target_folder, :preserve => true
  @target_folder
end

#nameObject



55
56
57
# File 'lib/lace/download_strategy.rb', line 55

def name
  super || File.basename(@uri)
end