Class: EarthTools::Sun::Morning
- Inherits:
-
Object
- Object
- EarthTools::Sun::Morning
- Defined in:
- lib/earth_tools/sun/morning.rb
Instance Attribute Summary collapse
-
#sunrise ⇒ Object
Returns the value of attribute sunrise.
-
#twilight ⇒ Object
Returns the value of attribute twilight.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Morning
constructor
A new instance of Morning.
Constructor Details
#initialize(attrs = {}) ⇒ Morning
Returns a new instance of Morning.
6 7 8 9 10 |
# File 'lib/earth_tools/sun/morning.rb', line 6 def initialize(attrs = {}) attrs ||= {} @sunrise = attrs['sunrise'] @twilight = EarthTools::Sun::Twilight.new(attrs['twilight']) end |
Instance Attribute Details
#sunrise ⇒ Object
Returns the value of attribute sunrise.
4 5 6 |
# File 'lib/earth_tools/sun/morning.rb', line 4 def sunrise @sunrise end |
#twilight ⇒ Object
Returns the value of attribute twilight.
4 5 6 |
# File 'lib/earth_tools/sun/morning.rb', line 4 def twilight @twilight end |