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.



321
322
323
324
325
326
327
328
329
330
# File 'lib/upkeep/dependencies.rb', line 321

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