Class: Astronoby::TwilightEvent
- Inherits:
-
Object
- Object
- Astronoby::TwilightEvent
- Defined in:
- lib/astronoby/events/twilight_event.rb
Overview
Holds twilight times (civil, nautical, astronomical) for a single day.
Instance Attribute Summary collapse
-
#evening_astronomical_twilight_time ⇒ Time?
readonly
Evening astronomical twilight time.
-
#evening_civil_twilight_time ⇒ Time?
readonly
Evening civil twilight time.
-
#evening_nautical_twilight_time ⇒ Time?
readonly
Evening nautical twilight time.
-
#morning_astronomical_twilight_time ⇒ Time?
readonly
Morning astronomical twilight time.
-
#morning_civil_twilight_time ⇒ Time?
readonly
Morning civil twilight time.
-
#morning_nautical_twilight_time ⇒ Time?
readonly
Morning nautical twilight time.
Instance Method Summary collapse
-
#initialize(morning_civil_twilight_time: nil, evening_civil_twilight_time: nil, morning_nautical_twilight_time: nil, evening_nautical_twilight_time: nil, morning_astronomical_twilight_time: nil, evening_astronomical_twilight_time: nil) ⇒ TwilightEvent
constructor
A new instance of TwilightEvent.
Constructor Details
#initialize(morning_civil_twilight_time: nil, evening_civil_twilight_time: nil, morning_nautical_twilight_time: nil, evening_nautical_twilight_time: nil, morning_astronomical_twilight_time: nil, evening_astronomical_twilight_time: nil) ⇒ TwilightEvent
Returns a new instance of TwilightEvent.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/astronoby/events/twilight_event.rb', line 30 def initialize( morning_civil_twilight_time: nil, evening_civil_twilight_time: nil, morning_nautical_twilight_time: nil, evening_nautical_twilight_time: nil, morning_astronomical_twilight_time: nil, evening_astronomical_twilight_time: nil ) @morning_civil_twilight_time = morning_civil_twilight_time @evening_civil_twilight_time = evening_civil_twilight_time @morning_nautical_twilight_time = morning_nautical_twilight_time @evening_nautical_twilight_time = evening_nautical_twilight_time @morning_astronomical_twilight_time = morning_astronomical_twilight_time @evening_astronomical_twilight_time = evening_astronomical_twilight_time end |
Instance Attribute Details
#evening_astronomical_twilight_time ⇒ Time? (readonly)
Returns evening astronomical twilight time.
22 23 24 |
# File 'lib/astronoby/events/twilight_event.rb', line 22 def evening_astronomical_twilight_time @evening_astronomical_twilight_time end |
#evening_civil_twilight_time ⇒ Time? (readonly)
Returns evening civil twilight time.
10 11 12 |
# File 'lib/astronoby/events/twilight_event.rb', line 10 def evening_civil_twilight_time @evening_civil_twilight_time end |
#evening_nautical_twilight_time ⇒ Time? (readonly)
Returns evening nautical twilight time.
16 17 18 |
# File 'lib/astronoby/events/twilight_event.rb', line 16 def evening_nautical_twilight_time @evening_nautical_twilight_time end |
#morning_astronomical_twilight_time ⇒ Time? (readonly)
Returns morning astronomical twilight time.
19 20 21 |
# File 'lib/astronoby/events/twilight_event.rb', line 19 def morning_astronomical_twilight_time @morning_astronomical_twilight_time end |
#morning_civil_twilight_time ⇒ Time? (readonly)
Returns morning civil twilight time.
7 8 9 |
# File 'lib/astronoby/events/twilight_event.rb', line 7 def morning_civil_twilight_time @morning_civil_twilight_time end |
#morning_nautical_twilight_time ⇒ Time? (readonly)
Returns morning nautical twilight time.
13 14 15 |
# File 'lib/astronoby/events/twilight_event.rb', line 13 def morning_nautical_twilight_time @morning_nautical_twilight_time end |