Class: ICSP::ShellResult

Inherits:
Object
  • Object
show all
Defined in:
lib/shell_result.rb

Overview

ShellResult

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ok:, exit_code:, output:, output_lines:, csp_error_code:) ⇒ ShellResult

Returns a new instance of ShellResult.



6
7
8
9
10
11
12
# File 'lib/shell_result.rb', line 6

def initialize(ok:, exit_code:, output:, output_lines:, csp_error_code:)
  @ok = ok
  @exit_code = exit_code
  @output = output
  @output_lines = output_lines
  @csp_error_code = csp_error_code
end

Instance Attribute Details

#csp_error_codeObject (readonly)

Returns the value of attribute csp_error_code.



14
15
16
# File 'lib/shell_result.rb', line 14

def csp_error_code
  @csp_error_code
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



14
15
16
# File 'lib/shell_result.rb', line 14

def exit_code
  @exit_code
end

#okObject (readonly)

Returns the value of attribute ok.



14
15
16
# File 'lib/shell_result.rb', line 14

def ok
  @ok
end

#outputObject (readonly)

Returns the value of attribute output.



14
15
16
# File 'lib/shell_result.rb', line 14

def output
  @output
end

#output_linesObject (readonly)

Returns the value of attribute output_lines.



14
15
16
# File 'lib/shell_result.rb', line 14

def output_lines
  @output_lines
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/shell_result.rb', line 16

def to_s
  output
end