Class: Upkeep::Dependencies::CurrentAttribute

Inherits:
Identity
  • Object
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(owner:, name:, value:, partitioning: nil, absent_by_name: nil) ⇒ CurrentAttribute

Returns a new instance of CurrentAttribute.



295
296
297
298
299
300
301
302
303
304
# File 'lib/upkeep/dependencies.rb', line 295

def initialize(owner:, name:, value:, partitioning: nil, absent_by_name: nil)
  super(
    source: :current_attribute,
    key: "#{owner}.#{name}",
    value: Dependencies.canonical_identity(value),
    metadata: { owner: owner.to_s, name: name.to_s },
    partitioning: partitioning,
    absent_by_name: absent_by_name
  )
end