Class: Muni::Stop

Inherits:
Base
  • Object
show all
Defined in:
lib/muni/stop.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) predictions



6
7
8
9
10
11
# File 'lib/muni/stop.rb', line 6

def predictions
  document = Stop.send(:fetch, :predictions, {:r => route_tag, :d => direction, :s => tag})
  document['predictions'].first['direction'].first['prediction'].collect do |pred|
    Prediction.new(pred)
  end
end