Method: TollBooth::Route.find
- Defined in:
- lib/toll_booth/route.rb
.find(origin, destinations) ⇒ TollBooth::RouteCollection
get driving directions from the origin to the specified destination(s)
16 17 18 19 20 21 22 23 |
# File 'lib/toll_booth/route.rb', line 16 def find(origin, destinations) response = get("", :query => {:q => "from: #{origin.description} " + destinations.collect{|d| " to: #{d.description}"}.join("")}) routes = parse(response) routes end |