Exception: Gofer::HostError

Inherits:
Exception
  • Object
show all
Defined in:
lib/gofer/host_error.rb

Overview

An error encountered performing a Gofer command

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, response, message) ⇒ HostError

Returns a new instance of HostError.


11
12
13
14
15
# File 'lib/gofer/host_error.rb', line 11

def initialize host, response, message
  @host = host
  @response = response
  super "#{host.hostname}: #{message}"
end

Instance Attribute Details

#hostObject (readonly)

Instance of Gofer::Host that raised the error


6
7
8
# File 'lib/gofer/host_error.rb', line 6

def host
  @host
end

#responseObject (readonly)

Instance of Gofer::Response encapsulating the error output


9
10
11
# File 'lib/gofer/host_error.rb', line 9

def response
  @response
end