Module: Daylight

Defined in:
lib/trigger_switch_d/daylight.rb

Overview

:nodoc:all

Defined Under Namespace

Modules: DayFloat Classes: AngleRatio, DeclinationOfEarth, EquationOfCenterForEarth, HourAngleForObserver, JulianDateApproximation, Transit

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(receiver) ⇒ Object



26
27
28
29
# File 'lib/trigger_switch_d/daylight.rb', line 26

def self.extended(receiver)
  days = receiver.jd
  raise "method jd on #{receiver} does not return Fixnum" unless days.kind_of? Fixnum
end

Instance Method Details

#__prepare_float__Object



180
181
182
183
184
# File 'lib/trigger_switch_d/daylight.rb', line 180

def __prepare_float__
  Float.class_eval {include DayFloat}
  def __prepare_float__
  end
end

#sunrise(at_location) ⇒ Object



31
32
33
# File 'lib/trigger_switch_d/daylight.rb', line 31

def sunrise(at_location)
  time_for(:sunrise,at_location)
end

#sunset(at_location) ⇒ Object



35
36
37
# File 'lib/trigger_switch_d/daylight.rb', line 35

def sunset(at_location)
  time_for(:sunset,at_location)
end