Class: Temporalio::SearchAttributes::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/search_attributes.rb

Overview

Search attribute update that can be separately applied.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value) ⇒ Update

Create an update. Users may find it easier to use Key#value_set and Key#value_unset instead.

Raises:

  • (ArgumentError)


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

#keyKey (readonly)



91
92
93
# File 'lib/temporalio/search_attributes.rb', line 91

def key
  @key
end

#valueObject? (readonly)



94
95
96
# File 'lib/temporalio/search_attributes.rb', line 94

def value
  @value
end