scieslak / distance_finder

Get distance and travel time between almost any two places on the globe.
MIT License
0 stars 0 forks source link

Improve parameter building #1

Open ttrmw opened 7 years ago

ttrmw commented 7 years ago

The approach used here:

https://github.com/scieslak/distance_finder/blob/master/lib/distance_finder/calculator.rb#L70

to build out your query string is a little clunky, and not terribly resistant to change. Can you think of an improvement?

scieslak commented 7 years ago

I have replaced build_url method with build_uri have a look: https://github.com/scieslak/distance_finder/blob/master/lib/distance_finder/calculator.rb#L78 Hope you like the new solution. Thanks.