Module: EBPS::Preprocess::SystemCall
- Defined in:
- lib/ebps/preprocess/system_call.rb
Class Method Summary collapse
Class Method Details
.preprocess(data = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ebps/preprocess/system_call.rb', line 4 def self.preprocess 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 |