Class: Mamiya::Steps::Extract
- Defined in:
- lib/mamiya/steps/extract.rb
Instance Attribute Summary
Attributes inherited from Abstract
#config, #logger, #options, #script
Instance Method Summary collapse
-
#run! ⇒ Object
XXX: extract step is really needed? doing this in prepare step for consistency with agent/tasks/prepare, is better, I guess.
Methods inherited from Abstract
Constructor Details
This class inherits a constructor from Mamiya::Steps::Abstract
Instance Method Details
#run! ⇒ Object
XXX: extract step is really needed? doing this in prepare step for consistency with agent/tasks/prepare, is better, I guess.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/mamiya/steps/extract.rb', line 8 def run! package = case [:package] when Mamiya::Package [:package] else Mamiya::Package.new([:package]) end if File.exists?([:destination]) destination = File.join([:destination], package.name) else destination = [:destination] end logger.info "Extracting #{package.path} onto #{destination}" package.extract_onto!(destination) end |