Class: Temporalio::Internal::Worker::ActivityWorker::InboundImplementation
- Inherits:
-
Worker::Interceptor::ActivityInbound
- Object
- Worker::Interceptor::ActivityInbound
- Temporalio::Internal::Worker::ActivityWorker::InboundImplementation
- Defined in:
- lib/temporalio/internal/worker/activity_worker.rb
Instance Attribute Summary
Attributes inherited from Worker::Interceptor::ActivityInbound
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.
309 310 311 312 |
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 309 def initialize(worker) super(nil) # steep:ignore @worker = worker end |
Instance Method Details
#execute(input) ⇒ Object
321 322 323 |
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 321 def execute(input) input.proc.call(*input.args) end |
#init(outbound) ⇒ Object
314 315 316 317 318 319 |
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 314 def init(outbound) context = Activity::Context.current raise 'Unexpected context type' unless context.is_a?(RunningActivity) context._outbound_impl = outbound end |