Method: Weather#get_location

Defined in:
lib/cogibara/operators/weather.rb

#get_location(message) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/cogibara/operators/weather.rb', line 19

def get_location(message)
  info = message.structure
  if info[:entities][:location]
    location_to_coordinates(info[:entities][:location][0])
  else
    [43.092, -89.369]
  end
end