Class: Astronoby::TwilightEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/astronoby/events/twilight_events.rb

Overview

Holds arrays of twilight times over a time range.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(morning_civil, evening_civil, morning_nautical, evening_nautical, morning_astronomical, evening_astronomical) ⇒ TwilightEvents

Returns a new instance of TwilightEvents.

Parameters:

  • morning_civil (Array<Time>)

    morning civil twilight times

  • evening_civil (Array<Time>)

    evening civil twilight times

  • morning_nautical (Array<Time>)

    morning nautical twilight times

  • evening_nautical (Array<Time>)

    evening nautical twilight times

  • morning_astronomical (Array<Time>)

    morning astronomical twilight times

  • evening_astronomical (Array<Time>)

    evening astronomical twilight times



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_timesArray<Time> (readonly)

Returns evening astronomical twilight times.

Returns:

  • (Array<Time>)

    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_timesArray<Time> (readonly)

Returns evening civil twilight times.

Returns:

  • (Array<Time>)

    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_timesArray<Time> (readonly)

Returns evening nautical twilight times.

Returns:

  • (Array<Time>)

    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_timesArray<Time> (readonly)

Returns morning astronomical twilight times.

Returns:

  • (Array<Time>)

    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_timesArray<Time> (readonly)

Returns morning civil twilight times.

Returns:

  • (Array<Time>)

    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_timesArray<Time> (readonly)

Returns morning nautical twilight times.

Returns:

  • (Array<Time>)

    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