Class: Fractor::Worker
- Inherits:
-
Object
- Object
- Fractor::Worker
- Defined in:
- lib/fractor/worker.rb
Overview
Base class for defining work processors. Subclasses must implement the ‘process` method.
Instance Method Summary collapse
-
#initialize(name: nil, **options) ⇒ Worker
constructor
A new instance of Worker.
- #process(work) ⇒ Object
Constructor Details
#initialize(name: nil, **options) ⇒ Worker
Returns a new instance of Worker.
7 8 9 10 |
# File 'lib/fractor/worker.rb', line 7 def initialize(name: nil, **) @name = name @options = end |
Instance Method Details
#process(work) ⇒ Object
12 13 14 15 |
# File 'lib/fractor/worker.rb', line 12 def process(work) raise NotImplementedError, "Subclasses must implement the 'process' method." end |