Class: Bio::CommandResult

Inherits:
Object
  • Object
show all
Defined in:
lib/bio-commandeer/commandeer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commandObject

Returns the value of attribute command.



47
48
49
# File 'lib/bio-commandeer/commandeer.rb', line 47

def command
  @command
end

#statusObject

Returns the value of attribute status.



47
48
49
# File 'lib/bio-commandeer/commandeer.rb', line 47

def status
  @status
end

#stderrObject

Returns the value of attribute stderr.



47
48
49
# File 'lib/bio-commandeer/commandeer.rb', line 47

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout.



47
48
49
# File 'lib/bio-commandeer/commandeer.rb', line 47

def stdout
  @stdout
end

Instance Method Details

#raise_if_failedObject



49
50
51
52
53
# File 'lib/bio-commandeer/commandeer.rb', line 49

def raise_if_failed
  if @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