class Rufus::Scheduler

def at_to_f (at)


(to be compared with the float coming from time.to_f)
Ensures an 'at' instance is translated to a float
def at_to_f (at)
  at = Rufus::to_ruby_time(at) if at.kind_of?(String)
  at = Rufus::to_gm_time(at) if at.kind_of?(DateTime)
  at = at.to_f if at.kind_of?(Time)
  raise "cannot schedule at : #{at.inspect}" unless at.is_a?(Float)
  at
end