Class: GPX::TrackPoint
Overview
Basically the same as a point, the TrackPoint class is supposed to represent the points that are children of Segment elements. So, the only real difference is that TrackPoints hold a reference to their parent Segments.
Constant Summary
Constants inherited from Point
Instance Attribute Summary collapse
-
#segment ⇒ Object
Returns the value of attribute segment.
Attributes inherited from Point
#elevation, #lat, #lon, #time
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ TrackPoint
constructor
A new instance of TrackPoint.
Methods inherited from Point
#lat_lon, #latr, #lon_lat, #lonr, #to_xml
Methods inherited from Base
#instantiate_with_text_elements
Constructor Details
#initialize(opts = {}) ⇒ TrackPoint
Returns a new instance of TrackPoint.
30 31 32 33 |
# File 'lib/gpx/trackpoint.rb', line 30 def initialize(opts = {}) super(opts) @segment = opts[:segment] end |
Instance Attribute Details
#segment ⇒ Object
Returns the value of attribute segment.
29 30 31 |
# File 'lib/gpx/trackpoint.rb', line 29 def segment @segment end |