Class: TF1Converter::Gpx::Trackpoint
- Inherits:
-
Object
- Object
- TF1Converter::Gpx::Trackpoint
- Defined in:
- lib/tf1_converter/gpx/trackpoint.rb
Instance Method Summary collapse
-
#initialize(xml_node) ⇒ Trackpoint
constructor
A new instance of Trackpoint.
- #lat ⇒ Object
- #long ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(xml_node) ⇒ Trackpoint
Returns a new instance of Trackpoint.
4 5 6 |
# File 'lib/tf1_converter/gpx/trackpoint.rb', line 4 def initialize(xml_node) @node = xml_node end |
Instance Method Details
#lat ⇒ Object
8 9 10 |
# File 'lib/tf1_converter/gpx/trackpoint.rb', line 8 def lat @node.attribute('lat').value.strip end |
#long ⇒ Object
12 13 14 |
# File 'lib/tf1_converter/gpx/trackpoint.rb', line 12 def long @node.attribute('lon').value.strip end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/tf1_converter/gpx/trackpoint.rb', line 16 def to_s "" << long << ',' << lat << ',0' end |