Class: Nextbus::Prediction
- Inherits:
-
Object
- Object
- Nextbus::Prediction
- Includes:
- AttrWithDefault, InstantiateWithAttrs
- Defined in:
- lib/nextbus/prediction.rb
Instance Attribute Summary collapse
-
#departure ⇒ Object
Returns the value of attribute departure.
-
#stop ⇒ Object
Returns the value of attribute stop.
-
#time ⇒ Object
Returns the value of attribute time.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from AttrWithDefault
Methods included from InstantiateWithAttrs
Instance Attribute Details
#departure ⇒ Object
Returns the value of attribute departure.
7 8 9 |
# File 'lib/nextbus/prediction.rb', line 7 def departure @departure end |
#stop ⇒ Object
Returns the value of attribute stop.
7 8 9 |
# File 'lib/nextbus/prediction.rb', line 7 def stop @stop end |
#time ⇒ Object
Returns the value of attribute time.
7 8 9 |
# File 'lib/nextbus/prediction.rb', line 7 def time @time end |
Class Method Details
Instance Method Details
#epoch_time=(nanosecs) ⇒ Object
9 10 11 |
# File 'lib/nextbus/prediction.rb', line 9 def epoch_time=(nanosecs) self.time = Time.at(nanosecs.to_i/1000) end |