Module: SayWhen::Triggers::Base
- Included in:
- CronStrategy, InstanceStrategy, OnceStrategy
- Defined in:
- lib/say_when/triggers/base.rb
Instance Attribute Summary collapse
-
#job ⇒ Object
Returns the value of attribute job.
Instance Method Summary collapse
Instance Attribute Details
#job ⇒ Object
Returns the value of attribute job.
6 7 8 |
# File 'lib/say_when/triggers/base.rb', line 6 def job @job end |
Instance Method Details
#initialize(options = {}) ⇒ Object
8 9 10 11 |
# File 'lib/say_when/triggers/base.rb', line 8 def initialize( = {}) self.job = .delete(:job) raise ArgumentError.new("job must be provided to create a trigger") unless job end |
#next_fire_at(time = nil) ⇒ Object
13 14 15 |
# File 'lib/say_when/triggers/base.rb', line 13 def next_fire_at(time = nil) raise NotImplementedError.new('You need to implement next_fire_at in your strategy') end |