Class: EarthTools::Sun::Twilight

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Twilight

Returns a new instance of Twilight.



6
7
8
9
10
11
# File 'lib/earth_tools/sun/twilight.rb', line 6

def initialize(attrs = {})
  attrs ||= {}
  @civil = attrs['civil']
  @nautical = attrs['nautical']
  @astronomical = attrs['astronomical']
end

Instance Attribute Details

#astronomicalObject

Returns the value of attribute astronomical.



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

def astronomical
  @astronomical
end

#civilObject

Returns the value of attribute civil.



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

def civil
  @civil
end

#nauticalObject

Returns the value of attribute nautical.



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

def nautical
  @nautical
end