Class: Upkeep::Dependencies::Identity
- Inherits:
-
Base
- Object
- Base
- Upkeep::Dependencies::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 Base
#cache_key, #matches_change?, #narrow_frame_safe?, #to_h
Constructor Details
#initialize(source:, key:, value:, metadata: {}) ⇒ Identity
Returns a new instance of Identity.
243
244
245
246
247
248
249
|
# File 'lib/upkeep/dependencies.rb', line 243
def initialize(source:, key:, value:, metadata: {})
super(
source: source,
key: { key: key, value: value },
metadata: metadata
)
end
|
Instance Method Details
#identity? ⇒ Boolean
251
252
253
|
# File 'lib/upkeep/dependencies.rb', line 251
def identity?
true
end
|
#identity_key ⇒ Object
255
256
257
|
# File 'lib/upkeep/dependencies.rb', line 255
def identity_key
{ source: source, key: key.fetch(:key), value: key.fetch(:value) }
end
|
#precision ⇒ Object
263
264
265
|
# File 'lib/upkeep/dependencies.rb', line 263
def precision
:identity
end
|
#visibility ⇒ Object
259
260
261
|
# File 'lib/upkeep/dependencies.rb', line 259
def visibility
:identity_bound
end
|