lib/rufus/scheduler.rb in rufus-scheduler-2.0.6 vs lib/rufus/scheduler.rb in rufus-scheduler-2.0.7
- old
+ new
@@ -34,21 +34,21 @@
# s = Rufus::Scheduler.start_new
#
# If EventMachine is present and running will create an EmScheduler, else
# it will create a PlainScheduler instance.
#
- def self.start_new (opts={})
+ def self.start_new(opts={})
if defined?(EM) and EM.reactor_running?
EmScheduler.start_new(opts)
else
PlainScheduler.start_new(opts)
end
end
# Returns true if the given string seems to be a cron string.
#
- def self.is_cron_string (s)
+ def self.is_cron_string(s)
s.match(/.+ .+ .+ .+ .+/) # well...
end
end