Class: Muni::Prediction
- Includes:
- ActionView::Helpers::DateHelper
- Defined in:
- lib/muni/prediction.rb
Instance Method Summary collapse
Instance Method Details
#pretty_time ⇒ Object
10 11 12 13 14 15 16 17 18 |
# 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 ⇒ Object
6 7 8 |
# File 'lib/muni/prediction.rb', line 6 def time Time.at((epochTime.to_i / 1000.0).to_i) end |