Class: Temporalio::Client::ActivityOptions::Update
- Inherits:
-
Object
- Object
- Temporalio::Client::ActivityOptions::Update
- Defined in:
- lib/temporalio/client/activity_options.rb
Overview
A single change to an activity's options that can be separately applied.
Instance Attribute Summary collapse
-
#key ⇒ Key
readonly
Key this update applies to.
-
#value ⇒ Object?
readonly
Value to set, or
nilto clear the option.
Instance Method Summary collapse
-
#initialize(key, value) ⇒ Update
constructor
Create an update.
Constructor Details
#initialize(key, value) ⇒ Update
Create an update. Users may find it easier to use Key#value_set and Key#value_unset.
63 64 65 66 67 68 69 |
# File 'lib/temporalio/client/activity_options.rb', line 63 def initialize(key, value) raise ArgumentError, 'Key must be a key' unless key.is_a?(Key) @key = key @value = value freeze end |
Instance Attribute Details
#key ⇒ Key (readonly)
Returns Key this update applies to.
54 55 56 |
# File 'lib/temporalio/client/activity_options.rb', line 54 def key @key end |
#value ⇒ Object? (readonly)
Returns Value to set, or nil to clear the option.
57 58 59 |
# File 'lib/temporalio/client/activity_options.rb', line 57 def value @value end |