Class: GPX::Segment
- Inherits:
-
Object
- Object
- GPX::Segment
- Defined in:
- lib/gpx_kml/gpx/segment.rb
Instance Attribute Summary collapse
-
#points ⇒ Object
readonly
Returns the value of attribute points.
-
#track ⇒ Object
readonly
Returns the value of attribute track.
Instance Method Summary collapse
-
#initialize(segment, track) ⇒ Segment
constructor
A new instance of Segment.
Constructor Details
#initialize(segment, track) ⇒ Segment
Returns a new instance of Segment.
9 10 11 12 13 14 15 |
# File 'lib/gpx_kml/gpx/segment.rb', line 9 def initialize(segment, track) return unless segment.is_a?(Nokogiri::XML::Element) && track.is_a?(GPX::Track) return if segment.xpath('self::xmlns:trkseg').empty? @points = _points segment @track = track end |
Instance Attribute Details
#points ⇒ Object (readonly)
Returns the value of attribute points.
17 18 19 |
# File 'lib/gpx_kml/gpx/segment.rb', line 17 def points @points end |
#track ⇒ Object (readonly)
Returns the value of attribute track.
17 18 19 |
# File 'lib/gpx_kml/gpx/segment.rb', line 17 def track @track end |