Class: Barometer::WeatherBug::Response::CurrentWeather

Inherits:
Object
  • Object
show all
Defined in:
lib/barometer/weather_bug/response/current_weather.rb

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CurrentWeather

Returns a new instance of CurrentWeather.



5
6
7
8
# File 'lib/barometer/weather_bug/response/current_weather.rb', line 5

def initialize(payload)
  @payload = payload
  @current = Barometer::Response::Current.new
end

Instance Method Details

#parseObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/barometer/weather_bug/response/current_weather.rb', line 10

def parse
  current.observed_at = observed_at
  current.humidity = humidity
  current.icon = icon
  current.temperature = temperature
  current.dew_point = dew_point
  current.wind = wind

  current
end