Class: RubstApi::BackgroundTask
- Inherits:
-
Object
- Object
- RubstApi::BackgroundTask
- Defined in:
- lib/rubst_api/background_tasks.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(callable = nil, *args, **kwargs, &block) ⇒ BackgroundTask
constructor
A new instance of BackgroundTask.
Constructor Details
#initialize(callable = nil, *args, **kwargs, &block) ⇒ BackgroundTask
Returns a new instance of BackgroundTask.
5 6 7 |
# File 'lib/rubst_api/background_tasks.rb', line 5 def initialize(callable = nil, *args, **kwargs, &block) @callable, @args, @kwargs = callable || block, args, kwargs end |
Instance Method Details
#call ⇒ Object
8 |
# File 'lib/rubst_api/background_tasks.rb', line 8 def call = @callable.call(*@args, **@kwargs) |