Class: Dotter::LatLng

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lat, lng) ⇒ LatLng

Returns a new instance of LatLng.



6
7
8
# File 'lib/dotter/lat_lng.rb', line 6

def initialize(lat, lng)
  @lat, @lng = lat.to_f, lng.to_f
end

Instance Attribute Details

#latObject Also known as: latitude

Returns the value of attribute lat.



2
3
4
# File 'lib/dotter/lat_lng.rb', line 2

def lat
  @lat
end

#lngObject Also known as: longitude

Returns the value of attribute lng.



2
3
4
# File 'lib/dotter/lat_lng.rb', line 2

def lng
  @lng
end