toll_booth

@origin = TollBooth::Location.new("4 Yawkey Way, Boston, MA")
@destination = TollBooth::Location.new("1 Fleetcenter Place, Boston, MA")
@routes = @origin.drive_to(@destination)
if @routes.found?
  @routes[0].distance              #distance in miles
  @routes[0].drive_time            #drive time in seconds
  @routes[0].name                  #name of route (usually specified when multiple routes are returned)
  @routes[0].steps                 #array of TollBooth::Steps to take
  @routes[0].steps[0].distance     #distance of step in miles
  @routes[0].steps[0].description  #summary of step
else
  puts @routes.errors.join(",")
end

Links of Interest

* Issue Tracker http://github.com/dpickett/toll_booth/issues
* RDoc http://rdoc.info/projects/dpickett/toll_booth
* WWR Profile (please recommend me if you find this software useful) http://workingwithrails.com/person/8076-dan-pickett

TODO

* Allow Configuration for Key
* Some unit testing with FakeWeb for 100% coverage
* Fix distance parsing for when distance is expressed in ft
* public transit directions
* Walking directions

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history.

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2009 Dan Pickett. See LICENSE for details.