lib/pushpop.rb in pushpop-0.1.0 vs lib/pushpop.rb in pushpop-0.1.1
- old
+ new
@@ -2,15 +2,10 @@
require 'clockwork'
require 'pushpop/version'
require 'pushpop/job'
require 'pushpop/step'
-# require all plugins
-Dir["#{File.expand_path('../plugins/*', __FILE__)}.rb"].each { |file|
- require file
-}
-
module Pushpop
class << self
cattr_accessor :logger
cattr_accessor :jobs
@@ -30,9 +25,13 @@
self.jobs.map &:run
end
def schedule
self.jobs.map &:schedule
+ end
+
+ def load_plugin(name)
+ load "#{File.expand_path("../plugins/#{name}", __FILE__)}.rb"
end
end
end
# add into main