Class: Regio::ReverseGeocode

Inherits:
Core
  • Object
show all
Defined in:
lib/regio/reverse_geocode.rb

Constant Summary

Constants inherited from Core

Core::COMPONENTS

Instance Attribute Summary

Attributes inherited from Core

#options

Instance Method Summary collapse

Methods inherited from Core

#initialize, #run

Constructor Details

This class inherits a constructor from Regio::Core

Instance Method Details

#resultsObject

Raises:



5
6
7
8
9
10
11
# File 'lib/regio/reverse_geocode.rb', line 5

def results
  raise Unprocessable, response[:message] if response[:message]

  response.merge(
    collection: response[:data]&.map { |result| transform(result) } || []
  )
end