Exception: Armature::Run::CommandFailureError
- Defined in:
- lib/armature/run.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, command, output) ⇒ CommandFailureError
constructor
A new instance of CommandFailureError.
- #to_s ⇒ Object
Constructor Details
#initialize(status, command, output) ⇒ CommandFailureError
Returns a new instance of CommandFailureError.
12 13 14 15 16 17 |
# File 'lib/armature/run.rb', line 12 def initialize(status, command, output) @status = status @command = command @output = output super("Command '#{@command.first}' failed with #{@status}") end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
9 10 11 |
# File 'lib/armature/run.rb', line 9 def command @command end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
10 11 12 |
# File 'lib/armature/run.rb', line 10 def output @output end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/armature/run.rb', line 8 def status @status end |
Instance Method Details
#to_s ⇒ Object
19 20 21 22 |
# File 'lib/armature/run.rb', line 19 def to_s command_str = Armature::Run.command_to_string(@command) "Command failed: #{command_str}\nReturn: #{@status}\nOutput:\n#{@output}\n" end |