Class: Warpaint::PointCollection
- Inherits:
-
OrderedCollection
- Object
- RBTree
- OrderedCollection
- Warpaint::PointCollection
- Defined in:
- lib/warpaint/point_collection.rb
Instance Method Summary collapse
- #add_track_point(point) ⇒ Object
-
#initialize(time_adjustment = 0) ⇒ PointCollection
constructor
A new instance of PointCollection.
Methods inherited from OrderedCollection
Constructor Details
#initialize(time_adjustment = 0) ⇒ PointCollection
Returns a new instance of PointCollection.
5 6 7 8 |
# File 'lib/warpaint/point_collection.rb', line 5 def initialize(time_adjustment = 0) @time_adjustment = time_adjustment super end |
Instance Method Details
#add_track_point(point) ⇒ Object
10 11 12 |
# File 'lib/warpaint/point_collection.rb', line 10 def add_track_point(point) self[point[:time] + @time_adjustment] = { :lat => point[:lat], :lon => point[:lon] } end |