Class: Nextbus::Agency

Inherits:
Object
  • Object
show all
Includes:
AttrWithDefault, InstantiateWithAttrs
Defined in:
lib/nextbus/agency.rb

Class Method Summary collapse

Methods included from AttrWithDefault

included

Methods included from InstantiateWithAttrs

#initialize

Class Method Details

.allObject



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