Class: Geodesic::Position
- Inherits:
-
Object
- Object
- Geodesic::Position
- Defined in:
- lib/geodesic.rb
Overview
Class to hold the latitude and longitude of a position.
Instance Attribute Summary collapse
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
Instance Method Summary collapse
-
#initialize(lat, lon) ⇒ Position
constructor
Construct a position with a given latitude and longitude.
Constructor Details
#initialize(lat, lon) ⇒ Position
Construct a position with a given latitude and longitude.
55 56 57 58 |
# File 'lib/geodesic.rb', line 55 def initialize(lat, lon) @lat = lat @lon = lon end |
Instance Attribute Details
#lat ⇒ Object
Returns the value of attribute lat.
51 52 53 |
# File 'lib/geodesic.rb', line 51 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
52 53 54 |
# File 'lib/geodesic.rb', line 52 def lon @lon end |