Class: Astronoby::RiseTransitSetCalculator::PotentialEvent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hour_angle, can_occur) ⇒ PotentialEvent

Returns a new instance of PotentialEvent.



8
9
10
11
# File 'lib/astronoby/events/rise_transit_set_calculator.rb', line 8

def initialize(hour_angle, can_occur)
  @hour_angle = hour_angle
  @can_occur = can_occur
end

Instance Attribute Details

#can_occurObject (readonly)

Returns the value of attribute can_occur.



6
7
8
# File 'lib/astronoby/events/rise_transit_set_calculator.rb', line 6

def can_occur
  @can_occur
end

#hour_angleObject (readonly)

Returns the value of attribute hour_angle.



6
7
8
# File 'lib/astronoby/events/rise_transit_set_calculator.rb', line 6

def hour_angle
  @hour_angle
end

Instance Method Details

#negatedObject



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

def negated
  self.class.new(-@hour_angle, @can_occur)
end