Class: Temporalio::SearchAttributes::Update
- Inherits:
-
Object
- Object
- Temporalio::SearchAttributes::Update
- Defined in:
- lib/temporalio/search_attributes.rb
Overview
Search attribute update that can be separately applied.
Instance Attribute Summary collapse
-
#key ⇒ Key
readonly
Key this update applies to.
-
#value ⇒ Object?
readonly
Value to update or ‘nil` to remove the key.
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 instead.
100 101 102 103 104 105 106 |
# File 'lib/temporalio/search_attributes.rb', line 100 def initialize(key, value) raise ArgumentError, 'Key must be a key' unless key.is_a?(Key) key.validate_value(value) unless value.nil? @key = key @value = value end |
Instance Attribute Details
#key ⇒ Key (readonly)
Returns Key this update applies to.
91 92 93 |
# File 'lib/temporalio/search_attributes.rb', line 91 def key @key end |
#value ⇒ Object? (readonly)
Returns Value to update or ‘nil` to remove the key.
94 95 96 |
# File 'lib/temporalio/search_attributes.rb', line 94 def value @value end |