Module: EBPS::Postprocess::SystemCall
- Defined in:
- lib/ebps/postprocess/system_call.rb
Class Method Summary collapse
Class Method Details
.postprocess(data = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ebps/postprocess/system_call.rb', line 4 def self.postprocess data={} report = ["the following commands were executed"] pwd = Dir.pwd data['command_lines'].each do |dir, command| Dir.chdir dir system(command) report.push sprintf(" - %s in directory %s", command, dir) end report.join "\n" ensure Dir.chdir pwd end |