Sha256: 80ac35b3dc9467563ae0c5e2318d3f2f3a3a4a13f15b6a0c6031d51ef369980c

Contents?: true

Size: 368 Bytes

Versions: 2

Compression:

Stored size: 368 Bytes

Contents

module Crono
  class PerformerProxy
    def initialize(performer, scheduler)
      @performer = performer
      @scheduler = scheduler
    end

    def every(period, *args)
      job = Job.new(@performer, Period.new(period, *args))
      @scheduler.add_job(job)
    end
  end

  def self.perform(performer)
    PerformerProxy.new(performer, Crono.scheduler)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
crono-0.7.0 lib/crono/performer_proxy.rb
crono-0.6.1 lib/crono/performer_proxy.rb