Class: Upkeep::Dependencies::CookieValue

Inherits:
Identity show all
Defined in:
lib/upkeep/dependencies.rb

Instance Attribute Summary

Attributes inherited from Base

#key, #metadata, #source

Instance Method Summary collapse

Methods inherited from Identity

#identity?, #identity_key, #nil_identity?, #precision, #visibility

Methods inherited from Base

#cache_key, #identity?, #identity_key, #matches_change?, #narrow_frame_safe?, #precision, #to_h, #visibility

Constructor Details

#initialize(key:, value:, partitioning: nil, absent_by_name: nil) ⇒ CookieValue

Returns a new instance of CookieValue.



353
354
355
356
357
358
359
360
361
362
# File 'lib/upkeep/dependencies.rb', line 353

def initialize(key:, value:, partitioning: nil, absent_by_name: nil)
  super(
    source: :cookie,
    key: key.to_s,
    value: Dependencies.private_fingerprint(value),
    metadata: { key: key.to_s, value_class: value.class.name },
    partitioning: partitioning,
    absent_by_name: absent_by_name
  )
end