Class: Lev::ActiveJob::ConfiguredJob
- Defined in:
- lib/lev/active_job/configured_job.rb
Instance Attribute Summary collapse
-
#routine_class ⇒ Object
readonly
Returns the value of attribute routine_class.
Instance Method Summary collapse
-
#initialize(routine_class, options) ⇒ ConfiguredJob
constructor
A new instance of ConfiguredJob.
- #options ⇒ Object
- #perform_later(*args, **kwargs, &block) ⇒ Object
Constructor Details
#initialize(routine_class, options) ⇒ ConfiguredJob
Returns a new instance of ConfiguredJob.
6 7 8 9 |
# File 'lib/lev/active_job/configured_job.rb', line 6 def initialize(routine_class, ) @routine_class = routine_class @options = end |
Instance Attribute Details
#routine_class ⇒ Object (readonly)
Returns the value of attribute routine_class.
4 5 6 |
# File 'lib/lev/active_job/configured_job.rb', line 4 def routine_class @routine_class end |
Instance Method Details
#options ⇒ Object
11 12 13 |
# File 'lib/lev/active_job/configured_job.rb', line 11 def routine_class..merge(@options) end |
#perform_later(*args, **kwargs, &block) ⇒ Object
15 16 17 |
# File 'lib/lev/active_job/configured_job.rb', line 15 def perform_later(*args, **kwargs, &block) routine_class.job_class.new.perform_later(routine_class, , *args, **kwargs, &block) end |