Exception: Bazil::ConnectionError

Inherits:
BazilError
  • Object
show all
Defined in:
lib/bazil/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BazilError

#inspect

Constructor Details

#initialize(method, address, port) ⇒ ConnectionError

Returns a new instance of ConnectionError.



11
12
13
14
15
# File 'lib/bazil/error.rb', line 11

def initialize(method, address, port)
  @method = method
  @address = address
  @port = port
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



9
10
11
# File 'lib/bazil/error.rb', line 9

def address
  @address
end

#methodObject (readonly)

Returns the value of attribute method.



9
10
11
# File 'lib/bazil/error.rb', line 9

def method
  @method
end

#portObject (readonly)

Returns the value of attribute port.



9
10
11
# File 'lib/bazil/error.rb', line 9

def port
  @port
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/bazil/error.rb', line 17

def to_s
  "Failed to connect to the server at #{@method} method: server = #{@address}:#{@port}"
end