Class: Crono::PerformerProxy
- Inherits:
-
Object
- Object
- Crono::PerformerProxy
- Defined in:
- lib/crono/performer_proxy.rb
Overview
Crono::PerformerProxy is a proxy used in cronotab.rb semantic
Instance Method Summary collapse
- #every(period, *args) ⇒ Object
-
#initialize(performer, scheduler, job_args) ⇒ PerformerProxy
constructor
A new instance of PerformerProxy.
- #once_per(execution_interval) ⇒ Object
- #with_options(options) ⇒ Object
Constructor Details
#initialize(performer, scheduler, job_args) ⇒ PerformerProxy
Returns a new instance of PerformerProxy.
4 5 6 7 8 |
# File 'lib/crono/performer_proxy.rb', line 4 def initialize(performer, scheduler, job_args) @performer = performer @scheduler = scheduler @job_args = job_args end |
Instance Method Details
#every(period, *args) ⇒ Object
10 11 12 13 14 |
# File 'lib/crono/performer_proxy.rb', line 10 def every(period, *args) @job = Job.new(@performer, Period.new(period, *args), @job_args, ) @scheduler.add_job(@job) self end |
#once_per(execution_interval) ⇒ Object
16 17 18 19 |
# File 'lib/crono/performer_proxy.rb', line 16 def once_per(execution_interval) @job.execution_interval = execution_interval if @job self end |
#with_options(options) ⇒ Object
21 22 23 24 |
# File 'lib/crono/performer_proxy.rb', line 21 def () = self end |