Exception: Mimas::SSH::Session::NonZeroExitCode

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mimas/ssh.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command:, exit_code:, output:) ⇒ NonZeroExitCode

Returns a new instance of NonZeroExitCode.



10
11
12
13
14
# File 'lib/mimas/ssh.rb', line 10

def initialize(command:, exit_code:, output:)
  @command = command
  @exit_code = exit_code
  @output = output
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



9
10
11
# File 'lib/mimas/ssh.rb', line 9

def exit_code
  @exit_code
end

#outputObject (readonly)

Returns the value of attribute output.



9
10
11
# File 'lib/mimas/ssh.rb', line 9

def output
  @output
end

Instance Method Details

#to_sObject



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

def to_s
  "'#{@command}' exited with code: #{@exit_code}"
end