Class: Dramaturg::Runner::Shell
- Defined in:
- lib/dramaturg/runner/shell.rb
Instance Method Summary collapse
- #_call(line, cmd) ⇒ Object
-
#initialize(script, config = {}) ⇒ Shell
constructor
A new instance of Shell.
Methods inherited from Base
#call, #handle_fail, #last_success?
Constructor Details
#initialize(script, config = {}) ⇒ Shell
5 6 7 |
# File 'lib/dramaturg/runner/shell.rb', line 5 def initialize(script, config={}) super end |
Instance Method Details
#_call(line, cmd) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/dramaturg/runner/shell.rb', line 9 def _call(line,cmd) if cmd.capture_output output = `#{line}` cmd[:output] = output cmd.ok = !output.empty? else cmd.ok = system(line) end end |