Class: Quarry::LatLng

Inherits:
Object
  • Object
show all
Defined in:
lib/quarry/lat_lng.rb,
ext/quarry/quarry.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lat_lng) ⇒ LatLng

Returns a new instance of LatLng.


4
5
6
7
# File 'lib/quarry/lat_lng.rb', line 4

def initialize(lat_lng)
  @latitude = lat_lng.shift.to_f
  @longitude = lat_lng.shift.to_f
end

Instance Attribute Details

#latitudeObject

Returns the value of attribute latitude


3
4
5
# File 'lib/quarry/lat_lng.rb', line 3

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude


3
4
5
# File 'lib/quarry/lat_lng.rb', line 3

def longitude
  @longitude
end

Instance Method Details

#to_mgrsObject