Exception: Babushka::Shell::ShellCommandFailed
- Defined in:
- lib/babushka/shell.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(cmd, stdout, stderr) ⇒ ShellCommandFailed
constructor
A new instance of ShellCommandFailed.
Constructor Details
#initialize(cmd, stdout, stderr) ⇒ ShellCommandFailed
Returns a new instance of ShellCommandFailed.
9 10 11 12 13 14 15 16 17 |
# File 'lib/babushka/shell.rb', line 9 def initialize cmd, stdout, stderr @cmd, @stdout, @stderr = cmd, stdout, stderr = if stderr.empty? "Shell command failed: '#{cmd.join(' ')}'" else "Shell command failed: '#{cmd.join(' ')}':\n#{stderr}" end super end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
8 9 10 |
# File 'lib/babushka/shell.rb', line 8 def cmd @cmd end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
8 9 10 |
# File 'lib/babushka/shell.rb', line 8 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
8 9 10 |
# File 'lib/babushka/shell.rb', line 8 def stdout @stdout end |