Module: Pygmy::Bash
- Defined in:
- lib/pygmy/shell.rb
Class Method Summary collapse
Class Method Details
.run_command(command) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/pygmy/shell.rb', line 16 def self.run_command(command) stdout = `bash -c "#{command}"` OpenStruct.new({ success?: $?.exitstatus == 0, exitstatus: $?.exitstatus, stdout: stdout }) end |