Class: Cuprum::Cli::Dependencies::SystemCommand
- Parent Namespace
- Cuprum::Cli::Dependencies
- Defined In
- lib/cuprum/cli/dependencies/system_command.rb
Table Of Contents
Overview
Utility wrapper for running system command and capturing output.
Back To Top
Direct Subclasses
Cuprum::Cli::Dependencies::SystemCommand::Mock
Back To Top
Defined Under Namespace
- Classes
- CapturedOutput,
Mock
Back To Top
Instance Methods
Executes the system command and returns the captured output.
Parameters
- command (String) — the command to run.
- arguments (Array<String>) — command-line flags or arguments to pass
to the command.
- enviroment (Hash<String, Object>) — environment variables to set
for the command.
- options (Hash<String, Object>) — command line options and values to
pass to the command.
Returns
#spawn(command, arguments: [], enviroment:, options: {}) => Cuprum::Result<nil>
Spawns a process to run the system command.
Parameters
- command (String) — the command to run.
- arguments (Array<String>) — command-line flags or arguments to pass
to the command.
- enviroment (Hash<String, Object>) — environment variables to set
for the command.
- options (Hash<String, Object>) — command line options and values to
pass to the command.
Returns
- (Cuprum::Result<nil>) — a result with status :success if the
process ran successfully; otherwise, a result with status :failure and
an Error.
Back To Top
Back to
Documentation |
Reference
|
Cuprum
|
Cuprum::Cli
|
Cuprum::Cli::Dependencies