Class: EarthTools::Sun::Morning

Inherits:
Object
  • Object
show all
Defined in:
lib/earth_tools/sun/morning.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#sunriseObject

Returns the value of attribute sunrise.



4
5
6
# File 'lib/earth_tools/sun/morning.rb', line 4

def sunrise
  @sunrise
end

#twilightObject

Returns the value of attribute twilight.



4
5
6
# File 'lib/earth_tools/sun/morning.rb', line 4

def twilight
  @twilight
end