Class: Yweather::Astronomy

Inherits:
Object
  • Object
show all
Defined in:
lib/yweather/astronomy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Astronomy

Returns a new instance of Astronomy.



6
7
8
9
# File 'lib/yweather/astronomy.rb', line 6

def initialize(data)
  @sunrise = data[:sunrise]
  @sunset = data[:sunset]
end

Instance Attribute Details

#sunriseObject (readonly)

Returns the value of attribute sunrise.



3
4
5
# File 'lib/yweather/astronomy.rb', line 3

def sunrise
  @sunrise
end

#sunsetObject (readonly)

Returns the value of attribute sunset.



4
5
6
# File 'lib/yweather/astronomy.rb', line 4

def sunset
  @sunset
end