+ # Provides for on-the-fly reconfiguration of the Actions
+ # Accept the same arguments as the constructor
+ def configure(opts = {}, &block)
+ @period = opts[:period] if opts.include? :period
+ @blocked = opts[:blocked] if opts.include? :blocked
+ @repeat = opts[:repeat] if opts.include? :repeat
+
+ if block_given?
+ @block = block
+ elsif opts[:code]
+ @block = opts[:code]
+ end
+
+ raise 'huh?? blockless action?' unless @block
+ if opts.include? :args
+ @args = Array === opts[:args] ? opts[:args] : [opts[:args]]
+ end
+
+ if opts[:start] and (Time === opts[:start])
+ self.next = opts[:start]
+ else
+ self.next = Time.now + (opts[:start] || @period)
+ end