Exception: AddressGeocoder::ConnectionError

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

Overview

Class that defines an error representing a failure in connection with a third party Maps API

Since:

  • 0.0.1

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ ConnectionError

Returns a new instance of ConnectionError.

Since:

  • 0.0.1



22
23
24
# File 'lib/address_geocoder/error.rb', line 22

def initialize(msg = nil)
  @msg = msg
end

Instance Method Details

#messageObject

Since:

  • 0.0.1



26
27
28
29
# File 'lib/address_geocoder/error.rb', line 26

def message
  msg = 'Failed To Connect'
  @msg ? "#{msg}: #{@msg}" : msg
end