Class: GPX::GeoPoint
- Inherits:
-
Object
- Object
- GPX::GeoPoint
- Defined in:
- lib/gpx/geopoint.rb
Overview
Class holds coordinates and elevation of single point
Instance Attribute Summary collapse
-
#elevation ⇒ Object
Returns the value of attribute elevation.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
Instance Method Summary collapse
-
#initialize(latitude: latitude, longitude: longitude, elevation: elevation) ⇒ GeoPoint
constructor
A new instance of GeoPoint.
Constructor Details
#initialize(latitude: latitude, longitude: longitude, elevation: elevation) ⇒ GeoPoint
Returns a new instance of GeoPoint.
6 7 8 9 10 |
# File 'lib/gpx/geopoint.rb', line 6 def initialize(latitude: latitude, longitude:longitude, elevation:elevation) self.latitude = latitude self.longitude = longitude self.elevation = elevation end |
Instance Attribute Details
#elevation ⇒ Object
Returns the value of attribute elevation.
4 5 6 |
# File 'lib/gpx/geopoint.rb', line 4 def elevation @elevation end |
#latitude ⇒ Object
Returns the value of attribute latitude.
4 5 6 |
# File 'lib/gpx/geopoint.rb', line 4 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
4 5 6 |
# File 'lib/gpx/geopoint.rb', line 4 def longitude @longitude end |