Class: KML::Track

Inherits:
Object
  • Object
show all
Defined in:
lib/gpx_kml/kml/track.rb

Overview

Docu

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(track) ⇒ Track

Returns a new instance of Track.



4
5
6
7
8
9
10
11
12
# File 'lib/gpx_kml/kml/track.rb', line 4

def initialize(track)
  return unless track.is_a?(Nokogiri::XML::Element) && !track.xpath('self::xmlns:LineString').empty?

  @node = track
  @name = _name
  @points = _points
  @author = _author
  @link = _link
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



14
15
16
# File 'lib/gpx_kml/kml/track.rb', line 14

def author
  @author
end

Returns the value of attribute link.



14
15
16
# File 'lib/gpx_kml/kml/track.rb', line 14

def link
  @link
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/gpx_kml/kml/track.rb', line 14

def name
  @name
end

#pointsObject (readonly)

Returns the value of attribute points.



14
15
16
# File 'lib/gpx_kml/kml/track.rb', line 14

def points
  @points
end