Class: Nextbus::Direction
- Inherits:
-
Object
- Object
- Nextbus::Direction
- Includes:
- AttrWithDefault, InstantiateWithAttrs
- Defined in:
- lib/nextbus/direction.rb
Class Method Summary collapse
Methods included from AttrWithDefault
Methods included from InstantiateWithAttrs
Class Method Details
.all(agency_id, route_id) ⇒ Object
9 10 11 |
# File 'lib/nextbus/direction.rb', line 9 def self.all(agency_id, route_id) Nextbus.client.directions(agency_id, route_id).map{|direction| new(direction) } end |
.find(agency_id, route_id, id) ⇒ Object
13 14 15 |
# File 'lib/nextbus/direction.rb', line 13 def self.find(agency_id, route_id, id) all(agency_id, route_id).detect{|direction| direction.tag == id } end |