Class: Yweather::Astronomy
- Inherits:
-
Object
- Object
- Yweather::Astronomy
- Defined in:
- lib/yweather/astronomy.rb
Instance Attribute Summary collapse
-
#sunrise ⇒ Object
readonly
Returns the value of attribute sunrise.
-
#sunset ⇒ Object
readonly
Returns the value of attribute sunset.
Instance Method Summary collapse
-
#initialize(data) ⇒ Astronomy
constructor
A new instance of Astronomy.
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
#sunrise ⇒ Object (readonly)
Returns the value of attribute sunrise.
3 4 5 |
# File 'lib/yweather/astronomy.rb', line 3 def sunrise @sunrise end |
#sunset ⇒ Object (readonly)
Returns the value of attribute sunset.
4 5 6 |
# File 'lib/yweather/astronomy.rb', line 4 def sunset @sunset end |