Class: OpenWeatherMap::Coordinates
- Inherits:
-
Object
- Object
- OpenWeatherMap::Coordinates
- Defined in:
- lib/openweathermap/classes.rb
Overview
Represents a location’s coordinates
Instance Attribute Summary collapse
-
#lat ⇒ Float
readonly
Latitude of the location.
-
#lon ⇒ Float
readonly
Longitude of the location.
Instance Method Summary collapse
-
#initialize(lon, lat) ⇒ Coordinates
constructor
Create a new Coordinates object.
Constructor Details
#initialize(lon, lat) ⇒ Coordinates
Create a new Coordinates object
61 62 63 64 |
# File 'lib/openweathermap/classes.rb', line 61 def initialize(lon, lat) @lon = lon @lat = lat end |
Instance Attribute Details
#lat ⇒ Float (readonly)
Returns Latitude of the location.
53 54 55 |
# File 'lib/openweathermap/classes.rb', line 53 def lat @lat end |
#lon ⇒ Float (readonly)
Returns Longitude of the location.
48 49 50 |
# File 'lib/openweathermap/classes.rb', line 48 def lon @lon end |