class Rufus::Scheduler
def to_block (params, &block)
wrapping a call to it.
if a :schedulable is set in the params, will return a block
Returns a block. If a block is passed, will return it, else,
def to_block (params, &block) return block if block schedulable = params.delete(:schedulable) return nil unless schedulable l = lambda do schedulable.trigger(params) end class << l attr_accessor :schedulable end l.schedulable = schedulable l end