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
38 39 40 41 |
# File 'lib/openweathermap/classes.rb', line 38 def initialize(lon, lat) @lon = lon @lat = lat end |
Instance Attribute Details
#lat ⇒ Float (readonly)
Returns Latitude of the location.
32 33 34 |
# File 'lib/openweathermap/classes.rb', line 32 def lat @lat end |
#lon ⇒ Float (readonly)
Returns Longitude of the location.
29 30 31 |
# File 'lib/openweathermap/classes.rb', line 29 def lon @lon end |