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