class Openweather2::Weather

Attributes

city[R]
clouds[R]
humidity[R]
latitude[R]
longitude[R]
max_temperature[R]
min_temperature[R]
pressure[R]
temperature[R]
wind_angle[R]
wind_speed[R]

Public Class Methods

new(json) click to toggle source
# File lib/openweather2/weather.rb, line 7
def initialize(json)
  @city = json['name']
  @longitude = json['coord'] && json['coord']['lon']
  @latitude = json['coord'] && json['coord']['lat']
  @temperature = json['main']['temp']
  @pressure = json['main']['pressure']
  @humidity = json['main']['humidity']
  @min_temperature = json['main']['temp_min']
  @max_temperature = json['main']['temp_max']
  @clouds = json['clouds']['all']
  @wind_speed = json['wind']['speed']
  @wind_angle = json['wind']['deg']
end