Class: Astronoby::RiseTransitSetEvent

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

Overview

Holds the rising, transit, and setting times for a single day.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rising, transit, setting) ⇒ RiseTransitSetEvent

Returns a new instance of RiseTransitSetEvent.

Parameters:

  • rising (Time, nil)

    the rising time

  • transit (Time, nil)

    the transit time

  • setting (Time, nil)

    the setting time



18
19
20
21
22
# File 'lib/astronoby/events/rise_transit_set_event.rb', line 18

def initialize(rising, transit, setting)
  @rising_time = rising
  @transit_time = transit
  @setting_time = setting
end

Instance Attribute Details

#rising_timeTime? (readonly)

Returns the rising time.

Returns:

  • (Time, nil)

    the rising time



7
8
9
# File 'lib/astronoby/events/rise_transit_set_event.rb', line 7

def rising_time
  @rising_time
end

#setting_timeTime? (readonly)

Returns the setting time.

Returns:

  • (Time, nil)

    the setting time



13
14
15
# File 'lib/astronoby/events/rise_transit_set_event.rb', line 13

def setting_time
  @setting_time
end

#transit_timeTime? (readonly)

Returns the transit (culmination) time.

Returns:

  • (Time, nil)

    the transit (culmination) time



10
11
12
# File 'lib/astronoby/events/rise_transit_set_event.rb', line 10

def transit_time
  @transit_time
end