Class: Buddhy::Plugins::BartDepartures
- Inherits:
-
Object
- Object
- Buddhy::Plugins::BartDepartures
- Defined in:
- lib/buddhy/plugins/bart_departures.rb
Class Method Summary collapse
Class Method Details
.execute ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/buddhy/plugins/bart_departures.rb', line 7 def self.execute station = Bart::Station.new('powl') station.load_departures station.departures.map do |departure| "#{departure.destination.name}: " + departure.estimates.map { |e| e.time.strftime("%I:%M") }.join(", ") end end |