Class: Astronoby::TwilightEvents
- Inherits:
-
Object
- Object
- Astronoby::TwilightEvents
- Defined in:
- lib/astronoby/events/twilight_events.rb
Overview
Holds arrays of twilight times over a time range.
Instance Attribute Summary collapse
-
#evening_astronomical_twilight_times ⇒ Array<Time>
readonly
Evening astronomical twilight times.
-
#evening_civil_twilight_times ⇒ Array<Time>
readonly
Evening civil twilight times.
-
#evening_nautical_twilight_times ⇒ Array<Time>
readonly
Evening nautical twilight times.
-
#morning_astronomical_twilight_times ⇒ Array<Time>
readonly
Morning astronomical twilight times.
-
#morning_civil_twilight_times ⇒ Array<Time>
readonly
Morning civil twilight times.
-
#morning_nautical_twilight_times ⇒ Array<Time>
readonly
Morning nautical twilight times.
Instance Method Summary collapse
-
#initialize(morning_civil, evening_civil, morning_nautical, evening_nautical, morning_astronomical, evening_astronomical) ⇒ TwilightEvents
constructor
A new instance of TwilightEvents.
Constructor Details
#initialize(morning_civil, evening_civil, morning_nautical, evening_nautical, morning_astronomical, evening_astronomical) ⇒ TwilightEvents
Returns a new instance of TwilightEvents.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/astronoby/events/twilight_events.rb', line 32 def initialize( morning_civil, evening_civil, morning_nautical, evening_nautical, morning_astronomical, evening_astronomical ) @morning_civil_twilight_times = morning_civil @evening_civil_twilight_times = evening_civil @morning_nautical_twilight_times = morning_nautical @evening_nautical_twilight_times = evening_nautical @morning_astronomical_twilight_times = morning_astronomical @evening_astronomical_twilight_times = evening_astronomical end |
Instance Attribute Details
#evening_astronomical_twilight_times ⇒ Array<Time> (readonly)
Returns evening astronomical twilight times.
22 23 24 |
# File 'lib/astronoby/events/twilight_events.rb', line 22 def evening_astronomical_twilight_times @evening_astronomical_twilight_times end |
#evening_civil_twilight_times ⇒ Array<Time> (readonly)
Returns evening civil twilight times.
10 11 12 |
# File 'lib/astronoby/events/twilight_events.rb', line 10 def evening_civil_twilight_times @evening_civil_twilight_times end |
#evening_nautical_twilight_times ⇒ Array<Time> (readonly)
Returns evening nautical twilight times.
16 17 18 |
# File 'lib/astronoby/events/twilight_events.rb', line 16 def evening_nautical_twilight_times @evening_nautical_twilight_times end |
#morning_astronomical_twilight_times ⇒ Array<Time> (readonly)
Returns morning astronomical twilight times.
19 20 21 |
# File 'lib/astronoby/events/twilight_events.rb', line 19 def morning_astronomical_twilight_times @morning_astronomical_twilight_times end |
#morning_civil_twilight_times ⇒ Array<Time> (readonly)
Returns morning civil twilight times.
7 8 9 |
# File 'lib/astronoby/events/twilight_events.rb', line 7 def morning_civil_twilight_times @morning_civil_twilight_times end |
#morning_nautical_twilight_times ⇒ Array<Time> (readonly)
Returns morning nautical twilight times.
13 14 15 |
# File 'lib/astronoby/events/twilight_events.rb', line 13 def morning_nautical_twilight_times @morning_nautical_twilight_times end |