Class: KML::Track
- Inherits:
-
Object
- Object
- KML::Track
- Defined in:
- lib/gpx_kml/kml/track.rb
Overview
Docu
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#points ⇒ Object
readonly
Returns the value of attribute points.
Instance Method Summary collapse
-
#initialize(track) ⇒ Track
constructor
A new instance of Track.
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 = @link = _link end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
14 15 16 |
# File 'lib/gpx_kml/kml/track.rb', line 14 def @author end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
14 15 16 |
# File 'lib/gpx_kml/kml/track.rb', line 14 def link @link end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/gpx_kml/kml/track.rb', line 14 def name @name end |
#points ⇒ Object (readonly)
Returns the value of attribute points.
14 15 16 |
# File 'lib/gpx_kml/kml/track.rb', line 14 def points @points end |