class OpenWeatherMap::City

Class representing a city

Attributes

coordinates[R]

@return [Coordinates] City's coordinates

country[R]

@return [String] Country in which the city is

name[R]

@return [String] City's name

Public Class Methods

new(name, lon, lat, country) click to toggle source

Create a new City object

@param name [String] City's name @param lon [Float] Longitude of the city @param lat [Float] Latitude of the city @param country [String] Country in which the city is

# File lib/openweathermap/classes.rb, line 33
def initialize(name, lon, lat, country)
  @name = name
  @coordinates = OpenWeatherMap::Coordinates.new(lon, lat)
  @country = country
end