Class: Bio::CommandResult
- Inherits:
-
Object
- Object
- Bio::CommandResult
- Defined in:
- lib/bio-commandeer/commandeer.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#status ⇒ Object
Returns the value of attribute status.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
-
#timed_out ⇒ Object
Returns the value of attribute timed_out.
Instance Method Summary collapse
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
56 57 58 |
# File 'lib/bio-commandeer/commandeer.rb', line 56 def command @command end |
#status ⇒ Object
Returns the value of attribute status.
56 57 58 |
# File 'lib/bio-commandeer/commandeer.rb', line 56 def status @status end |
#stderr ⇒ Object
Returns the value of attribute stderr.
56 57 58 |
# File 'lib/bio-commandeer/commandeer.rb', line 56 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
56 57 58 |
# File 'lib/bio-commandeer/commandeer.rb', line 56 def stdout @stdout end |
#timed_out ⇒ Object
Returns the value of attribute timed_out.
56 57 58 |
# File 'lib/bio-commandeer/commandeer.rb', line 56 def timed_out @timed_out end |
Instance Method Details
#raise_if_failed ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/bio-commandeer/commandeer.rb', line 58 def raise_if_failed if @timed_out raise Bio::CommandFailedException, "Command timed out. Command run was #{command}." elsif @status.exitstatus != 0 raise Bio::CommandFailedException, "Command returned non-zero exit status (#{@status.exitstatus}), likely indicating failure. Command run was #{@command} and the STDERR was:\n#{@stderr}\nSTDOUT was: #{@stdout}" end end |