Module: GeoPosition
- Defined in:
- lib/geo_position.rb,
lib/geo_position/error.rb,
lib/geo_position/parser.rb,
lib/geo_position/version.rb,
lib/geo_position/conversion.rb,
lib/geo_position/parser/dms.rb,
lib/geo_position/conversion/dms.rb,
lib/geo_position/conversion/latitude.rb,
lib/geo_position/conversion/longitude.rb,
lib/geo_position/error/invalid_float_error.rb,
lib/geo_position/error/invalid_degrees_error.rb,
lib/geo_position/error/invalid_minutes_error.rb,
lib/geo_position/error/invalid_seconds_error.rb,
lib/geo_position/error/invalid_latitude_error.rb,
lib/geo_position/error/invalid_direction_error.rb,
lib/geo_position/error/invalid_longitude_error.rb,
lib/geo_position/error/invalid_dms_string_error.rb
Defined Under Namespace
Modules: Conversion, Error, Parser
Constant Summary
collapse
- VERSION =
"0.0.6"
Class Method Summary
collapse
Class Method Details
.from_dms(degrees, minutes, seconds, direction) ⇒ Object
20
21
22
23
|
# File 'lib/geo_position.rb', line 20
def self.from_dms(degrees, minutes, seconds, direction)
conversion = GeoPosition::Conversion::Dms.new(degrees, minutes, seconds, direction)
conversion.to_f
end
|
.from_latitude(latitude) ⇒ Object
25
26
27
28
|
# File 'lib/geo_position.rb', line 25
def self.from_latitude(latitude)
conversion = GeoPosition::Conversion::Latitude.new(latitude)
conversion.to_s
end
|
.from_longitude(longitude) ⇒ Object
30
31
32
33
|
# File 'lib/geo_position.rb', line 30
def self.from_longitude(longitude)
conversion = GeoPosition::Conversion::Longitude.new(longitude)
conversion.to_s
end
|