Exception: SSHake::ExecutionError

Inherits:
Error
  • Object
show all
Defined in:
lib/sshake/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ExecutionError

Returns a new instance of ExecutionError.



10
11
12
# File 'lib/sshake/error.rb', line 10

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



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

def response
  @response
end

Instance Method Details

#messageObject



20
21
22
23
# File 'lib/sshake/error.rb', line 20

def message
  "Failed to execute command: #{@response.command} " \
    "(stderr: #{@response.stderr}) (exit code: #{@response.exit_code})"
end

#to_sObject



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

def to_s
  message
end