Class: Barometer::WeatherService::WeatherBug::Response::Sun

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

Instance Method Summary collapse

Constructor Details

#initialize(payload, timezone) ⇒ Sun

Returns a new instance of Sun.



8
9
10
11
# File 'lib/barometer/weather_services/weather_bug/response/sun.rb', line 8

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

Instance Method Details

#parseObject



13
14
15
# File 'lib/barometer/weather_services/weather_bug/response/sun.rb', line 13

def parse
  Data::Sun.new(rise: local_sunrise_time, set: local_sunset_time)
end