mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-23 09:51:48 +01:00
16 lines
293 B
Ruby
16 lines
293 B
Ruby
module Crono
|
|
class PerformerProxy
|
|
def initialize(performer)
|
|
@performer = performer
|
|
end
|
|
|
|
def every(period, *args)
|
|
Crono.config.schedule.add(@performer, Period.new(period, *args))
|
|
end
|
|
end
|
|
|
|
def self.perform(performer)
|
|
PerformerProxy.new(performer)
|
|
end
|
|
end
|