Class: ProcessExecuter::Runner
- Inherits:
-
Object
- Object
- ProcessExecuter::Runner
- Defined in:
- lib/process_executer/runner.rb
Overview
The Runner
class executes subprocess commands and captures their status and output.
It does the following:
- Run commands (
call
) with options for capturing output, handling timeouts, and merging stdout/stderr. - Process command results, including logging and error handling.
- Raise detailed exceptions for common command failures, such as timeouts or subprocess errors.
This class is used internally by run.
Instance Method Summary collapse
-
#call(command, options) ⇒ ProcessExecuter::Result
Run a command and return the status including stdout and stderr output.
Instance Method Details
#call(command, options) ⇒ ProcessExecuter::Result
Run a command and return the status including stdout and stderr output
34 35 36 |
# File 'lib/process_executer/runner.rb', line 34 def call(command, ) spawn(command, ).tap { |result| process_result(result) } end |