Exception: GoogleMapsGeocoder::GeocodingError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- GoogleMapsGeocoder::GeocodingError
- Defined in:
- lib/google_maps_geocoder.rb
Overview
A geocoding error returned by Google Maps.
Instance Attribute Summary collapse
-
#json ⇒ Hash
readonly
Returns the complete JSON response from Google Maps as a Hash.
Instance Method Summary collapse
-
#initialize(json = {}, logger:) ⇒ GeocodingError
constructor
Initialize a GeocodingError wrapping the JSON returned by Google Maps.
Constructor Details
#initialize(json = {}, logger:) ⇒ GeocodingError
Initialize a GeocodingError wrapping the JSON returned by Google Maps.
126 127 128 129 130 131 132 |
# File 'lib/google_maps_geocoder.rb', line 126 def initialize(json = {}, logger:) @json = json if ( = @json['error_message']) logger.error "GeocodingError.new: #{}" end super(@json) end |
Instance Attribute Details
#json ⇒ Hash (readonly)
Returns the complete JSON response from Google Maps as a Hash.
119 120 121 |
# File 'lib/google_maps_geocoder.rb', line 119 def json @json end |