Exception: Cheetah::ExecutionFailed
- Inherits:
-
StandardError
- Object
- StandardError
- Cheetah::ExecutionFailed
- Defined in:
- lib/cheetah.rb
Overview
Exception raised when a command execution fails.
Instance Attribute Summary collapse
-
#commands ⇒ Array<Array<String>>
readonly
The executed commands as an array where each item is again an array containing an executed command in the first element and its arguments in the remaining ones.
-
#status ⇒ Process::Status
readonly
The executed command exit status.
-
#stderr ⇒ String?
readonly
The output the executed command wrote to stderr; can be ‘nil` if stderr was captured into a stream.
-
#stdout ⇒ String?
readonly
The output the executed command wrote to stdout; can be ‘nil` if stdout was captured into a stream.
Instance Method Summary collapse
-
#initialize(commands, status, stdout, stderr, message = nil) ⇒ ExecutionFailed
constructor
Initializes a new ExecutionFailed instance.
Constructor Details
#initialize(commands, status, stdout, stderr, message = nil) ⇒ ExecutionFailed
Initializes a new Cheetah::ExecutionFailed instance.
70 71 72 73 74 75 76 |
# File 'lib/cheetah.rb', line 70 def initialize(commands, status, stdout, stderr, = nil) super() @commands = commands @status = status @stdout = stdout @stderr = stderr end |
Instance Attribute Details
#commands ⇒ Array<Array<String>> (readonly)
Returns the executed commands as an array where each item is again an array containing an executed command in the first element and its arguments in the remaining ones.
48 49 50 |
# File 'lib/cheetah.rb', line 48 def commands @commands end |
#status ⇒ Process::Status (readonly)
Returns the executed command exit status.
51 52 53 |
# File 'lib/cheetah.rb', line 51 def status @status end |
#stderr ⇒ String? (readonly)
Returns the output the executed command wrote to stderr; can be ‘nil` if stderr was captured into a stream.
59 60 61 |
# File 'lib/cheetah.rb', line 59 def stderr @stderr end |
#stdout ⇒ String? (readonly)
Returns the output the executed command wrote to stdout; can be ‘nil` if stdout was captured into a stream.
55 56 57 |
# File 'lib/cheetah.rb', line 55 def stdout @stdout end |