Class: OpenTopo::Services::ResponseToPointConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/open_topo/services/response_to_point_converter.rb

Class Method Summary collapse

Class Method Details

.call(response) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/open_topo/services/response_to_point_converter.rb', line 6

def self.call(response)
  Point.new(
    long: response.body[:Location][:Longitude],
    lat: response.body[:Location][:Latitude],
    heigh: response.body[:Elevation],
    unit: response.body[:Unit]
  )
end