Class: CommandIssuer::CommandResult

Inherits:
Object
  • Object
show all
Defined in:
lib/get/commons/command_issuer.rb

Overview

A class containing the result of a command, including the exit status and the command executed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command_string, exit_status, standard_output, standard_error) ⇒ CommandResult

Returns a new instance of CommandResult.



28
29
30
31
32
33
# File 'lib/get/commons/command_issuer.rb', line 28

def initialize(command_string, exit_status, standard_output, standard_error)
  @command = command_string
  @exit_status = exit_status
  @output = standard_output
  @error = standard_error
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



26
27
28
# File 'lib/get/commons/command_issuer.rb', line 26

def command
  @command
end

#errorObject (readonly)

Returns the value of attribute error.



26
27
28
# File 'lib/get/commons/command_issuer.rb', line 26

def error
  @error
end

#exit_statusObject (readonly)

Returns the value of attribute exit_status.



26
27
28
# File 'lib/get/commons/command_issuer.rb', line 26

def exit_status
  @exit_status
end

#outputObject (readonly)

Returns the value of attribute output.



26
27
28
# File 'lib/get/commons/command_issuer.rb', line 26

def output
  @output
end