Class: Temporalio::Client::ActivityOptions::Key
- Inherits:
-
Object
- Object
- Temporalio::Client::ActivityOptions::Key
- Defined in:
- lib/temporalio/client/activity_options.rb
Overview
Typed key for one updatable activity option. Use the keys on Temporalio::Client::ActivityOptions rather than constructing these directly.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Field-mask path this key updates.
Instance Method Summary collapse
-
#value_set(value) ⇒ Update
Create an update that sets this option to the given value.
-
#value_unset ⇒ Update
Create an update that clears this option server-side.
Instance Attribute Details
#name ⇒ String (readonly)
Returns Field-mask path this key updates.
19 20 21 |
# File 'lib/temporalio/client/activity_options.rb', line 19 def name @name end |
Instance Method Details
#value_set(value) ⇒ Update
Create an update that sets this option to the given value.
32 33 34 35 36 |
# File 'lib/temporalio/client/activity_options.rb', line 32 def value_set(value) raise ArgumentError, 'Value cannot be nil, use value_unset' if value.nil? Update.new(self, value) end |
#value_unset ⇒ Update
Create an update that clears this option server-side.
41 42 43 |
# File 'lib/temporalio/client/activity_options.rb', line 41 def value_unset Update.new(self, nil) end |