Class: Barometer::WeatherService::WundergroundV1::Response::Sun

Inherits:
Object
  • Object
show all
Defined in:
lib/barometer/weather_services/wunderground_v1/response/sun.rb

Instance Method Summary collapse

Constructor Details

#initialize(payload, timezone, response) ⇒ Sun

Returns a new instance of Sun



6
7
8
9
10
# File 'lib/barometer/weather_services/wunderground_v1/response/sun.rb', line 6

def initialize(payload, timezone, response)
  @payload = payload
  @timezone = timezone
  @response = response
end

Instance Method Details

#parseObject



12
13
14
# File 'lib/barometer/weather_services/wunderground_v1/response/sun.rb', line 12

def parse
  Data::Sun.new(rise: utc_rise_time, set: utc_set_time)
end