Sha256: 7595e42400bf442a59c8df28c856300c1c13848ba82470a741f17c1c37c34515
Contents?: true
Size: 469 Bytes
Versions: 2
Compression:
Stored size: 469 Bytes
Contents
module Nextbus class Stop include InstantiateWithAttrs include AttrWithDefault attr_accessor :tag, :title, :lat, :lon, :id, :direction, :predictions => [] def self.all(agency_id, route_id, direction_id) Nextbus.client.stops(agency_id, route_id, direction_id).map{|stop| new(stop) } end def self.find(agency_id, route_id, direction_id, id) all(agency_id, route_id, direction_id).detect{|stop| stop.tag == id } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nextbus-0.0.1 | lib/nextbus/stop.rb |
nextbus-0.0.0 | lib/nextbus/stop.rb |