Class: Geodesic::Position

Inherits:
Object
  • Object
show all
Defined in:
lib/geodesic.rb

Overview

Class to hold the latitude and longitude of a position.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#latObject

Returns the value of attribute lat.



51
52
53
# File 'lib/geodesic.rb', line 51

def lat
  @lat
end

#lonObject

Returns the value of attribute lon.



52
53
54
# File 'lib/geodesic.rb', line 52

def lon
  @lon
end