Module: HelperMethods

Included in:
CitiBikeDirections
Defined in:
lib/citi_bike_directions/helper_methods.rb

Instance Method Summary collapse

Instance Method Details

#address_to_lat_lng(address) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/citi_bike_directions/helper_methods.rb', line 3

def address_to_lat_lng(address)
  result = Geocoder.search(address)
  lat = result.first.data['geometry']['location']['lat']
  lng = result.first.data['geometry']['location']['lng']

  [lat, lng]
end