Class: AgentHarness::CommandExecutor::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/agent_harness/command_executor.rb

Overview

Result of a command execution

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#durationObject

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



22
23
24
# File 'lib/agent_harness/command_executor.rb', line 22

def duration
  @duration
end

#exit_codeObject

Returns the value of attribute exit_code

Returns:

  • (Object)

    the current value of exit_code



22
23
24
# File 'lib/agent_harness/command_executor.rb', line 22

def exit_code
  @exit_code
end

#stderrObject

Returns the value of attribute stderr

Returns:

  • (Object)

    the current value of stderr



22
23
24
# File 'lib/agent_harness/command_executor.rb', line 22

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



22
23
24
# File 'lib/agent_harness/command_executor.rb', line 22

def stdout
  @stdout
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/agent_harness/command_executor.rb', line 27

def failed?
  !success?
end

#success?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/agent_harness/command_executor.rb', line 23

def success?
  exit_code == 0
end