Module: GeoPoint::Shared

Included in:
GeoPoint, ClassMethods
Defined in:
lib/geo_point/shared.rb

Instance Method Summary collapse

Instance Method Details

#coord_mode=(mode) ⇒ Object

Raises:

  • (ArgumentException)


12
13
14
15
# File 'lib/geo_point/shared.rb', line 12

def coord_mode= mode
  raise ArgumentException, "Not a valid coordinates mode: #{mode}" unless valid_mode? mode
  @coord_mode = mode
end

#earth_radius_km=(radius_km) ⇒ Object

Raises:

  • (ArgumentException)


7
8
9
10
# File 'lib/geo_point/shared.rb', line 7

def earth_radius_km= radius_km
  raise ArgumentException, "Not a valid earth km radius: #{radius_km}" unless valid_earth_radius? radius_km
  @earth_radius_km = radius_km
end

#unitObject



3
4
5
# File 'lib/geo_point/shared.rb', line 3

def unit
  :degrees
end