class Muni::Prediction

Public Instance Methods

pretty_time() click to toggle source
# File lib/muni/prediction.rb, line 10
def pretty_time
  if time > Time.now
    distance_of_time_in_words_to_now(time)
  elsif time < Time.now
    time_ago_in_words(time)
  else
    "Arriving"
  end
end
time() click to toggle source
# File lib/muni/prediction.rb, line 6
def time
  Time.at((epochTime.to_i / 1000.0).to_i)
end