Class: Temporalio::Internal::Worker::ActivityWorker::InboundImplementation
- Inherits:
-
Worker::Interceptor::Activity::Inbound
- Object
- Worker::Interceptor::Activity::Inbound
- Temporalio::Internal::Worker::ActivityWorker::InboundImplementation
- Defined in:
- lib/temporalio/internal/worker/activity_worker.rb
Instance Attribute Summary
Attributes inherited from Worker::Interceptor::Activity::Inbound
Instance Method Summary collapse
- #execute(input) ⇒ Object
- #init(outbound) ⇒ Object
-
#initialize(worker) ⇒ InboundImplementation
constructor
A new instance of InboundImplementation.
Constructor Details
#initialize(worker) ⇒ InboundImplementation
Returns a new instance of InboundImplementation.
349 350 351 352 |
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 349 def initialize(worker) super(nil) # steep:ignore @worker = worker end |
Instance Method Details
#execute(input) ⇒ Object
361 362 363 |
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 361 def execute(input) input.proc.call(*input.args) end |
#init(outbound) ⇒ Object
354 355 356 357 358 359 |
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 354 def init(outbound) context = Activity::Context.current raise 'Unexpected context type' unless context.is_a?(RunningActivity) context._outbound_impl = outbound end |