Skip to content

Instantly share code, notes, and snippets.

@progapandist
Last active December 20, 2016 12:27
Show Gist options
  • Select an option

  • Save progapandist/9d8e4b0d5d2a363c40d1f57939a4e8bf to your computer and use it in GitHub Desktop.

Select an option

Save progapandist/9d8e4b0d5d2a363c40d1f57939a4e8bf to your computer and use it in GitHub Desktop.
def process_coordinates
handle_api_request do |api_response, message|
coord = extract_coordinates(api_response)
message.reply(text: "Latitude: #{coord['lat']} / Longitude: #{coord['lng']}")
end
end
def show_full_address
handle_api_request do |api_response, message|
full_address = extract_full_address(api_response)
message.reply(text: full_address)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment