Class: YahooWeather::Astronomy

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo-weather.rb

Overview

Describes astronomy information for a particular location.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Astronomy

Returns a new instance of Astronomy.



34
35
36
37
# File 'lib/yahoo-weather.rb', line 34

def initialize (payload)
  @sunrise = YahooWeather._parse_time(payload['sunrise'])
  @sunset = YahooWeather._parse_time(payload['sunset'])
end

Instance Attribute Details

#sunriseObject (readonly)

a Time object detailing the sunrise time for a location.



29
30
31
# File 'lib/yahoo-weather.rb', line 29

def sunrise
  @sunrise
end

#sunsetObject (readonly)

a Time object detailing the sunset time for a location.



32
33
34
# File 'lib/yahoo-weather.rb', line 32

def sunset
  @sunset
end