The Massachusetts Bay Transportation Authority (MBTA), also known as "the T", has an API for querying information about service performance.
- Clone this repository
- Install Ruby if you don't already have it
- Follow the instructions on http://realtime.mbta.com/portal to get an API key (there's an open development key you can use to get started, but please don't abuse it)
- Run
API_KEY={your api key} ruby last_train.rb