Class: LocalFileStrategy
- Inherits:
-
AbstractDownloadStrategy
- Object
- AbstractDownloadStrategy
- LocalFileStrategy
- Defined in:
- lib/lace/download_strategy.rb
Instance Attribute Summary
Attributes inherited from AbstractDownloadStrategy
#resource, #target_folder, #uri
Instance Method Summary collapse
Methods inherited from AbstractDownloadStrategy
Constructor Details
This class inherits a constructor from AbstractDownloadStrategy
Instance Method Details
#fetch ⇒ Object
47 48 49 50 51 |
# File 'lib/lace/download_strategy.rb', line 47 def fetch ohai "Fetching #{@uri} into #{@target_folder}" FileUtils.cp_r @uri, @target_folder, preserve: true @target_folder end |
#name ⇒ Object
53 54 55 |
# File 'lib/lace/download_strategy.rb', line 53 def name super || File.basename(@uri) end |